Remove temporary exceptions from notification dialog code

Now that pregrants are in place, these lines are no longer needed

Test: manual
Bug: 194833441
Change-Id: Ibf6359c217b04c00ebc01080a2b7e51f06f741ba
This commit is contained in:
Nate Myren
2022-01-11 10:18:50 -08:00
parent 2e6243d900
commit 21c84e94ba

View File

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