Fully migrate tv to notification permission

All tv apps have the permission granted from ag/1733876, so the notification
system should be checking the permission state when notifications are
posted rather than the legacy system.

Test: make and flash, NotificationManagerTest
Fixes: 230769971
Change-Id: I013fb27f4324138690a0e2125c04e08ded86f94c
This commit is contained in:
Julia Reynolds
2022-05-02 09:38:07 -04:00
parent a7a36d968e
commit 86c27c03ee

View File

@@ -55,10 +55,8 @@ public final class PermissionHelper {
private final PermissionManagerServiceInternal mPmi;
private final IPackageManager mPackageManager;
private final IPermissionManager mPermManager;
// TODO (b/194833441): Remove this boolean (but keep the isMigrationEnabled() method)
// when the migration is enabled
// TODO (b/194833441): Remove when the migration is enabled
private final boolean mMigrationEnabled;
private final boolean mIsTv;
private final boolean mForceUserSetOnUpgrade;
public PermissionHelper(PermissionManagerServiceInternal pmi, IPackageManager packageManager,
@@ -69,17 +67,10 @@ public final class PermissionHelper {
mPermManager = permManager;
mMigrationEnabled = migrationEnabled;
mForceUserSetOnUpgrade = forceUserSetOnUpgrade;
boolean isTv;
try {
isTv = mPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK, 0);
} catch (RemoteException e) {
isTv = false;
}
mIsTv = isTv;
}
public boolean isMigrationEnabled() {
return mMigrationEnabled && !mIsTv;
return mMigrationEnabled;
}
/**