User to confirm credentials if an accessibility service changes encryption.

When an accessibility service is enabled we are not using the user secure
lock when encrypting the data. If the latter is already used for encryption
we are decreasing the encryption level and therefore shall challenge the
user with their secure lock.

bug:17881324

Change-Id: If8905c05e20bc6bb6a6415e501871e5ad83f3d86
This commit is contained in:
Svetoslav
2014-10-16 14:44:25 -07:00
parent 4909c412fa
commit 3ea423ae0f
8 changed files with 103 additions and 15 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings;
import android.text.TextUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.PasswordEntryKeyboardHelper;
import com.android.internal.widget.PasswordEntryKeyboardView;
@@ -44,6 +45,9 @@ import android.widget.TextView.OnEditorActionListener;
public class ConfirmLockPassword extends SettingsActivity {
public static final String PACKAGE = "com.android.settings";
public static final String HEADER_TEXT = PACKAGE + ".ConfirmLockPattern.header";
public static class InternalActivity extends ConfirmLockPassword {
}
@@ -122,7 +126,15 @@ public class ConfirmLockPassword extends SettingsActivity {
mIsAlpha = DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC == storedQuality
|| DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC == storedQuality
|| DevicePolicyManager.PASSWORD_QUALITY_COMPLEX == storedQuality;
mHeaderText.setText(getDefaultHeader());
Intent intent = getActivity().getIntent();
if (intent != null) {
CharSequence headerMessage = intent.getCharSequenceExtra(HEADER_TEXT);
if (TextUtils.isEmpty(headerMessage)) {
headerMessage = getString(getDefaultHeader());
}
mHeaderText.setText(headerMessage);
}
final Activity activity = getActivity();
mKeyboardHelper = new PasswordEntryKeyboardHelper(activity,