Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10066,6 +10066,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10092,6 +10093,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10108,6 +10110,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String); api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10491,6 +10491,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10517,6 +10518,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10533,6 +10535,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String); api/test-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10079,6 +10079,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10105,6 +10106,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10122,6 +10124,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String); core/java/android/content/pm/ShortcutInfo.java +29 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.TaskStackBuilder; import android.content.ComponentName; import android.content.Context; import android.content.Intent; Loading Loading @@ -919,6 +920,19 @@ public final class ShortcutInfo implements Parcelable { return this; } /** * Sets multiple intents instead of a single intent. * * @see Builder#setIntent(Intent) * @see ShortcutInfo#getIntents() * @see Context#startActivities(Intent[]) * @see TaskStackBuilder */ @NonNull public Builder setIntents(@NonNull Intent[] intents) { throw new RuntimeException("NOT SUPPORTED YET"); } /** * "Rank" of a shortcut, which is a non-negative value that's used by the launcher app * to sort shortcuts. Loading Loading @@ -1084,7 +1098,7 @@ public final class ShortcutInfo implements Parcelable { } /** * Return the intent. * Return the intent. (Or the last intent set with {@link Builder#setIntents(Intent[])}. * * <p>Launcher applications <b>cannot</b> see the intent. If a {@link ShortcutInfo} is * obtained via {@link LauncherApps}, then this method will always return null. Loading @@ -1103,6 +1117,20 @@ public final class ShortcutInfo implements Parcelable { return intent; } /** * Return the intent set with {@link Builder#setIntents(Intent[])}. * * <p>Launcher applications <b>cannot</b> see the intents. If a {@link ShortcutInfo} is * obtained via {@link LauncherApps}, then this method will always return null. * Launchers can only start a shortcut intent with {@link LauncherApps#startShortcut}. * * @see Builder#setIntents(Intent[]) */ @Nullable public Intent getIntents() { throw new RuntimeException("NOT SUPPORTED YET"); } /** * Return "raw" intent, which is the original intent without the extras. * @hide Loading core/java/android/content/pm/ShortcutManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -613,6 +613,20 @@ public class ShortcutManager { } } /** * Return {@code true} when rate-limiting is active for the caller application. * * <p>See the class level javadoc for details. */ public boolean isRateLimitingActive() { try { return mService.getRemainingCallCount(mContext.getPackageName(), injectMyUserId()) == 0; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Return the max width for icons, in pixels. */ Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10066,6 +10066,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10092,6 +10093,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10108,6 +10110,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String);
api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10491,6 +10491,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10517,6 +10518,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10533,6 +10535,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String);
api/test-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -10079,6 +10079,7 @@ package android.content.pm { method public android.os.PersistableBundle getExtras(); method public java.lang.String getId(); method public android.content.Intent getIntent(); method public android.content.Intent getIntents(); method public long getLastChangedTimestamp(); method public java.lang.CharSequence getLongLabel(); method public java.lang.String getPackage(); Loading @@ -10105,6 +10106,7 @@ package android.content.pm { method public android.content.pm.ShortcutInfo.Builder setExtras(android.os.PersistableBundle); method public android.content.pm.ShortcutInfo.Builder setIcon(android.graphics.drawable.Icon); method public android.content.pm.ShortcutInfo.Builder setIntent(android.content.Intent); method public android.content.pm.ShortcutInfo.Builder setIntents(android.content.Intent[]); method public android.content.pm.ShortcutInfo.Builder setLongLabel(java.lang.CharSequence); method public android.content.pm.ShortcutInfo.Builder setRank(int); method public android.content.pm.ShortcutInfo.Builder setShortLabel(java.lang.CharSequence); Loading @@ -10122,6 +10124,7 @@ 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 boolean isRateLimitingActive(); method public void removeAllDynamicShortcuts(); method public void removeDynamicShortcuts(java.util.List<java.lang.String>); method public void reportShortcutUsed(java.lang.String);
core/java/android/content/pm/ShortcutInfo.java +29 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UserIdInt; import android.app.TaskStackBuilder; import android.content.ComponentName; import android.content.Context; import android.content.Intent; Loading Loading @@ -919,6 +920,19 @@ public final class ShortcutInfo implements Parcelable { return this; } /** * Sets multiple intents instead of a single intent. * * @see Builder#setIntent(Intent) * @see ShortcutInfo#getIntents() * @see Context#startActivities(Intent[]) * @see TaskStackBuilder */ @NonNull public Builder setIntents(@NonNull Intent[] intents) { throw new RuntimeException("NOT SUPPORTED YET"); } /** * "Rank" of a shortcut, which is a non-negative value that's used by the launcher app * to sort shortcuts. Loading Loading @@ -1084,7 +1098,7 @@ public final class ShortcutInfo implements Parcelable { } /** * Return the intent. * Return the intent. (Or the last intent set with {@link Builder#setIntents(Intent[])}. * * <p>Launcher applications <b>cannot</b> see the intent. If a {@link ShortcutInfo} is * obtained via {@link LauncherApps}, then this method will always return null. Loading @@ -1103,6 +1117,20 @@ public final class ShortcutInfo implements Parcelable { return intent; } /** * Return the intent set with {@link Builder#setIntents(Intent[])}. * * <p>Launcher applications <b>cannot</b> see the intents. If a {@link ShortcutInfo} is * obtained via {@link LauncherApps}, then this method will always return null. * Launchers can only start a shortcut intent with {@link LauncherApps#startShortcut}. * * @see Builder#setIntents(Intent[]) */ @Nullable public Intent getIntents() { throw new RuntimeException("NOT SUPPORTED YET"); } /** * Return "raw" intent, which is the original intent without the extras. * @hide Loading
core/java/android/content/pm/ShortcutManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -613,6 +613,20 @@ public class ShortcutManager { } } /** * Return {@code true} when rate-limiting is active for the caller application. * * <p>See the class level javadoc for details. */ public boolean isRateLimitingActive() { try { return mService.getRemainingCallCount(mContext.getPackageName(), injectMyUserId()) == 0; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Return the max width for icons, in pixels. */ Loading