Merge "Update Settings#canDrawOverlays"

This commit is contained in:
Linus Tufvesson
2021-01-22 17:45:09 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}
/**