permission for play sound

This commit is contained in:
jens 2021-10-28 17:58:55 +02:00
parent 9e2f7c16f6
commit ba2a340bdf
2 changed files with 9 additions and 1 deletions

View File

@ -615,6 +615,9 @@ public class ActivityPermissions extends Activity
case wakeupDevice: case wakeupDevice:
addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions); addToArrayListUnique(Manifest.permission.WAKE_LOCK, requiredPermissions);
break; break;
case playSound:
addToArrayListUnique(Manifest.permission.READ_EXTERNAL_STORAGE, requiredPermissions);
break;
default: default:
break; break;
} }
@ -827,6 +830,10 @@ public class ActivityPermissions extends Activity
case Manifest.permission.FOREGROUND_SERVICE: case Manifest.permission.FOREGROUND_SERVICE:
usingElements.add(getResources().getString(R.string.startAutomationAsService)); usingElements.add(getResources().getString(R.string.startAutomationAsService));
break; 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; return usingElements;
@ -1331,6 +1338,7 @@ public class ActivityPermissions extends Activity
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.WRITE_SETTINGS); mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.WRITE_SETTINGS);
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.CHANGE_NETWORK_STATE); mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.CHANGE_NETWORK_STATE);
mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.ACCESS_NETWORK_STATE); mapActionPermissions.put("turnWifiTetheringOn", Manifest.permission.ACCESS_NETWORK_STATE);
mapActionPermissions.put("playSound", Manifest.permission.READ_EXTERNAL_STORAGE);
// mapActionPermissions.put("waitBeforeNextAction", ""); // mapActionPermissions.put("waitBeforeNextAction", "");
mapActionPermissions.put("wakeupDevice", Manifest.permission.WAKE_LOCK); mapActionPermissions.put("wakeupDevice", Manifest.permission.WAKE_LOCK);
} }

View File

@ -5,7 +5,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { 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 // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files