diff --git a/api/current.txt b/api/current.txt index 3a30749d83484..1121d9ffeec6e 100644 --- a/api/current.txt +++ b/api/current.txt @@ -10113,8 +10113,6 @@ package android.content.pm { method public java.util.List getManifestShortcuts(); method public int getMaxShortcutCountPerActivity(); method public java.util.List getPinnedShortcuts(); - method public long getRateLimitResetTime(); - method public int getRemainingCallCount(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List); method public void reportShortcutUsed(java.lang.String); diff --git a/api/system-current.txt b/api/system-current.txt index 76aeb2be49641..7f51406d96b79 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -10538,8 +10538,6 @@ package android.content.pm { method public java.util.List getManifestShortcuts(); method public int getMaxShortcutCountPerActivity(); method public java.util.List getPinnedShortcuts(); - method public long getRateLimitResetTime(); - method public int getRemainingCallCount(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List); method public void reportShortcutUsed(java.lang.String); diff --git a/api/test-current.txt b/api/test-current.txt index 6b8f7d51b2c03..8d824e1c8145c 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -10127,8 +10127,6 @@ package android.content.pm { method public java.util.List getManifestShortcuts(); method public int getMaxShortcutCountPerActivity(); method public java.util.List getPinnedShortcuts(); - method public long getRateLimitResetTime(); - method public int getRemainingCallCount(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List); method public void reportShortcutUsed(java.lang.String); diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java index 7b3c487172635..1af63a01ce2bc 100644 --- a/core/java/android/content/pm/ShortcutManager.java +++ b/core/java/android/content/pm/ShortcutManager.java @@ -63,24 +63,6 @@ import java.util.List; * published, existing shortcuts with the same ID will be updated. Note this may include a * pinned shortcut. * - *

Rate limiting

- * - * Calls to {@link #setDynamicShortcuts(List)}, {@link #addDynamicShortcuts(List)}, - * and {@link #updateShortcuts(List)} from background applications will be - * rate-limited. An application can call these methods at most - * {@link #getRemainingCallCount()} times until the rate-limiting counter is reset, - * which happens at a certain time every day. - * - *

An application can use {@link #getRateLimitResetTime()} to get the next reset time. - * - *

Foreground applications (i.e. ones with a foreground activity or a foreground services) - * will not be throttled. Also, when an application comes to foreground, - * {@link #getRemainingCallCount()} will be reset to the initial value. - * - *

For testing purposes, use "Developer Options" (found in the Settings menu) to reset the - * internal rate-limiting counter. Automated tests can use the following ADB shell command to - * achieve the same effect:

- *
adb shell cmd shortcut reset-throttling
* *

Backup and Restore

* @@ -328,6 +310,8 @@ public class ShortcutManager { * before the rate limit counter is reset. * * @see #getRateLimitResetTime() + * + * @hide */ public int getRemainingCallCount() { try { @@ -342,6 +326,8 @@ public class ShortcutManager { * * @see #getRemainingCallCount() * @see System#currentTimeMillis() + * + * @hide */ public long getRateLimitResetTime() { try {