禁用Android下拉状态栏主要就是禁用SystemUI部分中的状态通知部分,系统默认是三个按钮,可以删除关于三键的包不编译 具体修改如下: diff --git a/base/core/res/res/values/config.xml b/base/core/res/res/values/config.xml index c1e3026ee..31b4ee2ff 100644 --- a/base/core/res/res/values/config.xml +++ b/base/core/res/res/values/config.xml @@ -3232,7 +3232,7 @@ 0: 3 button mode (back, home, overview buttons) 1: 2 button mode (back, home buttons + swipe up for overview) 2: gestures only for back, home and overview --> - <integer name="config_navBarInteractionMode">0</integer> + <integer name="config_navBarInteractionMode">2</integer> <!-- Controls whether the nav bar can move from the bottom to the side in landscape. Only applies if the device display is not square. --> diff --git a/base/core/res/res/values/dimens.xml b/base/core/res/res/values/dimens.xml index d165930d3..3c585a502 100644 --- a/base/core/res/res/values/dimens.xml +++ b/base/core/res/res/values/dimens.xml @@ -46,9 +46,9 @@ <!-- Total height of QQS with two rows to fit media player (quick_qs_offset_height + 176) --> <dimen name="quick_qs_total_height_with_media">224dp</dimen> <!-- Height of the bottom navigation / system bar. --> - <dimen name="navigation_bar_height">48dp</dimen> + <dimen name="navigation_bar_height">0dp</dimen> <!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height --> - <dimen name="navigation_bar_height_landscape">48dp</dimen> + <dimen name="navigation_bar_height_landscape">0dp</dimen> <!-- Width of the navigation bar when it is placed vertically on the screen --> <dimen name="navigation_bar_width">48dp</dimen> <!-- How much we expand the touchable region of the status bar below the notch to catch touches diff --git a/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 75f4809d7..d0f221b72 100644 --- a/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/base/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -2048,6 +2048,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { + " --> flags=0x" + Integer.toHexString(flags)); } + flags = StatusBarManager.DISABLE_EXPAND; mStatusBarManager.disable(flags); } } diff --git a/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index a4a58194a..b3c43fcda 100644 --- a/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -1183,7 +1183,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd @ShadeViewRefactor(RefactorComponent.LAYOUT_ALGORITHM) private void setMaxLayoutHeight(int maxLayoutHeight) { - mMaxLayoutHeight = maxLayoutHeight; + mMaxLayoutHeight = 0; mShelf.setMaxLayoutHeight(maxLayoutHeight); updateAlgorithmHeightAndPadding(); } @@ -2962,8 +2962,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd } else { mTopPaddingOverflow = 0; } - setTopPadding(topPadding, animate && !mKeyguardBypassController.getBypassEnabled()); - setExpandedHeight(mExpandedHeight); + //setTopPadding(topPadding, animate && !mKeyguardBypassController.getBypassEnabled()); + //setExpandedHeight(mExpandedHeight); + setTopPadding(-500,animate); } @ShadeViewRefactor(RefactorComponent.COORDINATOR) diff --git a/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java index e03db2c8b..66b39b304 100644 --- a/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java +++ b/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java @@ -187,7 +187,7 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue if ((state1 & DISABLE_NOTIFICATION_ICONS) != 0) { hideNotificationIconArea(animate); } else { - showNotificationIconArea(animate); + hideNotificationIconArea(animate); } } // The clock may have already been hidden, but we might want to shift its diff --git a/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index 53cbf02e5..f646abb4e 100644 --- a/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -1268,7 +1268,7 @@ public class NotificationPanelViewController extends PanelViewController { if (!isFullyCollapsed()) { handleQsDown(event); } - if (!mQ>**pandImmediate && mQsTracking) { + if (!mKeyguardShowing && !mQ>**pandImmediate && mQsTracking) { onQsTouch(event); if (!mConflictingQ>**pansionGesture) { return true; @@ -1496,6 +1496,9 @@ public class NotificationPanelViewController extends PanelViewController { } private void setQ>**panded(boolean expanded) { + if (mKeyguardShowing) { + return; + } boolean changed = mQ>**panded != expanded; if (changed) { mQ>**panded = expanded; @@ -1921,7 +1924,7 @@ public class NotificationPanelViewController extends PanelViewController { && mKeyguardBypassController.getBypassEnabled())) { return false; } - View header = mKeyguardShowing || mQs == null ? mKeyguardStatusBar : mQs.getHeader(); + View header = /*mKeyguardShowing ? mKeyguardStatusBar :*/ mQs.getHeader(); final boolean onHeader = x >= mQsFrame.getX() && x <= mQsFrame.getX() + mQsFrame.getWidth() diff --git a/base/packages/overlays/Android.mk b/base/packages/overlays/Android.mk index 999ab0802..0df96069f 100644 --- a/base/packages/overlays/Android.mk +++ b/base/packages/overlays/Android.mk @@ -72,7 +72,6 @@ LOCAL_REQUIRED_MODULES := \ IconShapeTaperedRectOverlay \ IconShapeTeardropOverlay \ IconShapeVesselOverlay \ - NavigationBarMode3ButtonOverlay \ NavigationBarModeGesturalOverlay \ NavigationBarModeGesturalOverlayNarrowBack \ NavigationBarModeGesturalOverlayWideBack \ 参考https://blog.csdn.net/baidu_41666295/article/details/125130188 |
|小黑屋|
飞凌嵌入式
( 冀ICP备12004394号-1 )
GMT+8, 2025-6-16 22:30
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.