Skip to content

Commit

Permalink
Merge pull request #1321 from breez/jssdwt-fix-tor
Browse files Browse the repository at this point in the history
fix tor config receiver
  • Loading branch information
roeierez authored Dec 3, 2024
2 parents 98d01b6 + 7ffd149 commit 2a8be35
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.os.Build;
import android.os.IBinder;
import android.util.Log;
import java.util.concurrent.Executor;
Expand Down Expand Up @@ -151,7 +152,11 @@ public void onReceive(Context context, Intent intent) {


Context context = binding.getApplicationContext();
context.registerReceiver(receiver, new IntentFilter(TorService.ACTION_STATUS));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.registerReceiver(receiver, new IntentFilter(TorService.ACTION_STATUS), Context.RECEIVER_NOT_EXPORTED);
} else {
context.registerReceiver(receiver, new IntentFilter(TorService.ACTION_STATUS));
}

// Ref. https://developer.android.com/guide/components/services
// Your service can work both ways—it can be started (to run indefinitely) and also allow binding.
Expand Down

0 comments on commit 2a8be35

Please sign in to comment.