Add more null checks for page indicators.

Change-Id: Id86d4827c9079abfb236f956e531f0e29edfc54e
This commit is contained in:
Tony Wickham
2016-05-19 11:27:55 -07:00
parent c64cfdd8fa
commit fea0a5f629
2 changed files with 5 additions and 2 deletions
+3 -1
View File
@@ -1337,7 +1337,9 @@ public class Workspace extends PagedView
// different effects based on device performance. On at least one relatively high-end
// device I've tried, translating the launcher causes things to get quite laggy.
setTranslationAndAlpha(mLauncher.getSearchDropTargetBar(), transX, alpha);
setTranslationAndAlpha(getPageIndicator().getView(), transX, alpha);
if (getPageIndicator() != null) {
setTranslationAndAlpha(getPageIndicator().getView(), transX, alpha);
}
setTranslationAndAlpha(getChildAt(getCurrentPage()), transX, alpha);
setTranslationAndAlpha(mLauncher.getHotseat(), transX, alpha);
@@ -357,7 +357,8 @@ public class WorkspaceStateTransitionAnimation {
final ViewGroup overviewPanel = mLauncher.getOverviewPanel();
final View hotseat = mLauncher.getHotseat();
final View pageIndicator = mWorkspace.getPageIndicator().getView();
final View pageIndicator = mWorkspace.getPageIndicator() == null ? null
: mWorkspace.getPageIndicator().getView();
if (animated) {
LauncherViewPropertyAnimator scale = new LauncherViewPropertyAnimator(mWorkspace);
scale.scaleX(mNewScale)