Skip to content

Commit 98fd640

Browse files
Mike CleronAndroid (Google) Code Review
authored andcommitted
Merge "Fix NPEs when using the APIs a little oddly." into jb-dev
2 parents f443c5e + c08dea2 commit 98fd640

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/java/android/app/Notification.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,9 @@ public Builder addAction(int icon, CharSequence title, PendingIntent intent) {
13671367
public Builder setStyle(Style style) {
13681368
if (mStyle != style) {
13691369
mStyle = style;
1370-
mStyle.setBuilder(this);
1370+
if (mStyle != null) {
1371+
mStyle.setBuilder(this);
1372+
}
13711373
}
13721374
return this;
13731375
}
@@ -1637,7 +1639,9 @@ protected void internalSetSummaryText(CharSequence cs) {
16371639
public void setBuilder(Builder builder) {
16381640
if (mBuilder != builder) {
16391641
mBuilder = builder;
1640-
mBuilder.setStyle(this);
1642+
if (mBuilder != null) {
1643+
mBuilder.setStyle(this);
1644+
}
16411645
}
16421646
}
16431647

0 commit comments

Comments
 (0)