From 3e29054f8228e94c6c39d3a79f9e4c9a42c4915c Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 5 May 2024 23:39:46 +0200 Subject: [PATCH] New version --- app/build.gradle | 2 +- app/src/googlePlayFlavor/AndroidManifest.xml | 12 ------------ app/src/main/java/com/jens/automation2/Actions.java | 3 ++- .../com/jens/automation2/ActivityManageRule.java | 9 ++++++--- .../android/de-DE/changelogs/{138.txt => 139.txt} | 0 .../android/en-US/changelogs/{138.txt => 139.txt} | 0 .../android/es-ES/changelogs/{138.txt => 139.txt} | 0 .../android/fr-FR/changelogs/{138.txt => 139.txt} | 0 .../android/it-IT/changelogs/{138.txt => 139.txt} | 0 .../android/nl-NL/changelogs/{138.txt => 139.txt} | 0 .../android/pl-PL/changelogs/{138.txt => 139.txt} | 0 .../android/ru-RU/changelogs/{138.txt => 139.txt} | 0 .../android/zh-CN/changelogs/{138.txt => 139.txt} | 0 13 files changed, 9 insertions(+), 17 deletions(-) rename fastlane/metadata/android/de-DE/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/en-US/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/es-ES/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/fr-FR/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/it-IT/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/nl-NL/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/pl-PL/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/ru-RU/changelogs/{138.txt => 139.txt} (100%) rename fastlane/metadata/android/zh-CN/changelogs/{138.txt => 139.txt} (100%) diff --git a/app/build.gradle b/app/build.gradle index f0cee5ee..a6b13971 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { compileSdkVersion 33 buildToolsVersion '29.0.2' useLibrary 'org.apache.http.legacy' - versionCode 138 + versionCode 139 versionName "1.8" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/googlePlayFlavor/AndroidManifest.xml b/app/src/googlePlayFlavor/AndroidManifest.xml index 2aec771a..cd15a174 100644 --- a/app/src/googlePlayFlavor/AndroidManifest.xml +++ b/app/src/googlePlayFlavor/AndroidManifest.xml @@ -258,18 +258,6 @@ android:exported="true" /> - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/com/jens/automation2/Actions.java b/app/src/main/java/com/jens/automation2/Actions.java index 1e6a2941..606917c0 100644 --- a/app/src/main/java/com/jens/automation2/Actions.java +++ b/app/src/main/java/com/jens/automation2/Actions.java @@ -2353,7 +2353,8 @@ public class Actions { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - MyAccessibilityService.getInstance().performGlobalAction(AccessibilityService.GLOBAL_ACTION_TAKE_SCREENSHOT); + if(!BuildConfig.FLAVOR.equals(AutomationService.flavor_name_googleplay)) + MyAccessibilityService.getInstance().performGlobalAction(AccessibilityService.GLOBAL_ACTION_TAKE_SCREENSHOT); } } diff --git a/app/src/main/java/com/jens/automation2/ActivityManageRule.java b/app/src/main/java/com/jens/automation2/ActivityManageRule.java index 3958eeb6..3963ba41 100644 --- a/app/src/main/java/com/jens/automation2/ActivityManageRule.java +++ b/app/src/main/java/com/jens/automation2/ActivityManageRule.java @@ -622,7 +622,7 @@ public class ActivityManageRule extends Activity items.add(new Item(typesLong[i].toString(), R.drawable.megaphone)); else if(types[i].toString().equals(Trigger_Enum.phoneCall.toString())) { - if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, "android.permission.SEND_SMS")) + if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.SEND_SMS)) items.add(new Item(typesLong[i].toString(), R.drawable.phone)); } else if(types[i].toString().equals(Trigger_Enum.nfcTag.toString())) @@ -2250,12 +2250,15 @@ public class ActivityManageRule extends Activity } else if(types[i].toString().equals(Action_Enum.copyToClipboard.toString())) items.add(new Item(typesLong[i].toString(), R.drawable.clipboard)); - else if(types[i].toString().equals(Action_Enum.takeScreenshot.toString())) - items.add(new Item(typesLong[i].toString(), R.drawable.copier)); else if(types[i].toString().equals(Action_Enum.setVariable.toString())) items.add(new Item(typesLong[i].toString(), R.drawable.variable)); else if(types[i].toString().equals(Action_Enum.setLocationService.toString())) items.add(new Item(typesLong[i].toString(), R.drawable.compass_small)); + else if(types[i].toString().equals(Action_Enum.takeScreenshot.toString())) + { + if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.BIND_ACCESSIBILITY_SERVICE)) + items.add(new Item(typesLong[i].toString(), R.drawable.copier)); + } else items.add(new Item(typesLong[i].toString(), R.drawable.placeholder)); } diff --git a/fastlane/metadata/android/de-DE/changelogs/138.txt b/fastlane/metadata/android/de-DE/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/de-DE/changelogs/138.txt rename to fastlane/metadata/android/de-DE/changelogs/139.txt diff --git a/fastlane/metadata/android/en-US/changelogs/138.txt b/fastlane/metadata/android/en-US/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/en-US/changelogs/138.txt rename to fastlane/metadata/android/en-US/changelogs/139.txt diff --git a/fastlane/metadata/android/es-ES/changelogs/138.txt b/fastlane/metadata/android/es-ES/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/es-ES/changelogs/138.txt rename to fastlane/metadata/android/es-ES/changelogs/139.txt diff --git a/fastlane/metadata/android/fr-FR/changelogs/138.txt b/fastlane/metadata/android/fr-FR/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/fr-FR/changelogs/138.txt rename to fastlane/metadata/android/fr-FR/changelogs/139.txt diff --git a/fastlane/metadata/android/it-IT/changelogs/138.txt b/fastlane/metadata/android/it-IT/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/it-IT/changelogs/138.txt rename to fastlane/metadata/android/it-IT/changelogs/139.txt diff --git a/fastlane/metadata/android/nl-NL/changelogs/138.txt b/fastlane/metadata/android/nl-NL/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/nl-NL/changelogs/138.txt rename to fastlane/metadata/android/nl-NL/changelogs/139.txt diff --git a/fastlane/metadata/android/pl-PL/changelogs/138.txt b/fastlane/metadata/android/pl-PL/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/pl-PL/changelogs/138.txt rename to fastlane/metadata/android/pl-PL/changelogs/139.txt diff --git a/fastlane/metadata/android/ru-RU/changelogs/138.txt b/fastlane/metadata/android/ru-RU/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/ru-RU/changelogs/138.txt rename to fastlane/metadata/android/ru-RU/changelogs/139.txt diff --git a/fastlane/metadata/android/zh-CN/changelogs/138.txt b/fastlane/metadata/android/zh-CN/changelogs/139.txt similarity index 100% rename from fastlane/metadata/android/zh-CN/changelogs/138.txt rename to fastlane/metadata/android/zh-CN/changelogs/139.txt