Skip to content

Commit

Permalink
[STAD-574] Set receiver to exported to fix IPC
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Feb 28, 2024
1 parent 1f9203d commit 01247bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void checkIsRunningAsync(final long timeout, final @NonNull TimeUnit unit
Handler receiverHandler = new Handler(pongReceiverThread.getLooper());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.get().registerReceiver(this, new IntentFilter(pongActionId), null,
receiverHandler, Context.RECEIVER_NOT_EXPORTED);
receiverHandler, Context.RECEIVER_EXPORTED);
} else {
context.get().registerReceiver(this, new IntentFilter(pongActionId), null,
receiverHandler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public void onCreate() {
// Allows other parties to ping this service to see if it is running
pingReceiver = new PingReceiver(GLOBAL_BROADCAST_PING, GLOBAL_BROADCAST_PONG);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(pingReceiver, new IntentFilter(GLOBAL_BROADCAST_PING), Context.RECEIVER_NOT_EXPORTED);
registerReceiver(pingReceiver, new IntentFilter(GLOBAL_BROADCAST_PING), Context.RECEIVER_EXPORTED);
} else {
registerReceiver(pingReceiver, new IntentFilter(GLOBAL_BROADCAST_PING));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class UploadProgressTest {
filter.addAction(CyfaceConnectionStatusListener.SYNC_PROGRESS)
filter.addAction(CyfaceConnectionStatusListener.SYNC_STARTED)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context!!.registerReceiver(receiver, filter, Context.RECEIVER_NOT_EXPORTED)
context!!.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED)
} else {
context!!.registerReceiver(receiver, filter)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public ConnectionStatusReceiver(final Context context) {
filter.addAction(SYNC_PROGRESS);
filter.addAction(SYNC_STARTED);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(this, filter, Context.RECEIVER_NOT_EXPORTED);
context.registerReceiver(this, filter, Context.RECEIVER_EXPORTED);
} else {
context.registerReceiver(this, filter);
}
Expand Down

0 comments on commit 01247bf

Please sign in to comment.