Fix Confirm/Choose Credentials strings related to profile

The messages in ConfirmDeviceCredentials have been updated to
inform the user that the pattern/pin/password to be entered is
the profile one.

The strings in the confirmation dialog when the user removes
the lock have also been updated.

Ideally we would have a parametrized approach to strings here,
but capitalization makes it a hard problem.

Bug: 26706338, 26709116
Change-Id: I9f5508d6f449f9e572d65e5b2dcb15cca23832b3
This commit is contained in:
Clara Bayarri
2016-01-22 14:59:24 +00:00
parent cc8d37a4c6
commit 34ec5f97fe
4 changed files with 99 additions and 19 deletions

View File

@@ -23,6 +23,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.SystemClock;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.view.LayoutInflater;
import android.view.View;
@@ -279,9 +280,13 @@ public class ConfirmLockPattern extends ConfirmDeviceCredentialBaseActivity {
}
if (mDetailsText != null) {
mDetailsTextView.setText(mDetailsText);
} else {
} else if (!Utils.isManagedProfile(
UserManager.get(getActivity()), mEffectiveUserId)) {
mDetailsTextView.setText(
R.string.lockpassword_confirm_your_pattern_generic);
} else {
mDetailsTextView.setText(
R.string.lockpassword_confirm_your_pattern_generic_profile);
}
mErrorTextView.setText("");