Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01088524 authored by Linus Tufvesson's avatar Linus Tufvesson
Browse files

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
parent 9698f82a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
    }
    /**