Tasker manifest needs to request permission to change runtime permissions of other apps.
I need to be able to grant or revoke the permissions for other apps. A lot of times, an app works great when I want it run in the forground, but is a bit obnoxious when running in the background. I may be okay with background app accessing the internet, but don't want it getting GPS location while in the background, only when active in the foreground.
Tasker could easily handle the context, but cannot do the action of preventing the app from location services. Not unless it could revoke or grant runtime permissions.
adb shell pm grant net.dinglisch.android.taskerm android.permission.GRANT_RUNTIME_PERMISSIONS Operation not allowed: java.lang.SecurityException: Package net.dinglisch.android.taskerm has not requested permission android.permission.GRANT_RUNTIME_PERMISSIONS
(same for REVOKE_RUNTIME_PERMISSIONS)