@Implements(value=android.content.pm.ShortcutManager.class, minSdk=25) public class ShadowShortcutManager extends Object
Constructor | Description |
---|---|
ShadowShortcutManager() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
addDynamicShortcuts(List<ShortcutInfo> shortcutInfoList) |
|
protected Intent |
createShortcutResultIntent(ShortcutInfo shortcut) |
|
protected void |
disableShortcuts(List<String> shortcutIds) |
|
protected void |
disableShortcuts(List<String> shortcutIds,
CharSequence unused) |
|
protected void |
enableShortcuts(List<String> shortcutIds) |
|
protected List<ShortcutInfo> |
getDynamicShortcuts() |
|
protected int |
getIconMaxHeight() |
|
protected int |
getIconMaxWidth() |
|
protected List<ShortcutInfo> |
getManifestShortcuts() |
|
protected int |
getMaxShortcutCountPerActivity() |
|
protected List<ShortcutInfo> |
getPinnedShortcuts() |
|
protected List<ShortcutInfo> |
getShortcuts(int matchFlags) |
In Robolectric, ShadowShortcutManager doesn't perform any caching so long lived shortcuts are
returned on place of shortcuts cached when shown in notifications.
|
protected boolean |
isRateLimitingActive() |
|
protected boolean |
isRequestPinShortcutSupported() |
|
protected void |
pushDynamicShortcut(ShortcutInfo shortcut) |
In Robolectric, ShadowShortcutManager doesn't handle rate limiting or shortcut count limits.
|
protected void |
removeAllDynamicShortcuts() |
|
protected void |
removeDynamicShortcuts(List<String> shortcutIds) |
|
protected void |
reportShortcutUsed(String shortcutId) |
|
protected boolean |
requestPinShortcut(ShortcutInfo shortcut,
IntentSender resultIntent) |
|
protected boolean |
setDynamicShortcuts(List<ShortcutInfo> shortcutInfoList) |
|
void |
setIconMaxHeight(int height) |
Sets the value returned by
getIconMaxHeight() . |
void |
setIconMaxWidth(int width) |
Sets the value returned by
getIconMaxWidth() . |
void |
setIsRequestPinShortcutSupported(boolean isRequestPinShortcutSupported) |
|
void |
setManifestShortcuts(List<ShortcutInfo> manifestShortcuts) |
Sets the value returned by
getManifestShortcuts() . |
void |
setMaxShortcutCountPerActivity(int value) |
Sets the value returned by
getMaxShortcutCountPerActivity() . |
protected boolean |
updateShortcuts(List<ShortcutInfo> shortcutInfoList) |
@Implementation protected boolean addDynamicShortcuts(List<ShortcutInfo> shortcutInfoList)
@Implementation(minSdk=26) protected Intent createShortcutResultIntent(ShortcutInfo shortcut)
@Implementation protected void disableShortcuts(List<String> shortcutIds)
@Implementation protected void disableShortcuts(List<String> shortcutIds, CharSequence unused)
@Implementation protected void enableShortcuts(List<String> shortcutIds)
@Implementation protected List<ShortcutInfo> getDynamicShortcuts()
@Implementation protected int getIconMaxHeight()
@Implementation protected int getIconMaxWidth()
public void setIconMaxHeight(int height)
getIconMaxHeight()
.public void setIconMaxWidth(int width)
getIconMaxWidth()
.@Implementation protected List<ShortcutInfo> getManifestShortcuts()
public void setManifestShortcuts(List<ShortcutInfo> manifestShortcuts)
getManifestShortcuts()
.@Implementation protected int getMaxShortcutCountPerActivity()
public void setMaxShortcutCountPerActivity(int value)
getMaxShortcutCountPerActivity()
.@Implementation protected List<ShortcutInfo> getPinnedShortcuts()
@Implementation protected boolean isRateLimitingActive()
@Implementation(minSdk=26) protected boolean isRequestPinShortcutSupported()
public void setIsRequestPinShortcutSupported(boolean isRequestPinShortcutSupported)
@Implementation protected void removeAllDynamicShortcuts()
@Implementation protected void removeDynamicShortcuts(List<String> shortcutIds)
@Implementation protected void reportShortcutUsed(String shortcutId)
@Implementation(minSdk=26) protected boolean requestPinShortcut(ShortcutInfo shortcut, IntentSender resultIntent)
@Implementation protected boolean setDynamicShortcuts(List<ShortcutInfo> shortcutInfoList)
@Implementation protected boolean updateShortcuts(List<ShortcutInfo> shortcutInfoList)
@Implementation(minSdk=30) protected List<ShortcutInfo> getShortcuts(int matchFlags)
@Implementation(minSdk=30) protected void pushDynamicShortcut(ShortcutInfo shortcut)
addDynamicShortcuts(List)
but with only one
ShortcutInfo
.