summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2014-01-02 00:07:50 +0100
committerPaul Kocialkowski <contact@paulk.fr>2014-01-02 00:07:50 +0100
commit18be6aac9f9d828df0921b4fe576c2ade40d7c88 (patch)
tree45b49eca6082eb5ebb04dce2ff7c15ce700c190c
parent0071a841f73f571c29fb1651a88fda8b9bce70ca (diff)
downloadpackages_apps_settings-18be6aac9f9d828df0921b4fe576c2ade40d7c88.zip
packages_apps_settings-18be6aac9f9d828df0921b4fe576c2ade40d7c88.tar.gz
packages_apps_settings-18be6aac9f9d828df0921b4fe576c2ade40d7c88.tar.bz2
Get rid of market application installation proposition
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--src/com/android/settings/AccessibilitySettings.java70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index 91a6487..586cccb 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -75,13 +75,8 @@ import java.util.Set;
*/
public class AccessibilitySettings extends SettingsPreferenceFragment implements DialogCreatable,
Preference.OnPreferenceChangeListener {
- private static final String DEFAULT_SCREENREADER_MARKET_LINK =
- "market://search?q=pname:com.google.android.marvin.talkback";
-
private static final float LARGE_FONT_SCALE = 1.3f;
- private static final String SYSTEM_PROPERTY_MARKET_URL = "ro.screenreader.market";
-
// Timeout before we update the services if packages are added/removed since
// the AccessibilityManagerService has to do that processing first to
// generate
@@ -90,9 +85,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
private static final char ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR = ':';
- private static final String KEY_INSTALL_ACCESSIBILITY_SERVICE_OFFERED_ONCE =
- "key_install_accessibility_service_offered_once";
-
// Preference categories
private static final String SERVICES_CATEGORY = "services_category";
private static final String SYSTEM_CATEGORY = "system_category";
@@ -202,8 +194,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
loadInstalledServices();
updateAllPreferences();
- offerInstallAccessibilitySerivceOnce();
-
mSettingsPackageMonitor.register(getActivity(), getActivity().getMainLooper(), false);
mSettingsContentObserver.register(getContentResolver());
RotationPolicy.registerRotationPolicyListener(getActivity(),
@@ -573,66 +563,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
}
}
- private void offerInstallAccessibilitySerivceOnce() {
- // There is always one preference - if no services it is just a message.
- if (mServicesCategory.getPreference(0) != mNoServicesMessagePreference) {
- return;
- }
- SharedPreferences preferences = getActivity().getPreferences(Context.MODE_PRIVATE);
- final boolean offerInstallService = !preferences.getBoolean(
- KEY_INSTALL_ACCESSIBILITY_SERVICE_OFFERED_ONCE, false);
- if (offerInstallService) {
- String screenreaderMarketLink = SystemProperties.get(
- SYSTEM_PROPERTY_MARKET_URL,
- DEFAULT_SCREENREADER_MARKET_LINK);
- Uri marketUri = Uri.parse(screenreaderMarketLink);
- Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
-
- if (getPackageManager().resolveActivity(marketIntent, 0) == null) {
- // Don't show the dialog if no market app is found/installed.
- return;
- }
-
- preferences.edit().putBoolean(KEY_INSTALL_ACCESSIBILITY_SERVICE_OFFERED_ONCE,
- true).commit();
- // Notify user that they do not have any accessibility
- // services installed and direct them to Market to get TalkBack.
- showDialog(DIALOG_ID_NO_ACCESSIBILITY_SERVICES);
- }
- }
-
- @Override
- public Dialog onCreateDialog(int dialogId) {
- switch (dialogId) {
- case DIALOG_ID_NO_ACCESSIBILITY_SERVICES:
- return new AlertDialog.Builder(getActivity())
- .setTitle(R.string.accessibility_service_no_apps_title)
- .setMessage(R.string.accessibility_service_no_apps_message)
- .setPositiveButton(android.R.string.ok,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- // dismiss the dialog before launching
- // the activity otherwise
- // the dialog removal occurs after
- // onSaveInstanceState which
- // triggers an exception
- removeDialog(DIALOG_ID_NO_ACCESSIBILITY_SERVICES);
- String screenreaderMarketLink = SystemProperties.get(
- SYSTEM_PROPERTY_MARKET_URL,
- DEFAULT_SCREENREADER_MARKET_LINK);
- Uri marketUri = Uri.parse(screenreaderMarketLink);
- Intent marketIntent = new Intent(Intent.ACTION_VIEW,
- marketUri);
- startActivity(marketIntent);
- }
- })
- .setNegativeButton(android.R.string.cancel, null)
- .create();
- default:
- return null;
- }
- }
-
private void loadInstalledServices() {
List<AccessibilityServiceInfo> installedServiceInfos =
AccessibilityManager.getInstance(getActivity())