Merge \"Hide more shortcut APIs\" into nyc-mr1-dev
am: 07e234c9d7
Change-Id: If18c62359352c928e2b36c42563d5223c517964e
This commit is contained in:
@@ -10108,8 +10108,6 @@ package android.content.pm {
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
|
||||
method public int getMaxShortcutCountPerActivity();
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
|
||||
method public long getRateLimitResetTime();
|
||||
method public int getRemainingCallCount();
|
||||
method public void removeAllDynamicShortcuts();
|
||||
method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
|
||||
method public void reportShortcutUsed(java.lang.String);
|
||||
|
||||
@@ -10533,8 +10533,6 @@ package android.content.pm {
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
|
||||
method public int getMaxShortcutCountPerActivity();
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
|
||||
method public long getRateLimitResetTime();
|
||||
method public int getRemainingCallCount();
|
||||
method public void removeAllDynamicShortcuts();
|
||||
method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
|
||||
method public void reportShortcutUsed(java.lang.String);
|
||||
|
||||
@@ -10122,8 +10122,6 @@ package android.content.pm {
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getManifestShortcuts();
|
||||
method public int getMaxShortcutCountPerActivity();
|
||||
method public java.util.List<android.content.pm.ShortcutInfo> getPinnedShortcuts();
|
||||
method public long getRateLimitResetTime();
|
||||
method public int getRemainingCallCount();
|
||||
method public void removeAllDynamicShortcuts();
|
||||
method public void removeDynamicShortcuts(java.util.List<java.lang.String>);
|
||||
method public void reportShortcutUsed(java.lang.String);
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
* <h3>Rate limiting</h3>
|
||||
*
|
||||
* Calls to {@link #setDynamicShortcuts(List)}, {@link #addDynamicShortcuts(List)},
|
||||
* and {@link #updateShortcuts(List)} from <b>background applications</b> 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.
|
||||
*
|
||||
* <p>An application can use {@link #getRateLimitResetTime()} to get the next reset time.
|
||||
*
|
||||
* <p>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.
|
||||
*
|
||||
* <p>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:</p>
|
||||
* <pre>adb shell cmd shortcut reset-throttling</pre>
|
||||
*
|
||||
* <h3>Backup and Restore</h3>
|
||||
*
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user