Use default encryption password if an accessibility service is enabled.

If accessibility is on and the user selectes a secure lock we use weaker
encryption to enable running accessibility layer at the time the user
authenticates. This change adds a warning message to the enable accessibility
service dialog if there is a secure lock and also adds a warning as a
summary for the secure lock in the lock chooser activity. Both warning
mention the weaker encryption to be used.

bug:17671790

Change-Id: Ib5cc9d3a78f751e18362bb9238fd2804c3b600f8
This commit is contained in:
Svetoslav
2014-09-29 18:15:45 -07:00
committed by Svetoslav Ganov
parent fc14e272aa
commit 5244844268
4 changed files with 51 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.R;
import com.android.settings.widget.ToggleSwitch;
import com.android.settings.widget.ToggleSwitch.OnBeforeCheckedChangeListener;
@@ -201,6 +202,17 @@ public class ToggleAccessibilityServicePreferenceFragment
View content = inflater.inflate(R.layout.enable_accessibility_service_dialog_content,
null);
TextView encryptionWarningView = (TextView) content.findViewById(
R.id.encryption_warning);
if (LockPatternUtils.isDeviceEncrypted()) {
String text = getString(R.string.enable_service_encryption_warning,
info.getResolveInfo().loadLabel(getPackageManager()));
encryptionWarningView.setText(text);
encryptionWarningView.setVisibility(View.VISIBLE);
} else {
encryptionWarningView.setVisibility(View.GONE);
}
TextView capabilitiesHeaderView = (TextView) content.findViewById(
R.id.capabilities_header);
capabilitiesHeaderView.setText(getString(R.string.capabilities_list_title,