Use NMS calculation of fixed importance
Rather than recalculating it again. Also align logic on listing and details pages. Test: NotificationBackendTest, NotificationPreferenceControllerTest Bug: 231662091 Fixes: 231815850 Change-Id: If9572766666620008afb839ecb0828ace8d6073d
This commit is contained in:
@@ -24,6 +24,7 @@ import android.app.NotificationChannel;
|
||||
import android.app.NotificationChannelGroup;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -171,7 +172,8 @@ public abstract class NotificationPreferenceController extends AbstractPreferenc
|
||||
return overrideCanConfigureValue;
|
||||
}
|
||||
if (mAppRow != null) {
|
||||
return !mAppRow.systemApp && !mAppRow.lockedImportance;
|
||||
boolean systemBlockable = !mAppRow.systemApp || (mAppRow.systemApp && mAppRow.banned);
|
||||
return systemBlockable && !mAppRow.lockedImportance;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user