NavigationBarTransitions的作用
BarTransitions 有以下7中模式:
public static final int MODE_TRANSPARENT = 0; 全透明public static final int MODE_SEMI_TRANSPARENT = 1; 半透明public static final int MODE_TRANSLUCENT = 2;public static final int MODE_LIGHTS_OUT = 3;public static final int MODE_OPAQUE = 4; 不透明public static final int MODE_WARNING = 5;public static final int MODE_LIGHTS_OUT_TRANSPARENT = 6;
开机报错
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object referenceat com.android.systemui.statusbar.phone.BarTransitions.transitionTo(BarTransitions.java:112)at com.android.systemui.statusbar.phone.StatusBar.checkBarMode(StatusBar.java:2468)at com.android.systemui.statusbar.phone.StatusBar.checkBarModes(StatusBar.java:2445)at com.android.systemui.statusbar.phone.StatusBar.lambda$makeStatusBarView$3(StatusBar.java:1091)at com.android.systemui.statusbar.phone.StatusBar.lambda$makeStatusBarView$3$StatusBar(Unknown Source:0)at com.android.systemui.statusbar.phone.-$$Lambda$StatusBar$TPJyILujZ88K3rKFmgzHGHpbtLo.onFragmentViewCreated(Unknown Source:2)at com.android.systemui.fragments.FragmentHostManager.lambda$onFragmentViewCreated$0(FragmentHostManager.java:140)at com.android.systemui.fragments.-$$Lambda$FragmentHostManager$OsWXqtcfRJZBAvEEeN8CG6EN5T4.accept(Unknown Source:6)at java.util.ArrayList.forEach(ArrayList.java:1262)at com.android.systemui.fragments.FragmentHostManager.onFragmentViewCreated(FragmentHostManager.java:140)at com.android.systemui.fragments.FragmentHostManager.access$000(FragmentHostManager.java:49)at com.android.systemui.fragments.FragmentHostManager$1.onFragmentViewCreated(FragmentHostManager.java:80)at android.app.FragmentManagerImpl.dispatchOnFragmentViewCreated(FragmentManager.java:3342)at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1314)at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742)at android.os.Handler.handleCallback(Handler.java:938)at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:223)at android.app.ActivityThread.main(ActivityThread.java:7677)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
开机报错
java.lang.IllegalStateException: restoreAppearanceAndTransientState mNavigationBarMode : 0at com.android.systemui.statusbar.phone.NavigationBarFragment.restoreAppearanceAndTransientState(NavigationBarFragment.java:830)at com.android.systemui.statusbar.NavigationBarController.lambda$createNavigationBar$0(NavigationBarController.java:156)at com.android.systemui.statusbar.NavigationBarController.lambda$createNavigationBar$0$NavigationBarController(Unknown Source:0)at com.android.systemui.statusbar.-$$Lambda$NavigationBarController$oyTONslWMHHQSXiga3Vs0njIek8.onFragmentViewCreated(Unknown Source:14)at com.android.systemui.fragments.FragmentHostManager.lambda$onFragmentViewCreated$0(FragmentHostManager.java:140)at com.android.systemui.fragments.-$$Lambda$FragmentHostManager$OsWXqtcfRJZBAvEEeN8CG6EN5T4.accept(Unknown Source:6)at java.util.ArrayList.forEach(ArrayList.java:1262)at com.android.systemui.fragments.FragmentHostManager.onFragmentViewCreated(FragmentHostManager.java:140)at com.android.systemui.fragments.FragmentHostManager.access$000(FragmentHostManager.java:49)at com.android.systemui.fragments.FragmentHostManager$1.onFragmentViewCreated(FragmentHostManager.java:80)at android.app.FragmentManagerImpl.dispatchOnFragmentViewCreated(FragmentManager.java:3342)at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1314)at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742)at android.os.Handler.handleCallback(Handler.java:938)at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:223)at android.app.ActivityThread.main(ActivityThread.java:7677)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)