diff --git a/app/build.gradle b/app/build.gradle index e6a60be3..533145f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { buildToolsVersion = '34.0.0' compileSdk 34 minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 35 versionCode 4005 versionName "4.0.5 'Sidekick'" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a592db59..4d36af77 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,6 +17,7 @@ + @@ -103,7 +104,12 @@ android:name=".service.WalletService" android:description="@string/service_description" android:exported="false" - android:label="Monero Wallet Service" /> + android:foregroundServiceType="specialUse" + android:label="Monero Wallet Service"> + + = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + startForeground(NOTIFICATION_ID, notification, FOREGROUND_SERVICE_TYPE_SPECIAL_USE); + } else { + startForeground(NOTIFICATION_ID, notification); + } } @RequiresApi(Build.VERSION_CODES.O) diff --git a/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java b/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java index 8dc481f2..b5d765ea 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java +++ b/app/src/main/java/com/m2049r/xmrwallet/util/NetCipherHelper.java @@ -23,6 +23,8 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import androidx.core.content.ContextCompat; + import com.burgstaller.okhttp.AuthenticationCacheInterceptor; import com.burgstaller.okhttp.CachingAuthenticatorDecorator; import com.burgstaller.okhttp.digest.CachingAuthenticator; @@ -144,7 +146,7 @@ public class NetCipherHelper implements StatusCallback { .addStatusCallback(me); // deal with org.torproject.android.intent.action.STATUS = STARTS_DISABLED - me.context.registerReceiver(orbotStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS)); + ContextCompat.registerReceiver(me.context, orbotStatusReceiver, new IntentFilter(OrbotHelper.ACTION_STATUS), ContextCompat.RECEIVER_NOT_EXPORTED); me.startTor(); } diff --git a/app/src/main/res/menu/sidekick_connect_menu.xml b/app/src/main/res/menu/sidekick_connect_menu.xml index 3957b5db..6baa7ff7 100644 --- a/app/src/main/res/menu/sidekick_connect_menu.xml +++ b/app/src/main/res/menu/sidekick_connect_menu.xml @@ -4,7 +4,9 @@ + \ No newline at end of file