summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2017-03-08 09:11:51 -0500
committer Jason Monk <jmonk@google.com> 2017-03-08 09:11:51 -0500
commit9f1422d04a9ccef9ebeec65b42e9684672b3052a (patch)
treefb424e8f90c3f2ad552a1daac1b3e71819422a36
parent137b460e5fb2e4426504ad5315688f2fd71b7354 (diff)
Protect against crash while sysui is initing
Sometimes when switching users not all the views are there yet, but we will get another layout callback once they are, and can update our animators then. Change-Id: I029839e5c69c8c441cf89b0536a90e223dc35180 Fixes: 35949496 Test: Switch users
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 3337090fcd53..a30b03b9a411 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -175,7 +175,8 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
View view = mQs.getView();
if (count < mNumQuickTiles && mAllowFancy) {
// Quick tiles.
- com.android.systemui.plugins.qs.QSTileView quickTileView = mQuickQsPanel.getTileView(tile);
+ QSTileView quickTileView = mQuickQsPanel.getTileView(tile);
+ if (quickTileView == null) continue;
lastX = loc1[0];
getRelativePosition(loc1, quickTileView.getIcon().getIconView(), view);