am 12b239e6: Merge "Fix SetupWizard black screen issue for EDU devices" into lmp-mr1-dev
* commit '12b239e6d39ad5a35f68e7bcd5f644a793b5cb74': Fix SetupWizard black screen issue for EDU devices
This commit is contained in:
@@ -364,7 +364,7 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
// only force lock screen in case of missing sim if user hasn't
|
// only force lock screen in case of missing sim if user hasn't
|
||||||
// gone through setup wizard
|
// gone through setup wizard
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (!mUpdateMonitor.isDeviceProvisioned()) {
|
if (shouldWaitForProvisioning()) {
|
||||||
if (!isShowing()) {
|
if (!isShowing()) {
|
||||||
if (DEBUG) Log.d(TAG, "ICC_ABSENT isn't showing,"
|
if (DEBUG) Log.d(TAG, "ICC_ABSENT isn't showing,"
|
||||||
+ " we need to show the keyguard since the "
|
+ " we need to show the keyguard since the "
|
||||||
@@ -493,8 +493,7 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
mLockPatternUtils.setCurrentUser(ActivityManager.getCurrentUser());
|
mLockPatternUtils.setCurrentUser(ActivityManager.getCurrentUser());
|
||||||
|
|
||||||
// Assume keyguard is showing (unless it's disabled) until we know for sure...
|
// Assume keyguard is showing (unless it's disabled) until we know for sure...
|
||||||
mShowing = (mUpdateMonitor.isDeviceProvisioned() || mLockPatternUtils.isSecure())
|
mShowing = !shouldWaitForProvisioning() && !mLockPatternUtils.isLockScreenDisabled();
|
||||||
&& !mLockPatternUtils.isLockScreenDisabled();
|
|
||||||
|
|
||||||
mStatusBarKeyguardViewManager = new StatusBarKeyguardViewManager(mContext,
|
mStatusBarKeyguardViewManager = new StatusBarKeyguardViewManager(mContext,
|
||||||
mViewMediatorCallback, mLockPatternUtils);
|
mViewMediatorCallback, mLockPatternUtils);
|
||||||
@@ -783,7 +782,7 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
public void verifyUnlock(IKeyguardExitCallback callback) {
|
public void verifyUnlock(IKeyguardExitCallback callback) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (DEBUG) Log.d(TAG, "verifyUnlock");
|
if (DEBUG) Log.d(TAG, "verifyUnlock");
|
||||||
if (!mUpdateMonitor.isDeviceProvisioned()) {
|
if (shouldWaitForProvisioning()) {
|
||||||
// don't allow this api when the device isn't provisioned
|
// don't allow this api when the device isn't provisioned
|
||||||
if (DEBUG) Log.d(TAG, "ignoring because device isn't provisioned");
|
if (DEBUG) Log.d(TAG, "ignoring because device isn't provisioned");
|
||||||
try {
|
try {
|
||||||
@@ -873,7 +872,7 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
* was suppressed by an app that disabled the keyguard or we haven't been provisioned yet.
|
* was suppressed by an app that disabled the keyguard or we haven't been provisioned yet.
|
||||||
*/
|
*/
|
||||||
public boolean isInputRestricted() {
|
public boolean isInputRestricted() {
|
||||||
return mShowing || mNeedToReshowWhenReenabled || !mUpdateMonitor.isDeviceProvisioned();
|
return mShowing || mNeedToReshowWhenReenabled || shouldWaitForProvisioning();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -905,14 +904,13 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
// if the setup wizard hasn't run yet, don't show
|
// if the setup wizard hasn't run yet, don't show
|
||||||
final boolean requireSim = !SystemProperties.getBoolean("keyguard.no_require_sim",
|
final boolean requireSim = !SystemProperties.getBoolean("keyguard.no_require_sim",
|
||||||
false);
|
false);
|
||||||
final boolean provisioned = mUpdateMonitor.isDeviceProvisioned();
|
|
||||||
final IccCardConstants.State state = mUpdateMonitor.getSimState();
|
final IccCardConstants.State state = mUpdateMonitor.getSimState();
|
||||||
final boolean lockedOrMissing = state.isPinLocked()
|
final boolean lockedOrMissing = state.isPinLocked()
|
||||||
|| ((state == IccCardConstants.State.ABSENT
|
|| ((state == IccCardConstants.State.ABSENT
|
||||||
|| state == IccCardConstants.State.PERM_DISABLED)
|
|| state == IccCardConstants.State.PERM_DISABLED)
|
||||||
&& requireSim);
|
&& requireSim);
|
||||||
|
|
||||||
if (!lockedOrMissing && !provisioned) {
|
if (!lockedOrMissing && shouldWaitForProvisioning()) {
|
||||||
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because device isn't provisioned"
|
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because device isn't provisioned"
|
||||||
+ " and the sim is not locked or missing");
|
+ " and the sim is not locked or missing");
|
||||||
return;
|
return;
|
||||||
@@ -935,6 +933,10 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
showLocked(options);
|
showLocked(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean shouldWaitForProvisioning() {
|
||||||
|
return !mUpdateMonitor.isDeviceProvisioned() && !isSecure();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dismiss the keyguard through the security layers.
|
* Dismiss the keyguard through the security layers.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user