Android 屏蔽导航栏和下拉栏

--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -951,12 +951,13 @@ public class StatusBar extends SystemUI implements DemoMode,
             boolean showNav = mWindowManagerService.hasNavigationBar();
             if (DEBUG) Log.v(TAG, "hasNavigationBar=" + showNav);
             if (showNav) {
            //  createNavigationBar();//屏蔽导航栏
             }
         } catch (RemoteException ex) {
             // no window manager? good luck with that
         }
+        mDevicePolicyManager.setStatusBarDisabled(new ComponentName(mContext,StatusBar.class),true);//屏蔽下拉栏

SystemUI虚拟导航键加载流程解析-----Android 8.1平台SystemUI虚拟导航键加载流程解析_郑-new-spring的博客-CSDN博客

你可能感兴趣的:(android,java,开发语言)