From 8478aba1a2bbe1bcbb6b05824e4f21f58d79ebce Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 31 Jul 2015 09:17:20 -0400 Subject: Fix SysUI crash on device boot. Bug: 22869066 Change-Id: I55ab64c430899ebc20bfc8a8e4d1e2a7cd12f0cd --- .../statusbar/phone/NavigationBarView.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index ed49f39..59cf2bf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -370,16 +370,18 @@ public class NavigationBarView extends LinearLayout { mLayoutTransitionsEnabled = enabled; ViewGroup navButtons = (ViewGroup) mCurrentView.findViewById(R.id.nav_buttons); LayoutTransition lt = navButtons.getLayoutTransition(); - if (enabled) { - lt.enableTransitionType(LayoutTransition.APPEARING); - lt.enableTransitionType(LayoutTransition.DISAPPEARING); - lt.enableTransitionType(LayoutTransition.CHANGE_APPEARING); - lt.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING); - } else { - lt.disableTransitionType(LayoutTransition.APPEARING); - lt.disableTransitionType(LayoutTransition.DISAPPEARING); - lt.disableTransitionType(LayoutTransition.CHANGE_APPEARING); - lt.disableTransitionType(LayoutTransition.CHANGE_DISAPPEARING); + if (lt != null) { + if (enabled) { + lt.enableTransitionType(LayoutTransition.APPEARING); + lt.enableTransitionType(LayoutTransition.DISAPPEARING); + lt.enableTransitionType(LayoutTransition.CHANGE_APPEARING); + lt.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING); + } else { + lt.disableTransitionType(LayoutTransition.APPEARING); + lt.disableTransitionType(LayoutTransition.DISAPPEARING); + lt.disableTransitionType(LayoutTransition.CHANGE_APPEARING); + lt.disableTransitionType(LayoutTransition.CHANGE_DISAPPEARING); + } } } -- cgit v1.1