New AccessibilityService performGlobalAction(int) bug.


evilhawk00

Members
Jun 10, 2021
1
13
I'm an app developer having apps on Google Play. My app uses Accessibility Service for its functionality.

I've used FireBase to trigger custom events to log the bugs. Recently I found an issue that only happens in MIUI. I've collected those data for more than 6 months and I can confirm it only happens in MIUI, I haven't seen any of this issue in OPPO, Oneplus, SAMSUNG, HTC...etc.

I use two technics to double-check if Accessibility Service is running, I've checked the existence of the instance of AccessibilityService with static reference, I also checked it with "Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES". After I'm sure Accessibility Service is enabled, I call "performGlobalAction(GLOBAL_ACTION_POWER_DIALOG)" for Power Dialog. Sometimes the return value of "performGlobalAction()" is false for no reason.

This is happening in :
Android 11: Poco F3, X3
Legacy Android: Redmi 3s, Note3, Note4, Note10 Lite

Even though I guided my users to turn off the battery saving and white list my app in doze mode. This is still happening.
 
Hello,

This is the forum of the Xiaomi.eu custom ROM, I believe you were aiming for Xiaomi forums.
 
  • Like
Reactions: Poney70