diff options
| author | Chris Wren <cwren@android.com> | 2015-06-12 19:28:52 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-12 19:28:54 +0000 |
| commit | 17de4b2a73996366ff3d7759793a6809654caebe (patch) | |
| tree | ea4b1be97c53e507c124120681efde58e2c20ad3 /core/java/android | |
| parent | 6161eb3494837cb7031b940e02fcbf5449e5be77 (diff) | |
| parent | 1ce4b6d3c6cb5b2eb9c9d00472be12245db92427 (diff) | |
| download | frameworks_base-17de4b2a73996366ff3d7759793a6809654caebe.zip frameworks_base-17de4b2a73996366ff3d7759793a6809654caebe.tar.gz frameworks_base-17de4b2a73996366ff3d7759793a6809654caebe.tar.bz2 | |
Merge "remove usage of deprecated method setLatestEventInfo" into mnc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/Notification.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 96c6878..33a47b2 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -1331,11 +1331,14 @@ public class Notification implements Parcelable public Notification(Context context, int icon, CharSequence tickerText, long when, CharSequence contentTitle, CharSequence contentText, Intent contentIntent) { - this.when = when; - this.icon = icon; - this.tickerText = tickerText; - setLatestEventInfo(context, contentTitle, contentText, - PendingIntent.getActivity(context, 0, contentIntent, 0)); + new Builder(context) + .setWhen(when) + .setSmallIcon(icon) + .setTicker(tickerText) + .setContentTitle(contentTitle) + .setContentText(contentText) + .setContentIntent(PendingIntent.getActivity(context, 0, contentIntent, 0)) + .buildInto(this); } /** |
