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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java

Issue 1327193004: Let WebRTC notification not show "touch to return" in custom tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java
index 1fcc1750d2aefbecc8b24ca0720e72c16e3b016f..344de2d9d3105173b7121b37b60390a0b10c89cc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationService.java
@@ -159,24 +159,26 @@ public class MediaCaptureNotificationService extends Service {
notificationIconId = R.drawable.webrtc_audio;
}
- String contentText = mContext.getResources().getString(notificationContentTextId) + ". "
- + mContext.getResources().getString(
- R.string.media_notification_link_text, url);
-
NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
.setAutoCancel(false)
.setOngoing(true)
.setContentTitle(mContext.getString(R.string.app_name))
- .setContentText(contentText)
.setSmallIcon(notificationIconId)
.setLocalOnly(true);
+ StringBuilder contentText = new StringBuilder(
+ mContext.getResources().getString(notificationContentTextId)).append('.');
Intent tabIntent = Tab.createBringTabToFrontIntent(notificationId);
if (tabIntent != null) {
PendingIntent contentIntent = PendingIntent.getActivity(
mContext, notificationId, tabIntent, 0);
builder.setContentIntent(contentIntent);
+ contentText.append(url);
+ } else {
+ contentText.append(
+ mContext.getResources().getString(R.string.media_notification_link_text, url));
}
+ builder.setContentText(contentText);
Notification notification = new NotificationCompat.BigTextStyle(builder)
.bigText(contentText).build();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698