diff options
author | Tarun Nainani <tnainani@codeaurora.org> | 2015-11-20 20:34:18 -0800 |
---|---|---|
committer | jrizzoli <joey@cyanogenmoditalia.it> | 2015-12-03 19:55:53 +0100 |
commit | fb9c05fe2f0412680ec276947786785b1a9de37d (patch) | |
tree | dabbf248324abb452fccd6a7dd25f9690734fb88 /src/com/android | |
parent | 91723debca9aadfbccb250588a34dcdc6a6a2776 (diff) | |
download | android_packages_apps_Gello-fb9c05fe2f0412680ec276947786785b1a9de37d.tar.gz android_packages_apps_Gello-fb9c05fe2f0412680ec276947786785b1a9de37d.tar.bz2 android_packages_apps_Gello-fb9c05fe2f0412680ec276947786785b1a9de37d.zip |
Fix compiling m42 with sdk 23
Change-Id: Id99349169c138d714b26340b3baa6c9b664ea111
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/browser/WebStorageSizeManager.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/browser/WebStorageSizeManager.java b/src/com/android/browser/WebStorageSizeManager.java index 0a6a514a..457c2be0 100644 --- a/src/com/android/browser/WebStorageSizeManager.java +++ b/src/com/android/browser/WebStorageSizeManager.java @@ -26,6 +26,7 @@ import android.content.Context; import android.content.Intent; import android.os.StatFs; import android.preference.PreferenceActivity; +import android.support.v4.app.NotificationCompat; import android.util.Log; import android.webkit.WebStorage; @@ -407,16 +408,19 @@ public class WebStorageSizeManager { WebsiteSettingsFragment.class.getName()); PendingIntent contentIntent = PendingIntent.getActivity(mContext, 0, intent, 0); - Notification notification = new Notification(icon, title, when); - notification.setLatestEventInfo(mContext, title, text, contentIntent); - notification.flags |= Notification.FLAG_AUTO_CANCEL; - // Fire away. - String ns = Context.NOTIFICATION_SERVICE; + + NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext) + .setContentTitle(title) + .setContentIntent(contentIntent) + .setContentText(text) + .setSmallIcon(icon) + .setAutoCancel(true); + NotificationManager mgr = - (NotificationManager) mContext.getSystemService(ns); + (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); if (mgr != null) { mLastOutOfSpaceNotificationTime = System.currentTimeMillis(); - mgr.notify(OUT_OF_SPACE_ID, notification); + mgr.notify(OUT_OF_SPACE_ID, builder.build()); } } } |