Remove notification permission feature flag

Tes: Settings notification robotests
Bug: 231344755
Change-Id: I3e35eede94ea88bee4c2e7fc03ce998ed68b4f81
This commit is contained in:
Julia Reynolds
2022-05-04 16:24:23 -04:00
parent 73c8e2f45a
commit 4138b6f68a
4 changed files with 21 additions and 131 deletions

View File

@@ -64,7 +64,6 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
@Nullable
protected ShortcutInfo mConversationInfo;
protected List<String> mPreferenceFilter;
boolean mMigratedPermission;
boolean overrideCanBlock;
boolean overrideCanConfigure;
@@ -78,8 +77,6 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
mBackend = backend;
mUm = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
mPm = mContext.getPackageManager();
mMigratedPermission = Settings.Secure.getIntForUser(context.getContentResolver(),
Settings.Secure.NOTIFICATION_PERMISSION_ENABLED, 0, USER_SYSTEM) != 0;
}
/**
@@ -155,9 +152,7 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
return overrideCanConfigureValue;
}
if (channel != null && mAppRow != null) {
boolean locked = mMigratedPermission ? mAppRow.lockedImportance
: channel.isImportanceLockedByCriticalDeviceFunction()
|| channel.isImportanceLockedByOEM();
boolean locked = mAppRow.lockedImportance;
if (locked) {
return channel.isBlockable() || channel.getImportance() == IMPORTANCE_NONE;
}
@@ -186,8 +181,7 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
return overrideCanConfigureValue;
}
if (channel != null && mAppRow != null) {
boolean locked = mMigratedPermission ? mAppRow.lockedImportance
: channel.isImportanceLockedByOEM();
boolean locked = mAppRow.lockedImportance;
return !locked || channel.isBlockable();
}
return false;