diff options
| author | Mike Cleron <mcleron@google.com> | 2012-06-28 14:18:48 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-06-28 14:18:48 -0700 |
| commit | 98fd6405aec16c6062f562bf6e7c5f2d50da5d60 (patch) | |
| tree | 70b9b34785e893ee4b6dee915962f9af3279b345 /core/java | |
| parent | f443c5ea2c67285322d4790e5bee4c3c6f6af1ae (diff) | |
| parent | c08dea2aa4f66f888f01fa7ed2be46d4c4651a1e (diff) | |
Merge "Fix NPEs when using the APIs a little oddly." into jb-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/Notification.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 8220fd908c28..ceb8cde5087e 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1367,7 +1367,9 @@ public class Notification implements Parcelable public Builder setStyle(Style style) { if (mStyle != style) { mStyle = style; - mStyle.setBuilder(this); + if (mStyle != null) { + mStyle.setBuilder(this); + } } return this; } @@ -1637,7 +1639,9 @@ public class Notification implements Parcelable public void setBuilder(Builder builder) { if (mBuilder != builder) { mBuilder = builder; - mBuilder.setStyle(this); + if (mBuilder != null) { + mBuilder.setStyle(this); + } } } |
