Skip to content

Commit

Permalink
android: Fix Android 34 compatibility for the Tor service
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg committed Nov 1, 2023
1 parent 04fecfe commit c7f830b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion android/app/src/main/java/com/blixtwallet/BlixtTor.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ public void startTor(Promise promise) {
calleeResolvers.add(promise);

boolean persistentServicesEnabled = getPersistentServicesEnabled(getReactApplicationContext());
getReactApplicationContext().registerReceiver(torBroadcastReceiver, new IntentFilter(TorService.ACTION_STATUS));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getReactApplicationContext().registerReceiver(torBroadcastReceiver, new IntentFilter(TorService.ACTION_STATUS), Context.RECEIVER_NOT_EXPORTED);
} else {
getReactApplicationContext().registerReceiver(torBroadcastReceiver, new IntentFilter(TorService.ACTION_STATUS));
}
Intent intent = new Intent(getReactApplicationContext(), TorService.class);

if (persistentServicesEnabled) {
Expand Down

1 comment on commit c7f830b

@vercel
Copy link

@vercel vercel bot commented on c7f830b Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blixt-wallet – ./

blixt-wallet-git-master-hsjoberg.vercel.app
blixt-wallet-hsjoberg.vercel.app

Please sign in to comment.