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>
This commit is contained in:
@@ -22,9 +22,6 @@ import com.android.internal.widget.LockPatternUtils;
|
||||
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 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
*/
|
||||
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 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
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 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
|
||||
// the keyguard when they've released the lock
|
||||
mExternallyEnabled = true;
|
||||
mNeedToReshowWhenReenabled = false;
|
||||
setStatusBarExpandable(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user