diff --git a/app/build.gradle b/app/build.gradle index 05a8780..4ca3a7e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,7 +6,7 @@ android { defaultConfig { applicationId "net.typeblog.shelter" minSdkVersion 24 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 18 versionName "1.7-dev1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f17b6ff..a4b0c47 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -36,7 +36,8 @@ + android:launchMode="singleTask" + android:exported="true"> @@ -46,7 +47,8 @@ + android:launchMode="singleTask" + android:exported="false"/> + android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar" + android:exported="true"> @@ -82,7 +85,8 @@ + android:label="@string/camera_proxy_activity" + android:exported="true"> @@ -93,7 +97,8 @@ + android:permission="android.permission.BIND_DEVICE_ADMIN" + android:exported="true"> diff --git a/app/src/main/java/net/typeblog/shelter/receivers/ShelterDeviceAdminReceiver.java b/app/src/main/java/net/typeblog/shelter/receivers/ShelterDeviceAdminReceiver.java index f251c64..bc39bda 100644 --- a/app/src/main/java/net/typeblog/shelter/receivers/ShelterDeviceAdminReceiver.java +++ b/app/src/main/java/net/typeblog/shelter/receivers/ShelterDeviceAdminReceiver.java @@ -30,8 +30,8 @@ public class ShelterDeviceAdminReceiver extends DeviceAdminReceiver { context.getString(R.string.finish_provision_desc), R.drawable.ic_notification_white_24dp); notification.contentIntent = PendingIntent.getActivity(context, 0, i, - PendingIntent.FLAG_UPDATE_CURRENT); - notification.flags |= Notification.FLAG_AUTO_CANCEL | Notification.FLAG_ONGOING_EVENT; + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); + notification.flags |= Notification.FLAG_AUTO_CANCEL; context.getSystemService(NotificationManager.class) .notify(NOTIFICATION_ID, notification); }