From ac5e24a63d04638a2216d075979c6060e4ae3e39 Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Tue, 25 Oct 2022 22:11:26 -0700 Subject: [PATCH] build.gradle: update to SDK31 (#68) Required for apps to update in the Play Store after November 1. This requires: - manifest must specify if Intents are exported. - PendingIntent must declare FLAG_IMMUTABLE or MUTABLE Signed-off-by: Denton Gentry Signed-off-by: Denton Gentry --- android/build.gradle | 2 +- android/src/main/AndroidManifest.xml | 9 ++++++--- android/src/main/java/com/tailscale/ipn/IPNService.java | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4c58b29..4504704 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -25,7 +25,7 @@ android { compileSdkVersion 30 defaultConfig { minSdkVersion 22 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 133 versionName "1.33.21-t63ad49890-g80dfbd8a0c5" } diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index e19482a..8dfe5f1 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -22,7 +22,8 @@ android:theme="@style/Theme.GioApp" android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden" android:windowSoftInputMode="adjustResize" - android:launchMode="singleTask"> + android:launchMode="singleTask" + android:exported="true"> @@ -55,7 +56,8 @@ + android:permission="android.permission.BIND_VPN_SERVICE" + android:exported="false"> @@ -64,7 +66,8 @@ android:name=".QuickToggleService" android:icon="@drawable/ic_tile" android:label="@string/tile_name" - android:permission="android.permission.BIND_QUICK_SETTINGS_TILE"> + android:permission="android.permission.BIND_QUICK_SETTINGS_TILE" + android:exported="true"> diff --git a/android/src/main/java/com/tailscale/ipn/IPNService.java b/android/src/main/java/com/tailscale/ipn/IPNService.java index 3d23ff1..1ae192a 100644 --- a/android/src/main/java/com/tailscale/ipn/IPNService.java +++ b/android/src/main/java/com/tailscale/ipn/IPNService.java @@ -45,7 +45,8 @@ public class IPNService extends VpnService { } private PendingIntent configIntent() { - return PendingIntent.getActivity(this, 0, new Intent(this, IPNActivity.class), PendingIntent.FLAG_UPDATE_CURRENT); + return PendingIntent.getActivity(this, 0, new Intent(this, IPNActivity.class), + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); } private void disallowApp(VpnService.Builder b, String name) {