Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Disable pull-down status bar

Hello,

I'm trying to disable the behaviour that allows the user to touch on the notification/status bar at the top and drag it down to reveal some settings. Can anyone point me in the right direction of where this could be disabled, so that the user can just see the notification/status bar, but not use it to change settings etc.?

Many Thanks

  • The closest solution I found is using EXPAND_STATUS_BAR permission, the link with the information about it is:

    http://developer.android.com/reference/android/Manifest.permission.html

    and for the System's UI the file that grants this permission is:

    ./4AJ20/mydroid/frameworks/base/packages/SystemUI/AndroidManifest.xml

    it is line

        <uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />

    I tried removing it and recompiling this directory, the modified files are:

    Install: out/target/product/blaze/system/app/SystemUI.apk
    Install: out/target/product/blaze/data/app/SystemUITests.apk

    This is in JB release, I checked the same for ICS and GB, the permission is defined for both in:

    ./mydroid/framework/base/core/res/AndroidManifest.xml

    and checked in the same functions in:

    ./mydroid/frameworks/base/services/java/com/android/server/StatusBarManagerService.java

    but I compiled it in JB and replaced only the SystemUI.apk using adb install, but it is still enabled, maybe it is needed to rebuild the full FS, or it is applicable only to Tablets or depending the used system configuration. Then really it is not a defined solution only a suggestion to check.

  • Hi Manuel , thanks for replying.

    Your method looks good, I will try it soon!

    In the mean time I had got a method that works, but it is probably not an elegant solution:

    In - frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

    I commented the contents of "updateExpandedViewPos", which did what I needed and prevents the pulldown menu from appearing if dragged or clicked.


    Of course you may need to change the file you edit depending on Tablet/Phone configuration.

  • Hi,

    I notice that in some system applications like Phone, this is being achieved by

    ./src/com/android/phone/IccPanel.java

    mStatusBarManager = (StatusBarManager) appGetSystemService(Context.STATUS_BAR_SERVICE);

    mStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND)

    ./AndroidManifest.xml

    <uses.permission android:name="android.permission.STATUS_BAR" />

    You can try adding this code to Launcher2 or your home application. I have not tested this.