summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps/AllAppsTransitionController.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-09-14 16:46:32 -0700
committerTony Wickham <twickham@google.com>2016-09-28 14:16:11 -0700
commit9311387a227d7bd894d880b897fb80ca34b39405 (patch)
treedde5d216907e0a4930a366d1350997df9e093f0e /src/com/android/launcher3/allapps/AllAppsTransitionController.java
parentffad962092e2b42e336918c2f1e8f5ec48cc08a9 (diff)
downloadandroid_packages_apps_Trebuchet-9311387a227d7bd894d880b897fb80ca34b39405.tar.gz
android_packages_apps_Trebuchet-9311387a227d7bd894d880b897fb80ca34b39405.tar.bz2
android_packages_apps_Trebuchet-9311387a227d7bd894d880b897fb80ca34b39405.zip
Enable light status bar when top of wallpaper is light.
(Light status bar = dark icons) Bug: 29452834 Change-Id: I9f61a05d80158827761c8b62ab40fc50971e27a6
Diffstat (limited to 'src/com/android/launcher3/allapps/AllAppsTransitionController.java')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 1719b0594..fb15afecd 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -86,8 +86,6 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
private AnimatorSet mCurrentAnimation;
private boolean mNoIntercept;
- private boolean mLightStatusBar;
-
// Used in discovery bounce animation to provide the transition without workspace changing.
private boolean mIsTranslateWithoutWorkspace = false;
private AnimatorSet mDiscoBounceAnimation;
@@ -273,26 +271,14 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
}
private void updateLightStatusBar(float shift) {
- boolean enable = shift <= mStatusBarHeight / 2;
// Do not modify status bar on landscape as all apps is not full bleed.
if (mLauncher.getDeviceProfile().isVerticalBarLayout()) {
return;
}
- // Already set correctly
- if (mLightStatusBar == enable) {
- return;
- }
- int systemUiFlags = mLauncher.getWindow().getDecorView().getSystemUiVisibility();
- if (enable) {
- mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
-
- } else {
- mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- & ~(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR));
-
- }
- mLightStatusBar = enable;
+ // Use a light status bar (dark icons) if all apps is behind at least half of the status
+ // bar. If the status bar is already light due to wallpaper extraction, keep it that way.
+ boolean enable = shift <= mStatusBarHeight / 2 || mLauncher.shouldBeLightStatusBar();
+ mLauncher.setLightStatusBar(enable);
}
/**