summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-06-12 19:28:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-12 19:28:54 +0000
commit17de4b2a73996366ff3d7759793a6809654caebe (patch)
treeea4b1be97c53e507c124120681efde58e2c20ad3 /core/java/android
parent6161eb3494837cb7031b940e02fcbf5449e5be77 (diff)
parent1ce4b6d3c6cb5b2eb9c9d00472be12245db92427 (diff)
downloadframeworks_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.java13
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);
}
/**