Loading services/java/com/android/server/DockObserver.java +18 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.ActivityManagerNative; import android.app.IActivityManager; import android.app.IUiModeManager; import android.app.KeyguardManager; import android.app.StatusBarManager; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.ActivityNotFoundException; Loading Loading @@ -71,6 +72,8 @@ class DockObserver extends UEventObserver { private boolean mKeyguardDisabled; private LockPatternUtils mLockPatternUtils; private StatusBarManager mStatusBarManager; // The broadcast receiver which receives the result of the ordered broadcast sent when // the dock state changes. The original ordered broadcast is sent with an initial result // code of RESULT_OK. If any of the registered broadcast receivers changes this value, e.g., Loading Loading @@ -234,6 +237,21 @@ class DockObserver extends UEventObserver { // Disabling the car mode clears the night mode. setMode(Configuration.UI_MODE_TYPE_NORMAL, MODE_NIGHT_NO); } if (mStatusBarManager == null) { mStatusBarManager = (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE); } // Fear not: StatusBarService manages a list of requests to disable // features of the status bar; these are ORed together to form the // active disabled list. So if (for example) the device is locked and // the status bar should be totally disabled, the calls below will // have no effect until the device is unlocked. if (mStatusBarManager != null) { mStatusBarManager.disable(enabled ? StatusBarManager.DISABLE_NOTIFICATION_TICKER : StatusBarManager.DISABLE_NONE); } } private void setMode(int modeType, int modeNight) throws RemoteException { Loading Loading
services/java/com/android/server/DockObserver.java +18 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.app.ActivityManagerNative; import android.app.IActivityManager; import android.app.IUiModeManager; import android.app.KeyguardManager; import android.app.StatusBarManager; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.content.ActivityNotFoundException; Loading Loading @@ -71,6 +72,8 @@ class DockObserver extends UEventObserver { private boolean mKeyguardDisabled; private LockPatternUtils mLockPatternUtils; private StatusBarManager mStatusBarManager; // The broadcast receiver which receives the result of the ordered broadcast sent when // the dock state changes. The original ordered broadcast is sent with an initial result // code of RESULT_OK. If any of the registered broadcast receivers changes this value, e.g., Loading Loading @@ -234,6 +237,21 @@ class DockObserver extends UEventObserver { // Disabling the car mode clears the night mode. setMode(Configuration.UI_MODE_TYPE_NORMAL, MODE_NIGHT_NO); } if (mStatusBarManager == null) { mStatusBarManager = (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE); } // Fear not: StatusBarService manages a list of requests to disable // features of the status bar; these are ORed together to form the // active disabled list. So if (for example) the device is locked and // the status bar should be totally disabled, the calls below will // have no effect until the device is unlocked. if (mStatusBarManager != null) { mStatusBarManager.disable(enabled ? StatusBarManager.DISABLE_NOTIFICATION_TICKER : StatusBarManager.DISABLE_NONE); } } private void setMode(int modeType, int modeNight) throws RemoteException { Loading