Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7032e59 authored by Kazuki Takise's avatar Kazuki Takise Committed by Android (Google) Code Review
Browse files

Merge "Add null check for notification preference helper" into tm-dev

parents dc59b878 0a8a686f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -601,8 +601,10 @@ public class PreferencesHelper implements RankingConfig {
                out.attribute(null, ATT_NAME, r.pkg);
                if (!notifPermissions.isEmpty()) {
                    Pair<Integer, String> app = new Pair(r.uid, r.pkg);
                    final Pair<Boolean, Boolean> permission = notifPermissions.get(app);
                    out.attributeInt(null, ATT_IMPORTANCE,
                            notifPermissions.get(app).first ? IMPORTANCE_DEFAULT : IMPORTANCE_NONE);
                            permission != null && permission.first ? IMPORTANCE_DEFAULT
                                    : IMPORTANCE_NONE);
                    notifPermissions.remove(app);
                } else {
                    if (r.importance != DEFAULT_IMPORTANCE) {