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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java

Issue 2856343003: [Home] Update progress bar styles (Closed)
Patch Set: address comments Created 3 years, 7 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 | « chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java ('k') | 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/widget/bottomsheet/BottomSheet.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
index 48602af38b47d2ece5e6084edd9c66138dda557a..8ec038a33a6b18c0995a47bed79b17529a90bb4a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java
@@ -13,7 +13,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Region;
-import android.os.Build;
import android.support.annotation.IntDef;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
@@ -22,7 +21,6 @@ import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewGroup;
-import android.view.Window;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.FrameLayout;
@@ -37,7 +35,6 @@ import org.chromium.chrome.browser.TabLoadStatus;
import org.chromium.chrome.browser.firstrun.FirstRunStatus;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
import org.chromium.chrome.browser.ntp.NativePageFactory;
-import org.chromium.chrome.browser.ntp.NewTabPage;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.EmptyTabModelSelectorObserver;
import org.chromium.chrome.browser.tabmodel.TabModel;
@@ -479,32 +476,6 @@ public class BottomSheet
}
/**
- * Set the window's status bar color. On Android M and above, this will set the status bar color
- * to the default theme color with dark icons except in the case of the tab switcher and
- * incognito NTP. On Android versions < M, the status bar will always be black.
- * @param window The Android window.
- */
- public void setStatusBarColor(Window window) {
- Tab tab = getActiveTab();
- boolean isInOverviewMode = tab != null && tab.getActivity().isInOverviewMode();
- boolean isIncognitoNtp =
- tab != null && NewTabPage.isNTPUrl(tab.getUrl()) && tab.isIncognito();
- boolean isValidAndroidVersion = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
-
- int color = ApiCompatibilityUtils.getColor(getResources(), R.color.default_primary_color);
- setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
-
- // Special case the incognito NTP and the tab switcher.
- if (!isValidAndroidVersion || isIncognitoNtp || isInOverviewMode) {
- color = Color.BLACK;
- // The light status bar flag is always set above, meaning XORing that value with the
- // current flags will remove it.
- setSystemUiVisibility(getSystemUiVisibility() ^ View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
- }
- ApiCompatibilityUtils.setStatusBarColor(window, color);
- }
-
- /**
* @return Whether or not the toolbar Android View is hidden due to being scrolled off-screen.
*/
private boolean isToolbarAndroidViewHidden() {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/widget/ToolbarProgressBar.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698