use of com.android.keyguard.KeyguardSecurityModel.SecurityMode in project platform_frameworks_base by android.
the class KeyguardSecurityContainer method showPrimarySecurityScreen.
/**
* Shows the primary security screen for the user. This will be either the multi-selector
* or the user's security method.
* @param turningOff true if the device is being turned off
*/
void showPrimarySecurityScreen(boolean turningOff) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (DEBUG)
Log.v(TAG, "showPrimarySecurityScreen(turningOff=" + turningOff + ")");
showSecurityScreen(securityMode);
}
use of com.android.keyguard.KeyguardSecurityModel.SecurityMode in project platform_frameworks_base by android.
the class KeyguardSecurityContainer method showNextSecurityScreenOrFinish.
/**
* Shows the next security screen if there is one.
* @param authenticated true if the user entered the correct authentication
* @return true if keyguard is done
*/
boolean showNextSecurityScreenOrFinish(boolean authenticated) {
if (DEBUG)
Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
boolean finish = false;
boolean strongAuth = false;
if (mUpdateMonitor.getUserCanSkipBouncer(KeyguardUpdateMonitor.getCurrentUser())) {
finish = true;
} else if (SecurityMode.None == mCurrentSecuritySelection) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (SecurityMode.None == securityMode) {
// no security required
finish = true;
} else {
// switch to the alternate security view
showSecurityScreen(securityMode);
}
} else if (authenticated) {
switch(mCurrentSecuritySelection) {
case Pattern:
case Password:
case PIN:
strongAuth = true;
finish = true;
break;
case SimPin:
case SimPuk:
// Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (securityMode != SecurityMode.None || !mLockPatternUtils.isLockScreenDisabled(KeyguardUpdateMonitor.getCurrentUser())) {
showSecurityScreen(securityMode);
} else {
finish = true;
}
break;
default:
Log.v(TAG, "Bad security screen " + mCurrentSecuritySelection + ", fail safe");
showPrimarySecurityScreen(false);
break;
}
}
if (finish) {
mSecurityCallback.finish(strongAuth);
}
return finish;
}
use of com.android.keyguard.KeyguardSecurityModel.SecurityMode in project android_frameworks_base by DirtyUnicorns.
the class KeyguardSecurityContainer method showPrimarySecurityScreen.
/**
* Shows the primary security screen for the user. This will be either the multi-selector
* or the user's security method.
* @param turningOff true if the device is being turned off
*/
void showPrimarySecurityScreen(boolean turningOff) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (DEBUG)
Log.v(TAG, "showPrimarySecurityScreen(turningOff=" + turningOff + ")");
showSecurityScreen(securityMode);
}
use of com.android.keyguard.KeyguardSecurityModel.SecurityMode in project android_frameworks_base by ResurrectionRemix.
the class KeyguardSecurityContainer method showNextSecurityScreenOrFinish.
/**
* Shows the next security screen if there is one.
* @param authenticated true if the user entered the correct authentication
* @return true if keyguard is done
*/
boolean showNextSecurityScreenOrFinish(boolean authenticated) {
if (DEBUG)
Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
boolean finish = false;
boolean strongAuth = false;
if (mUpdateMonitor.getUserCanSkipBouncer(KeyguardUpdateMonitor.getCurrentUser())) {
finish = true;
} else if (SecurityMode.None == mCurrentSecuritySelection) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (SecurityMode.None == securityMode) {
// no security required
finish = true;
} else {
// switch to the alternate security view
showSecurityScreen(securityMode);
}
} else if (authenticated) {
switch(mCurrentSecuritySelection) {
case Pattern:
case Password:
case PIN:
strongAuth = true;
finish = true;
break;
case SimPin:
case SimPuk:
// Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (securityMode != SecurityMode.None || !mLockPatternUtils.isLockScreenDisabled(KeyguardUpdateMonitor.getCurrentUser())) {
showSecurityScreen(securityMode);
} else {
finish = true;
}
break;
default:
Log.v(TAG, "Bad security screen " + mCurrentSecuritySelection + ", fail safe");
showPrimarySecurityScreen(false);
break;
}
}
if (finish) {
mSecurityCallback.finish(strongAuth);
}
return finish;
}
use of com.android.keyguard.KeyguardSecurityModel.SecurityMode in project android_frameworks_base by crdroidandroid.
the class KeyguardSecurityContainer method showNextSecurityScreenOrFinish.
/**
* Shows the next security screen if there is one.
* @param authenticated true if the user entered the correct authentication
* @return true if keyguard is done
*/
boolean showNextSecurityScreenOrFinish(boolean authenticated) {
if (DEBUG)
Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
boolean finish = false;
boolean strongAuth = false;
if (mUpdateMonitor.getUserCanSkipBouncer(KeyguardUpdateMonitor.getCurrentUser())) {
finish = true;
} else if (SecurityMode.None == mCurrentSecuritySelection) {
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (SecurityMode.None == securityMode) {
// no security required
finish = true;
} else {
// switch to the alternate security view
showSecurityScreen(securityMode);
}
} else if (authenticated) {
switch(mCurrentSecuritySelection) {
case Pattern:
case Password:
case PIN:
strongAuth = true;
finish = true;
break;
case SimPin:
case SimPuk:
// Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
SecurityMode securityMode = mSecurityModel.getSecurityMode();
if (securityMode != SecurityMode.None || !mLockPatternUtils.isLockScreenDisabled(KeyguardUpdateMonitor.getCurrentUser())) {
showSecurityScreen(securityMode);
} else {
finish = true;
}
break;
default:
Log.v(TAG, "Bad security screen " + mCurrentSecuritySelection + ", fail safe");
showPrimarySecurityScreen(false);
break;
}
}
if (finish) {
mSecurityCallback.finish(strongAuth);
}
return finish;
}
Aggregations