summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-06-28 12:16:47 -0700
committerHyunyoung Song <hyunyoungs@google.com>2016-06-28 12:27:41 -0700
commitf7e5e374feeb7a5b6fe5166085c545e445bf6b72 (patch)
treeec3ec96f27c4dcf19cb7fafefbfe419af3a24db0 /src/com/android
parent4a582162bc22f1141c5c1a68741e8609c4f7d54d (diff)
downloadandroid_packages_apps_Trebuchet-f7e5e374feeb7a5b6fe5166085c545e445bf6b72.tar.gz
android_packages_apps_Trebuchet-f7e5e374feeb7a5b6fe5166085c545e445bf6b72.tar.bz2
android_packages_apps_Trebuchet-f7e5e374feeb7a5b6fe5166085c545e445bf6b72.zip
Prevent all apps transition NPE
b/29643291 b/29642263 > Also do not change status bar when landscape mode Change-Id: I1e44af8e031856a50a7413ad297c437245e8b2aa
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher3/BaseContainerView.java3
-rw-r--r--src/com/android/launcher3/Hotseat.java4
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java6
3 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index 84bd88dc4..45d0b5243 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -53,7 +53,8 @@ public abstract class BaseContainerView extends FrameLayout {
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 5245509ed..b2f24bec5 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -227,4 +227,8 @@ public class Hotseat extends FrameLayout
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 ba4d38ccb..2c5a34258 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -239,7 +239,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
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);
@@ -270,6 +270,10 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
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;