Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c24a473 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix stealth mode for managed profiles"

parents 8a9c5795 bc3347fa
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -340,6 +340,7 @@ public class AuthContainerView extends LinearLayout
        mBackgroundView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
        mBackgroundView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);


        mCredentialView.setContainerView(this);
        mCredentialView.setContainerView(this);
        mCredentialView.setUserId(mConfig.mUserId);
        mCredentialView.setEffectiveUserId(mEffectiveUserId);
        mCredentialView.setEffectiveUserId(mEffectiveUserId);
        mCredentialView.setCredentialType(credentialType);
        mCredentialView.setCredentialType(credentialType);
        mCredentialView.setCallback(mCredentialCallback);
        mCredentialView.setCallback(mCredentialCallback);
+1 −1
Original line number Original line Diff line number Diff line
@@ -376,7 +376,7 @@ public class AuthController extends SystemUI implements CommandQueue.Callbacks,
        }
        }


        if (DEBUG) {
        if (DEBUG) {
            Log.d(TAG, "showDialog: " + args
            Log.d(TAG, "userId: " + userId
                    + " savedState: " + savedState
                    + " savedState: " + savedState
                    + " mCurrentDialog: " + mCurrentDialog
                    + " mCurrentDialog: " + mCurrentDialog
                    + " newDialog: " + newDialog
                    + " newDialog: " + newDialog
+3 −3
Original line number Original line Diff line number Diff line
@@ -95,12 +95,12 @@ public class AuthCredentialPatternView extends AuthCredentialView {
    }
    }


    @Override
    @Override
    protected void onFinishInflate() {
    protected void onAttachedToWindow() {
        super.onFinishInflate();
        super.onAttachedToWindow();
        mLockPatternView = findViewById(R.id.lockPattern);
        mLockPatternView = findViewById(R.id.lockPattern);
        mLockPatternView.setOnPatternListener(new UnlockPatternListener());
        mLockPatternView.setOnPatternListener(new UnlockPatternListener());
        mLockPatternView.setInStealthMode(
        mLockPatternView.setInStealthMode(
                !mLockPatternUtils.isVisiblePatternEnabled(mEffectiveUserId));
                !mLockPatternUtils.isVisiblePatternEnabled(mUserId));
        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
    }
    }
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,7 @@ public abstract class AuthCredentialView extends LinearLayout {
    protected AuthContainerView mContainerView;
    protected AuthContainerView mContainerView;
    protected Callback mCallback;
    protected Callback mCallback;
    protected AsyncTask<?, ?, ?> mPendingLockCheck;
    protected AsyncTask<?, ?, ?> mPendingLockCheck;
    protected int mUserId;
    protected int mEffectiveUserId;
    protected int mEffectiveUserId;
    protected ErrorTimer mErrorTimer;
    protected ErrorTimer mErrorTimer;


@@ -143,6 +144,10 @@ public abstract class AuthCredentialView extends LinearLayout {
        view.setText(text);
        view.setText(text);
    }
    }


    void setUserId(int userId) {
        mUserId = userId;
    }

    void setEffectiveUserId(int effectiveUserId) {
    void setEffectiveUserId(int effectiveUserId) {
        mEffectiveUserId = effectiveUserId;
        mEffectiveUserId = effectiveUserId;
    }
    }