diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java | 22 |
1 files 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); + } } } |