summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2016-04-11 11:00:46 -0400
committer Jason Monk <jmonk@google.com> 2016-04-11 11:00:46 -0400
commit339df0742c134f48495ac9feec168d58870a942f (patch)
tree9f35bc5b73a521e7f7f41f7f67a05c6eaa19948e
parent726959bf765b5aa4a43c5b62149a72fba7ffac57 (diff)
Guard against crash in RTL.
Change-Id: Id692360cc66600a06a4353a8029440be422cc79f Fixes: 27927374
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
index ba07bf4414c1..5cb46ac22889 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java
@@ -118,6 +118,10 @@ public class PageIndicator extends ViewGroup {
}
ImageView first = (ImageView) getChildAt(firstIndex);
ImageView second = (ImageView) getChildAt(secondIndex);
+ if (second == null) {
+ // Weird state where number of pages must not have propagated yet.
+ return;
+ }
// Lay the two views on top of each other.
second.setTranslationX(first.getX() - second.getX());