diff --git a/res/values/strings.xml b/res/values/strings.xml
index 369210fb9aa..9b35f94d176 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7465,13 +7465,10 @@
Wipe and convert
- Reset ShortcutManager rate-limiting counters
+ Reset ShortcutManager rate-limiting
-
- Reset ShortcutManager rate-limiting?
-
-
- Reset ShortcutManager rate-limiting counters?
+
+ ShortcutManager rate-limiting has been reset
Control lock screen notifications
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index 29363ad4990..2288520f7cb 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -372,6 +372,10 @@
android:key="force_resizable_activities"
android:title="@string/force_resizable_activities"
android:summary="@string/force_resizable_activities_summary"/>
+
+
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 934e7522f1b..db6a373bea8 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -1911,7 +1911,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
} else if (preference == mWebViewMultiprocess) {
writeWebViewMultiprocessOptions();
} else if (SHORTCUT_MANAGER_RESET_KEY.equals(preference.getKey())) {
- confirmResetShortcutManagerThrottling();
+ resetShortcutManagerThrottling();
} else {
return super.onPreferenceTreeClick(preference);
}
@@ -2153,30 +2153,18 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
}
};
- private void confirmResetShortcutManagerThrottling() {
+ private void resetShortcutManagerThrottling() {
final IShortcutService service = IShortcutService.Stub.asInterface(
ServiceManager.getService(Context.SHORTCUT_SERVICE));
-
- DialogInterface.OnClickListener onClickListener = new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- if (which == DialogInterface.BUTTON_POSITIVE) {
- try {
- service.resetThrottling();
- } catch (RemoteException e) {
- }
- }
+ if (service != null) {
+ try {
+ service.resetThrottling();
+ Toast.makeText(getActivity(), R.string.reset_shortcut_manager_throttling_complete,
+ Toast.LENGTH_SHORT).show();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to reset rate limiting", e);
}
- };
-
- new AlertDialog.Builder(getActivity())
- .setTitle(R.string.confirm_reset_shortcut_manager_throttling_title)
- .setMessage(R.string.confirm_reset_shortcut_manager_throttling_message)
- .setPositiveButton(R.string.okay, onClickListener)
- .setNegativeButton(android.R.string.cancel, null)
- .create()
- .show();
-
+ }
}
private void updateOemUnlockSettingDescription() {