1. 程式人生 > >禁止狀態列下拉

禁止狀態列下拉

原始碼檔案

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