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

Commit 3dd7b2d8 authored by Takamasa Kuramitsu's avatar Takamasa Kuramitsu Committed by Julia Reynolds
Browse files

Only warn when fullScreenIntent is requested without permission

Target Q+ apps are required to have USE_FULL_SCREEN_INTENT permission
when using fullScreenIntent and warning is logged if the permission is
missing. Currently the warning is logged even if normal notification
is used by Q+ apps.
This CL changes to warn only when Q+ apps try to use fullScreenIntent
without the permission.

Bug: 121008602
Test: manual
Change-Id: Iaceeefd8f69b9a4032108616513b897b89adfe36
parent 33ab8a0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4423,7 +4423,7 @@ public class NotificationManagerService extends SystemService {
            notification.flags &= ~Notification.FLAG_CAN_COLORIZE;
        }

        if (ai.targetSdkVersion >= Build.VERSION_CODES.Q) {
        if (notification.fullScreenIntent != null && ai.targetSdkVersion >= Build.VERSION_CODES.Q) {
            int fullscreenIntentPermission = mPackageManagerClient.checkPermission(
                    android.Manifest.permission.USE_FULL_SCREEN_INTENT, pkg);
            if (fullscreenIntentPermission != PERMISSION_GRANTED) {