Prevent all apps transition NPE

am: f7e5e374fe

Change-Id: Iaa0bd1a97bda2c64cd6b887fcdd3e5502007d8c7
This commit is contained in:
Hyunyoung Song
2016-06-28 19:38:44 +00:00
committed by android-build-merger
3 changed files with 11 additions and 2 deletions
@@ -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);
+4
View File
@@ -227,4 +227,8 @@ public class Hotseat extends FrameLayout
setBackground(mBackground);
}
}
public int getBackgroundDrawableAlpha() {
return Color.alpha(mBackgroundColor);
}
}
@@ -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;