diff --git a/build.gradle b/build.gradle index dc9a9865218ea9ab3d2e59f19c65b87567d2948a..de111fe8e8913ad89a96ee2e32ced6211df8914d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,11 +4,9 @@ apply from : '../dependencies.gradle' apply from : '../exportdependencies/publish.gradle' android { - ndkVersion '21.3.6528147' - defaultConfig { minSdkVersion 24 - targetSdkVersion 33 + targetSdkVersion 34 } buildTypes { diff --git a/src/main/java/org/torproject/android/service/OrbotService.java b/src/main/java/org/torproject/android/service/OrbotService.java index f1b86e9a298c9c532b859c04fdb351804c03ff2e..16a41076e52214074b34ab09442c078a4e55bc36 100644 --- a/src/main/java/org/torproject/android/service/OrbotService.java +++ b/src/main/java/org/torproject/android/service/OrbotService.java @@ -87,6 +87,7 @@ import IPtProxy.IPtProxy; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.core.app.NotificationCompat; +import androidx.core.content.ContextCompat; import androidx.localbroadcastmanager.content.LocalBroadcastManager; @SuppressWarnings("StringConcatenationInsideStringBufferAppend") @@ -574,7 +575,7 @@ public class OrbotService extends VpnService implements OrbotConstants { filter.addAction(LOCAL_ACTION_NOTIFICATION_START); mActionBroadcastReceiver = new ActionBroadcastReceiver(); - registerReceiver(mActionBroadcastReceiver, filter); + ContextCompat.registerReceiver(this, mActionBroadcastReceiver, filter, ContextCompat.RECEIVER_NOT_EXPORTED); mIsServiceRunningBroadcastReceiver = new IsServiceRunningBroadcastReceiver(); LocalBroadcastManager.getInstance(this).registerReceiver(