Merge "Extend all apps pull up activation area to page indicator view b/29752599" into ub-launcher3-calgary
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index 84bd88d..45d0b52 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -53,7 +53,8 @@
Launcher launcher = Launcher.getLauncher(context);
int width = launcher.getDeviceProfile().availableWidthPx;
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP &&
- this instanceof AllAppsContainerView && !launcher.getDeviceProfile().isLandscape) {
+ this instanceof AllAppsContainerView &&
+ !launcher.getDeviceProfile().isVerticalBarLayout()) {
mHorizontalPadding = 0;
} else {
mHorizontalPadding = DeviceProfile.getContainerPadding(context, width);
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 5245509..b2f24be 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -227,4 +227,8 @@
setBackground(mBackground);
}
}
+
+ public int getBackgroundDrawableAlpha() {
+ return Color.alpha(mBackgroundColor);
+ }
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 585c520..4e4e87c 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -241,7 +241,7 @@
if (!mLauncher.isAllAppsVisible()) {
mLauncher.tryAndUpdatePredictedApps();
- mHotseatBackgroundAlpha = mHotseat.getBackground().getAlpha() / 255f;
+ mHotseatBackgroundAlpha = mHotseat.getBackgroundDrawableAlpha() / 255f;
mHotseat.setBackgroundTransparent(true /* transparent */);
mAppsView.setVisibility(View.VISIBLE);
mAppsView.getContentView().setVisibility(View.VISIBLE);
@@ -272,18 +272,26 @@
private void updateLightStatusBar(float progress) {
boolean enable = (progress < 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();
+ // SYSTEM_UI_FLAG_LIGHT_NAV_BAR == SYSTEM_UI_FLAG_LIGHT_STATUS_BAR << 1
+ // Use proper constant once API is submitted.
if (enable) {
mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+ | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
+ | (View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR << 1));
} else {
mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+ & ~(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
+ |(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR << 1)));
}
mLightStatusBar = enable;