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

Commit 314e8001 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove temporary exceptions from notification dialog code"

parents 8ab93641 21c84e94
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1139,13 +1139,11 @@ public final class PermissionPolicyService extends SystemService {
        private boolean shouldForceShowNotificationPermissionRequest(@NonNull String pkgName,
                @NonNull UserHandle user) {
            AndroidPackage pkg = mPackageManagerInternal.getPackage(pkgName);
            // TODO(b/205888750): Remove platform key and permissionController lines after pregrants
            // are in place
            if (pkg == null || pkg.getPackageName() == null || pkg.isSignedWithPlatformKey()
                    || pkg.getPackageName().contains("nexuslauncher")
            if (pkg == null || pkg.getPackageName() == null
                    || Objects.equals(pkgName, mPackageManager.getPermissionControllerPackageName())
                    || pkg.getTargetSdkVersion() < Build.VERSION_CODES.M) {
                // TODO(b/205888750) add warning logs when pregrants in place
                Slog.w(LOG_TAG, "Cannot check for Notification prompt, no package for "
                        + pkgName + " or pkg is Permission Controller");
                return false;
            }