mirror of https://github.com/m2049r/xmrwallet.git
targetSdkVersion 35
This commit is contained in:
parent
d22fdfe2dc
commit
059438a09e
|
@ -7,7 +7,7 @@ android {
|
||||||
buildToolsVersion = '34.0.0'
|
buildToolsVersion = '34.0.0'
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 35
|
||||||
versionCode 4005
|
versionCode 4005
|
||||||
versionName "4.0.5 'Sidekick'"
|
versionName "4.0.5 'Sidekick'"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<intent>
|
<intent>
|
||||||
|
@ -103,7 +104,12 @@
|
||||||
android:name=".service.WalletService"
|
android:name=".service.WalletService"
|
||||||
android:description="@string/service_description"
|
android:description="@string/service_description"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="Monero Wallet Service" />
|
android:foregroundServiceType="specialUse"
|
||||||
|
android:label="Monero Wallet Service">
|
||||||
|
<property
|
||||||
|
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
||||||
|
android:value="Keeps app in sync with the blockchain" />
|
||||||
|
</service>
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
package com.m2049r.xmrwallet.service;
|
package com.m2049r.xmrwallet.service;
|
||||||
|
|
||||||
|
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE;
|
||||||
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
|
@ -581,8 +583,12 @@ public class WalletService extends Service {
|
||||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||||
.setContentIntent(pendingIntent)
|
.setContentIntent(pendingIntent)
|
||||||
.build();
|
.build();
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||||
|
startForeground(NOTIFICATION_ID, notification, FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
|
||||||
|
} else {
|
||||||
startForeground(NOTIFICATION_ID, notification);
|
startForeground(NOTIFICATION_ID, notification);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private String createNotificationChannel() {
|
private String createNotificationChannel() {
|
||||||
|
|
|
@ -23,6 +23,8 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.burgstaller.okhttp.AuthenticationCacheInterceptor;
|
import com.burgstaller.okhttp.AuthenticationCacheInterceptor;
|
||||||
import com.burgstaller.okhttp.CachingAuthenticatorDecorator;
|
import com.burgstaller.okhttp.CachingAuthenticatorDecorator;
|
||||||
import com.burgstaller.okhttp.digest.CachingAuthenticator;
|
import com.burgstaller.okhttp.digest.CachingAuthenticator;
|
||||||
|
@ -144,7 +146,7 @@ public class NetCipherHelper implements StatusCallback {
|
||||||
.addStatusCallback(me);
|
.addStatusCallback(me);
|
||||||
|
|
||||||
// deal with org.torproject.android.intent.action.STATUS = STARTS_DISABLED
|
// 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();
|
me.startTor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_help_sidekick"
|
android:id="@+id/action_help_sidekick"
|
||||||
|
android:icon="@drawable/ic_help_white_24dp"
|
||||||
android:orderInCategory="300"
|
android:orderInCategory="300"
|
||||||
android:title="@string/menu_help"
|
android:title="@string/menu_help"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
Loading…
Reference in New Issue