Merge "Add null check for notification preference helper" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d7032e596f
@@ -601,8 +601,10 @@ public class PreferencesHelper implements RankingConfig {
|
|||||||
out.attribute(null, ATT_NAME, r.pkg);
|
out.attribute(null, ATT_NAME, r.pkg);
|
||||||
if (!notifPermissions.isEmpty()) {
|
if (!notifPermissions.isEmpty()) {
|
||||||
Pair<Integer, String> app = new Pair(r.uid, r.pkg);
|
Pair<Integer, String> app = new Pair(r.uid, r.pkg);
|
||||||
|
final Pair<Boolean, Boolean> permission = notifPermissions.get(app);
|
||||||
out.attributeInt(null, ATT_IMPORTANCE,
|
out.attributeInt(null, ATT_IMPORTANCE,
|
||||||
notifPermissions.get(app).first ? IMPORTANCE_DEFAULT : IMPORTANCE_NONE);
|
permission != null && permission.first ? IMPORTANCE_DEFAULT
|
||||||
|
: IMPORTANCE_NONE);
|
||||||
notifPermissions.remove(app);
|
notifPermissions.remove(app);
|
||||||
} else {
|
} else {
|
||||||
if (r.importance != DEFAULT_IMPORTANCE) {
|
if (r.importance != DEFAULT_IMPORTANCE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user