diff options
author | Jim Miller <jaggies@google.com> | 2014-10-18 03:32:10 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2014-10-18 03:32:10 +0000 |
commit | 225fc3a83dc5c4d8d5fa3ccb91b3d1793af98397 (patch) | |
tree | add85c756ffbe98a8100e0590809f862f916f953 /src | |
parent | 880e49da165ebdf764d6d4b43fc0f04ce4536d2e (diff) | |
parent | 8baf92359b0661b067de85e73d275f0421fc768a (diff) | |
download | packages_apps_Settings-225fc3a83dc5c4d8d5fa3ccb91b3d1793af98397.tar.gz packages_apps_Settings-225fc3a83dc5c4d8d5fa3ccb91b3d1793af98397.tar.bz2 packages_apps_Settings-225fc3a83dc5c4d8d5fa3ccb91b3d1793af98397.zip |
am 3d3c8703: am 456b866c: am aa037675: Fix bad string in EncryptionInterstitial automerge: c8b2003
automerge: 8baf923
* commit '8baf92359b0661b067de85e73d275f0421fc768a':
Fix bad string in EncryptionInterstitial
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/EncryptionInterstitial.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/com/android/settings/EncryptionInterstitial.java b/src/com/android/settings/EncryptionInterstitial.java index 2433f2621..e836aeded 100644 --- a/src/com/android/settings/EncryptionInterstitial.java +++ b/src/com/android/settings/EncryptionInterstitial.java @@ -21,6 +21,9 @@ import com.android.settings.R; import com.android.settings.SettingsActivity; import com.android.settings.SettingsPreferenceFragment; +import java.util.List; + +import android.accessibilityservice.AccessibilityServiceInfo; import android.app.AlertDialog; import android.app.Dialog; import android.app.admin.DevicePolicyManager; @@ -158,9 +161,23 @@ public class EncryptionInterstitial extends SettingsActivity { messageId = R.string.encrypt_talkback_dialog_message_password; break; } + + + List<AccessibilityServiceInfo> list = + AccessibilityManager.getInstance(getActivity()) + .getEnabledAccessibilityServiceList( + AccessibilityServiceInfo.FEEDBACK_ALL_MASK); + final CharSequence exampleAccessibility; + if (list.isEmpty()) { + // This should never happen. But we shouldn't crash + exampleAccessibility = ""; + } else { + exampleAccessibility = list.get(0).getResolveInfo() + .loadLabel(getPackageManager()); + } return new AlertDialog.Builder(getActivity()) .setTitle(titleId) - .setMessage(messageId) + .setMessage(getString(messageId, exampleAccessibility)) .setCancelable(true) .setPositiveButton(android.R.string.ok, this) .setNegativeButton(android.R.string.cancel, this) |