From 03f5710d4a8507ddee36b5fc541d3efcb8656d68 Mon Sep 17 00:00:00 2001 From: Irfan Latif Date: Thu, 15 Jun 2023 00:37:41 +0500 Subject: [PATCH] v1.20 --- app/build.gradle | 4 ++-- .../permissionmanagerx/privs/NativeDaemon.java | 2 ++ .../mirfatif/permissionmanagerx/util/ApiUtils.java | 13 ++++++++++--- fastlane/metadata/android/en-US/changelogs/120.txt | 2 ++ gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/120.txt diff --git a/app/build.gradle b/app/build.gradle index 459e77a8..5f013b98 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { defaultConfig { applicationId APP_ID - versionCode 119 - versionName 'v1.19' + versionCode 120 + versionName 'v1.20' // Flavor-independent and BuildType-independent BuildConfig.APPLICATION_ID buildConfigField 'String', 'APP_ID', '"' + APP_ID + '"' diff --git a/app/src/main/java/com/mirfatif/permissionmanagerx/privs/NativeDaemon.java b/app/src/main/java/com/mirfatif/permissionmanagerx/privs/NativeDaemon.java index 24963f29..05a2c14c 100644 --- a/app/src/main/java/com/mirfatif/permissionmanagerx/privs/NativeDaemon.java +++ b/app/src/main/java/com/mirfatif/permissionmanagerx/privs/NativeDaemon.java @@ -137,6 +137,8 @@ private boolean startRootDaemon() { String su = MySettings.INS.getSuExePath(); Process proc = Util.runProc(TAG, "startRootDaemon", false, su); if (proc == null) { + + MySettings.INS.setRootEnabled(false); return false; } diff --git a/app/src/main/java/com/mirfatif/permissionmanagerx/util/ApiUtils.java b/app/src/main/java/com/mirfatif/permissionmanagerx/util/ApiUtils.java index 64a1e76e..c889e62f 100644 --- a/app/src/main/java/com/mirfatif/permissionmanagerx/util/ApiUtils.java +++ b/app/src/main/java/com/mirfatif/permissionmanagerx/util/ApiUtils.java @@ -21,11 +21,14 @@ import com.mirfatif.permissionmanagerx.R; import com.mirfatif.permissionmanagerx.app.App; import com.mirfatif.privtasks.Constants; +import com.mirfatif.privtasks.util.MyLog; import java.util.ArrayList; import java.util.List; public class ApiUtils { + private static final String TAG = "ApiUtils"; + private ApiUtils() {} public static String getString(int resId, Object... args) { @@ -159,10 +162,14 @@ public static void setTargetFragment(Fragment source, Fragment target) { public static ArrayList getParcelableArrayListExtra( Intent intent, String name, Class cls) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.TIRAMISU) { - return intent.getParcelableArrayListExtra(name, cls); - } else { - return intent.getParcelableArrayListExtra(name); + try { + return intent.getParcelableArrayListExtra(name, cls); + } catch (NullPointerException e) { + MyLog.e(TAG, "getParcelableArrayListExtra", e); + } } + + return intent.getParcelableArrayListExtra(name); } public static boolean hasAppOpsPerm() { diff --git a/fastlane/metadata/android/en-US/changelogs/120.txt b/fastlane/metadata/android/en-US/changelogs/120.txt new file mode 100644 index 00000000..c5555277 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/120.txt @@ -0,0 +1,2 @@ +- Fixed crashes +- Minor improvements diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c50b3c8d..6985c875 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip