From 339df0742c134f48495ac9feec168d58870a942f Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Mon, 11 Apr 2016 11:00:46 -0400 Subject: Guard against crash in RTL. Change-Id: Id692360cc66600a06a4353a8029440be422cc79f Fixes: 27927374 --- packages/SystemUI/src/com/android/systemui/qs/PageIndicator.java | 4 ++++ 1 file changed, 4 insertions(+) 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()); -- cgit v1.2.3-59-g8ed1b