diff --git a/core/java/android/content/pm/ShortcutInfo.java b/core/java/android/content/pm/ShortcutInfo.java index 7408c34538ab8..fbe35a65befb3 100644 --- a/core/java/android/content/pm/ShortcutInfo.java +++ b/core/java/android/content/pm/ShortcutInfo.java @@ -34,18 +34,20 @@ import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +// TODO Enhance javadoc /** - * TODO Enhance javadoc * - * Represents a shortcut form an application. + * Represents a shortcut from an application. * - * Notes... - * - If an {@link Icon} is of a resource, then we'll just persist the package name and resource ID. + *
Notes about icons: + *
This field is intended for a concise description of a shortcut displayed under + * an icon. The recommend max length is 10 characters. */ @NonNull public Builder setTitle(@NonNull String title) { @@ -380,6 +385,9 @@ public class ShortcutInfo implements Parcelable { /** * Sets the text of a shortcut. This is an optional field. + * + *
This field is intended to be more descriptive than the shortcut title. + * The recommend max length is 25 characters. */ @NonNull public Builder setText(@NonNull String text) { diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java index b247f65c94c3f..e4a98b5f37e36 100644 --- a/core/java/android/content/pm/ShortcutManager.java +++ b/core/java/android/content/pm/ShortcutManager.java @@ -19,15 +19,13 @@ import android.annotation.NonNull; import android.content.Context; import android.os.RemoteException; import android.os.UserHandle; -import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import java.util.List; +// TODO Enhance javadoc /** - * TODO Enhance javadoc - * * {@link ShortcutManager} manages shortcuts created by applications. * *
An applications can use {@link #getRateLimitResetTime()} to get the next reset time. + *
An application can use {@link #getRateLimitResetTime()} to get the next reset time. + * + *
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* *