Update Settings#canDrawOverlays
.. to consider if the caller is holding the permission SYSTEM_APPLICATION_OVERLAY. Bug: 171177581 Test: Manually verified using wellbeing app Change-Id: I58907de33015d7441818110e94612ec3d29d07ad
This commit is contained in:
@@ -3061,7 +3061,9 @@ public final class Settings {
|
||||
*/
|
||||
public static boolean canDrawOverlays(Context context) {
|
||||
return Settings.isCallingPackageAllowedToDrawOverlays(context, Process.myUid(),
|
||||
context.getOpPackageName(), false);
|
||||
context.getOpPackageName(), false) || context.checkSelfPermission(
|
||||
Manifest.permission.SYSTEM_APPLICATION_OVERLAY)
|
||||
== PackageManager.PERMISSION_GRANTED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user