Move status bar disabling from KeyguardViewMediator to Phone app
This allows us to disable the keyguard while docked without disabling the status bar.
Change-Id: I06ff48dcb1922a26e356faee0aefa91b7c871e6a
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
index f8bc3e67..3ae1dee 100644
--- a/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
+++ b/policy/com/android/internal/policy/impl/KeyguardViewMediator.java
@@ -22,9 +22,6 @@
import android.app.ActivityManagerNative;
import android.app.AlarmManager;
import android.app.PendingIntent;
-import android.app.StatusBarManager;
-import static android.app.StatusBarManager.DISABLE_EXPAND;
-import static android.app.StatusBarManager.DISABLE_NONE;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -160,11 +157,6 @@
*/
private PowerManager.WakeLock mWakeAndHandOff;
- /**
- * Used to disable / reenable status bar expansion.
- */
- private StatusBarManager mStatusBarManager;
-
private KeyguardViewManager mKeyguardViewManager;
// these are protected by synchronized (this)
@@ -349,14 +341,12 @@
if (DEBUG) Log.d(TAG, "remembering to reshow, hiding keyguard, "
+ "disabling status bar expansion");
mNeedToReshowWhenReenabled = true;
- setStatusBarExpandable(false);
hideLocked();
} else if (enabled && mNeedToReshowWhenReenabled) {
// reenabled after previously hidden, reshow
if (DEBUG) Log.d(TAG, "previously hidden, reshowing, reenabling "
+ "status bar expansion");
mNeedToReshowWhenReenabled = false;
- setStatusBarExpandable(true);
if (mExitSecureCallback != null) {
if (DEBUG) Log.d(TAG, "onKeyguardExitResult(false), resetting");
@@ -411,15 +401,6 @@
}
}
-
- private void setStatusBarExpandable(boolean isExpandable) {
- if (mStatusBarManager == null) {
- mStatusBarManager =
- (StatusBarManager) mContext.getSystemService(Context.STATUS_BAR_SERVICE);
- }
- mStatusBarManager.disable(isExpandable ? DISABLE_NONE : DISABLE_EXPAND);
- }
-
/**
* Is the keyguard currently showing?
*/
@@ -744,7 +725,6 @@
// the keyguard when they've released the lock
mExternallyEnabled = true;
mNeedToReshowWhenReenabled = false;
- setStatusBarExpandable(true);
}
}
}