禁止状态栏下拉

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lb5761311/article/details/85261153

源码文件

frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
 public void disable(int state) {
 //add start
        state = state | StatusBarManager.DISABLE_NOTIFICATION_TICKER | StatusBarManager.DISABLE_NOTIFICATION_ICONS;
        //end
        final int old = mDisabled;
        final int diff = state ^ old;
        mDisabled = state;

        if (DEBUG) {
            Log.d(TAG, String.format("disable: 0x%08x -> 0x%08x (diff: 0x%08x)",
                old, state, diff));
        }

        StringBuilder flagdbg = new StringBuilder();
        flagdbg.append("disable: < ");
        flagdbg.append(((state & StatusBarManager.DISABLE_EXPAND) != 0) ? "EXPAND" : "expand");
        flagdbg.append(((diff  & StatusBarManager.DISABLE_EXPAND) != 0) ? "* " : " ");
public void addNotification(IBinder key, StatusBarNotification notification) {
        if (DEBUG) Log.d(TAG, "addNotification score=" + notification.getScore());
        Entry shadeEntry = createNotificationViews(key, notification);
        //add start
     //    if (shadeEntry == null) {
        if (shadeEntry != null) {
            return;
        }
        //end

猜你喜欢

转载自blog.csdn.net/lb5761311/article/details/85261153
今日推荐