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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java

Issue 2654003007: [Android] Enable Ad Hoc RemoteViews in CCT Bottom Bar (Closed)
Patch Set: Created 3 years, 11 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/customtabs/CustomTabBottomBarDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
index 3332351168190dd896ece8da05fc60ac3705b4b7..c4a69187eb16967ca4ba82adbffdd275a814f890 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabBottomBarDelegate.java
@@ -120,8 +120,6 @@ class CustomTabBottomBarDelegate implements FullscreenListener {
*/
public boolean updateRemoteViews(RemoteViews remoteViews, int[] clickableIDs,
PendingIntent pendingIntent) {
- // Update only makes sense if we are already showing a RemoteViews.
- if (mDataProvider.getBottomBarRemoteViews() == null) return false;
REMOTE_VIEWS_UPDATED.record();
if (remoteViews == null) {
if (mBottomBarView == null) return false;
@@ -132,7 +130,7 @@ class CustomTabBottomBarDelegate implements FullscreenListener {
// TODO: investigate updating the RemoteViews without replacing the entire hierarchy.
mClickableIDs = clickableIDs;
mClickPendingIntent = pendingIntent;
- getBottomBarView().removeViewAt(1);
+ if (getBottomBarView().getChildCount() > 1) getBottomBarView().removeViewAt(1);
showRemoteViews(remoteViews);
}
return true;
« 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