[Android Apps and Games] jagan2:
Hi everybody! I have a critical update here for Android Marshmallow users, any feedback would be appreciated!

The .apk attached with this post attempts to resolve the issue regarding 'Screen Overlay Detected'.

The problem:

On some Android Marshmallow devices, when you have installed a new App and the App requests you to grant certain permissions, you can't actually click allow/deny. And the system will pop-up a dialog whose title will read something like 'Screen Overlay Detected...'.

So, basically you will have to find and disable all Apps that are actively displaying a floating window on your screen. This could include Facebook's Chat Head, or a Screen filter App, or even Android's own pop-out notification at the top.

Naturally, everytime you want to grant/revoke permission to an App, you will have to manually disable Energy Bar as well.

The cause:

I have had Marshmallow on my device since a long time, and I have never faced this issue. The issue was made aware to me as many users reported on Play Store or via email and I have been puzzled. Because I can't resolve an issue which I can't reproduce on my device/emulator.

So, I did some research on the issue and am almost confident that the issue has been introduced since the July 2016(or any later ones) security patch for Android Marshmallow. I verified this on one of my friend's Nexus phone.

This new system wide restriction of having all floating App's disabled before a user can allow/deny a permission is put in place by Google, so that no App can overlay a different message on the permission dialog issued by the System. This wasn't required in previous Android versions because they didn't have this dynamic permission grant/revoke model and in Android 7.0, the system automatically disables all overlay Apps temporarily to avoid the 'Screen Overlay...' dialog.

I also found out that the issue is fixed on Android 7.0 with the system (so far, I verified that on an emulator running Android 7.0.)

The .apk update

This .apk explicitly attempts to resolve the above mentioned issue by auto disabling Energy Bar when you want to grant/revoke permission to/of an App. Other than that, this .apk offers no other new feature and it is supposed to have an effect only on Android Marshmallow.

If the fix works for you, I want some feedback on it's implementation. The current implementation makes Energy Bar super active, as it has to constantly keep an eye on the system, to provide cooperation as required (that is, auto-disable and enable when the permission dialog is dealt with by the user.) I don't expect it to have any significant impact on the battery but again it's ideally not desired for Energy Bar.

So, one alternate solution that will not require Energy Bar to constantly monitor system is: Anytime there is a pop-up dialog to allow/deny permission, Energy Bar will auto-disable and leave a notification in your notification bar. When you're done with permissions, you will have to click the notification to enable Energy Bar back.

Let me know your thoughts.

Also, if there is any Android 7.0 user out there, please let me know if you face any such issue (note: whether you use the latest .apk or this .apk, both will have same effect on the phone.)

EDIT: The issue has been resolved, thanks everyone for the feedback! Checkout the latest version in the main post.