Android 5.1系统禁止通知状态栏下拉

之前看了网上很多修改,感觉太繁琐,修改代码太多,最后感觉还是自己找找,看能不能简单点

diff --git a/android/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/android/frameworks/base/packa
old mode 100644
new mode 100755
index 7cbf13f..7b0dc81
--- a/android/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/android/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -23,6 +23,7 @@ import android.util.EventLog;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.accessibility.AccessibilityEvent;
+import android.os.SystemProperties;
 
 import com.android.systemui.EventLogTags;
 import com.android.systemui.R;
@@ -94,9 +95,7 @@ public class PhoneStatusBarView extends PanelBar {
     @Override
     public PanelView selectPanelForTouch(MotionEvent touch) {
         // No double swiping. If either panel is open, nothing else can be pulled down.
-        return mNotificationPanel.getExpandedHeight() > 0
-                ? null
-                : mNotificationPanel;
+        return null;
     }
 
     @Override
实际上就是修改一行代码。。

如果你还想屏蔽通知栏的信息,可以在往下看看

diff --git a/android/frameworks/base/packages/SystemUI/res/layout/status_bar.xml b/android/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
old mode 100644
new mode 100755
index 245c128..795b4b0
--- a/android/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
+++ b/android/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
@@ -50,6 +50,8 @@
 
         


你可能感兴趣的:(SystemUI)