Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/CustomNotificationBuilder.java

Issue 1388483002: Implement the Notification `timestamp` property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.notifications; 5 package org.chromium.chrome.browser.notifications;
6 6
7 import android.app.Notification; 7 import android.app.Notification;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.res.Resources; 9 import android.content.res.Resources;
10 import android.graphics.Bitmap; 10 import android.graphics.Bitmap;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bigView.setViewVisibility(R.id.small_icon_footer, View.VISIBLE); 116 bigView.setViewVisibility(R.id.small_icon_footer, View.VISIBLE);
117 } 117 }
118 118
119 NotificationCompat.Builder builder = new NotificationCompat.Builder(mCon text); 119 NotificationCompat.Builder builder = new NotificationCompat.Builder(mCon text);
120 builder.setTicker(mTickerText); 120 builder.setTicker(mTickerText);
121 builder.setSmallIcon(mSmallIconId); 121 builder.setSmallIcon(mSmallIconId);
122 builder.setContentIntent(mContentIntent); 122 builder.setContentIntent(mContentIntent);
123 builder.setDeleteIntent(mDeleteIntent); 123 builder.setDeleteIntent(mDeleteIntent);
124 builder.setDefaults(mDefaults); 124 builder.setDefaults(mDefaults);
125 builder.setVibrate(mVibratePattern); 125 builder.setVibrate(mVibratePattern);
126 builder.setWhen(mTimestamp);
126 builder.setContent(compactView); 127 builder.setContent(compactView);
127 128
128 // Some things are duplicated in the builder to ensure the notification shows correctly on 129 // Some things are duplicated in the builder to ensure the notification shows correctly on
129 // Wear devices and custom lock screens. 130 // Wear devices and custom lock screens.
130 builder.setContentTitle(mTitle); 131 builder.setContentTitle(mTitle);
131 builder.setContentText(mBody); 132 builder.setContentText(mBody);
132 builder.setSubText(mOrigin); 133 builder.setSubText(mOrigin);
133 builder.setLargeIcon(mLargeIcon); 134 builder.setLargeIcon(mLargeIcon);
134 for (Action action : mActions) { 135 for (Action action : mActions) {
135 builder.addAction(action); 136 builder.addAction(action);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, di splayMetrics)); 271 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, di splayMetrics));
271 } 272 }
272 273
273 /** 274 /**
274 * Whether to use the Material look and feel or fall back to Holo. 275 * Whether to use the Material look and feel or fall back to Holo.
275 */ 276 */
276 private static boolean useMaterial() { 277 private static boolean useMaterial() {
277 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; 278 return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
278 } 279 }
279 } 280 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderBase.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698