FileDocCategorySizeDatePackage
StatusBarManager.javaAPI DocAndroid 1.5 API4163Wed May 06 22:41:54 BST 2009android.app

StatusBarManager

public class StatusBarManager extends Object
Allows an app to control the status bar.
hide

Fields Summary
public static final int
DISABLE_EXPAND
Flag for {@link #disable} to make the status bar not expandable. Unless you also set {@link #DISABLE_NOTIFICATIONS}, new notifications will continue to show.
public static final int
DISABLE_NOTIFICATION_ICONS
Flag for {@link #disable} to hide notification icons and ticker text.
public static final int
DISABLE_NOTIFICATION_ALERTS
Flag for {@link #disable} to disable incoming notification alerts. This will not block icons, but it will block sound, vibrating and other visual or aural notifications.
public static final int
DISABLE_NONE
Re-enable all of the status bar features that you've disabled.
private android.content.Context
mContext
private IStatusBar
mService
private android.os.IBinder
mToken
Constructors Summary
StatusBarManager(android.content.Context context)


      
        mContext = context;
        mService = IStatusBar.Stub.asInterface(
                ServiceManager.getService(Context.STATUS_BAR_SERVICE));
    
Methods Summary
public android.os.IBinderaddIcon(java.lang.String slot, int iconId, int iconLevel)

        try {
            return mService.addIcon(slot, mContext.getPackageName(), iconId, iconLevel);
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voidcollapse()
Collapse the status bar.

        try {
            mService.deactivate();
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voiddisable(int what)
Disable some features in the status bar. Pass the bitwise-or of the DISABLE_* flags. To re-enable everything, pass {@link #DISABLE_NONE}.

        try {
            mService.disable(what, mToken, mContext.getPackageName());
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voidexpand()
Expand the status bar.

        try {
            mService.activate();
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voidremoveIcon(android.os.IBinder key)

        try {
            mService.removeIcon(key);
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voidtoggle()
Toggle the status bar.

        try {
            mService.toggle();
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }
    
public voidupdateIcon(android.os.IBinder key, java.lang.String slot, int iconId, int iconLevel)

        try {
            mService.updateIcon(key, slot, mContext.getPackageName(), iconId, iconLevel);
        } catch (RemoteException ex) {
            // system process is dead anyway.
            throw new RuntimeException(ex);
        }