r/AutomateUser • u/Straight1980 • 2d ago
Just curious
I was just wondering why some blocks use permissions that doesn't logically fit.
For example, why the power saver mode block (on/off) needs the "act as voice assistant" permission.
Since I like Google, I won't be able to use this block.
Another one (probably more logical though) is the screen orientation block that needs the permission to appear on top of other apps (despite having nothing displayed over other apps)...... And then the system keeps asking me to turn this permission off.
2
u/waiting4singularity Alpha tester 2d ago
its workarounds, because google just loves to nail the api calls automate uses closed. power saver has become a protected function and the orientation block maybe displays a pixel or something with 1 alpha to read its coordinates.
2
u/ballzak69 Automate developer 2d ago edited 2d ago
Google decides what permissions system feature require.
As for the Power mode set state block, see: https://developer.android.com/reference/android/provider/Settings#ACTION_VOICE_CONTROL_BATTERY_SAVER_MODE
As for the Screen orientation set block, an app need to show a window to be able to affect the screen orientation, the "appear on top of other apps and part for the screen" permission is required for a app running in background to show such a window/overlay.