diff --git a/app/src/main/java/com/jens/automation2/ActivityPermissions.java b/app/src/main/java/com/jens/automation2/ActivityPermissions.java index 54681cde..86e31a4c 100644 --- a/app/src/main/java/com/jens/automation2/ActivityPermissions.java +++ b/app/src/main/java/com/jens/automation2/ActivityPermissions.java @@ -615,6 +615,9 @@ public class ActivityPermissions extends Activity case wakeupDevice: addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions); break; + case playSound: + addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions); + break; default: break; } @@ -827,6 +830,10 @@ public class ActivityPermissions extends Activity case Manifest.permission.FOREGROUND_SERVICE: usingElements.add(getResources().getString(R.string.startAutomationAsService)); break; + case Manifest.permission.READ_EXTERNAL_STORAGE: + for(String ruleName : getRulesUsing(Action.Action_Enum.playSound)) + usingElements.add(String.format(getResources().getString(R.string.ruleXrequiresThis), ruleName)); + break; } return usingElements; @@ -1331,6 +1338,7 @@ public class ActivityPermissions extends Activity mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.WRITE_SETTINGS); mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.CHANGE_NETWORK_STATE); mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.ACCESS_NETWORK_STATE); + mapActionPermissions.put("playSound", Manifest.permission.READ_EXTERNAL_STORAGE); // mapActionPermissions.put("waitBeforeNextAction", ""); mapActionPermissions.put("wakeupDevice", Manifest.permission.WAKE_LOCK); } diff --git a/build.gradle b/build.gradle index 6cc3bf2b..2336605d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files