Merge "Fix stealth mode for managed profiles"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3c24a473f8
@@ -340,6 +340,7 @@ public class AuthContainerView extends LinearLayout
|
||||
mBackgroundView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
|
||||
|
||||
mCredentialView.setContainerView(this);
|
||||
mCredentialView.setUserId(mConfig.mUserId);
|
||||
mCredentialView.setEffectiveUserId(mEffectiveUserId);
|
||||
mCredentialView.setCredentialType(credentialType);
|
||||
mCredentialView.setCallback(mCredentialCallback);
|
||||
|
||||
@@ -376,7 +376,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "showDialog: " + args
|
||||
Log.d(TAG, "userId: " + userId
|
||||
+ " savedState: " + savedState
|
||||
+ " mCurrentDialog: " + mCurrentDialog
|
||||
+ " newDialog: " + newDialog
|
||||
|
||||
@@ -95,12 +95,12 @@ public class AuthCredentialPatternView extends AuthCredentialView {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mLockPatternView = findViewById(R.id.lockPattern);
|
||||
mLockPatternView.setOnPatternListener(new UnlockPatternListener());
|
||||
mLockPatternView.setInStealthMode(
|
||||
!mLockPatternUtils.isVisiblePatternEnabled(mEffectiveUserId));
|
||||
!mLockPatternUtils.isVisiblePatternEnabled(mUserId));
|
||||
mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ public abstract class AuthCredentialView extends LinearLayout {
|
||||
protected AuthContainerView mContainerView;
|
||||
protected Callback mCallback;
|
||||
protected AsyncTask<?, ?, ?> mPendingLockCheck;
|
||||
protected int mUserId;
|
||||
protected int mEffectiveUserId;
|
||||
protected ErrorTimer mErrorTimer;
|
||||
|
||||
@@ -143,6 +144,10 @@ public abstract class AuthCredentialView extends LinearLayout {
|
||||
view.setText(text);
|
||||
}
|
||||
|
||||
void setUserId(int userId) {
|
||||
mUserId = userId;
|
||||
}
|
||||
|
||||
void setEffectiveUserId(int effectiveUserId) {
|
||||
mEffectiveUserId = effectiveUserId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user