Package org.robolectric.shadows
Class ShadowShortcutManager
java.lang.Object
org.robolectric.shadows.ShadowShortcutManager
@Implements(value=android.content.pm.ShortcutManager.class,
            minSdk=25)
public class ShadowShortcutManager
extends Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanaddDynamicShortcuts(List<ShortcutInfo> shortcutInfoList) protected IntentcreateShortcutResultIntent(ShortcutInfo shortcut) protected voiddisableShortcuts(List<String> shortcutIds) protected voiddisableShortcuts(List<String> shortcutIds, CharSequence unused) protected voidenableShortcuts(List<String> shortcutIds) protected List<ShortcutInfo>protected intprotected intprotected List<ShortcutInfo>protected intprotected List<ShortcutInfo>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 booleanprotected booleanprotected voidpushDynamicShortcut(ShortcutInfo shortcut) In Robolectric, ShadowShortcutManager doesn't handle rate limiting or shortcut count limits.protected voidprotected voidremoveDynamicShortcuts(List<String> shortcutIds) protected voidremoveLongLivedShortcuts(List<String> shortcutIds) No-op on Robolectric.protected voidreportShortcutUsed(String shortcutId) protected booleanrequestPinShortcut(ShortcutInfo shortcut, IntentSender resultIntent) protected booleansetDynamicShortcuts(List<ShortcutInfo> shortcutInfoList) voidsetIconMaxHeight(int height) Sets the value returned bygetIconMaxHeight().voidsetIconMaxWidth(int width) Sets the value returned bygetIconMaxWidth().voidsetIsRequestPinShortcutSupported(boolean isRequestPinShortcutSupported) voidsetManifestShortcuts(List<ShortcutInfo> manifestShortcuts) Sets the value returned bygetManifestShortcuts().voidsetMaxShortcutCountPerActivity(int value) Sets the value returned bygetMaxShortcutCountPerActivity().protected booleanupdateShortcuts(List<ShortcutInfo> shortcutInfoList) protected voidupdateShortcutVisibility(String packageName, byte[] certificate, boolean visible) No-op on Robolectric.
- 
Constructor Details- 
ShadowShortcutManagerpublic ShadowShortcutManager()
 
- 
- 
Method Details- 
addDynamicShortcuts
- 
createShortcutResultIntent
- 
disableShortcuts
- 
disableShortcuts
- 
enableShortcuts
- 
getDynamicShortcuts
- 
getIconMaxHeight
- 
getIconMaxWidth
- 
setIconMaxHeightpublic void setIconMaxHeight(int height) Sets the value returned bygetIconMaxHeight().
- 
setIconMaxWidthpublic void setIconMaxWidth(int width) Sets the value returned bygetIconMaxWidth().
- 
getManifestShortcuts
- 
setManifestShortcutsSets the value returned bygetManifestShortcuts().
- 
getMaxShortcutCountPerActivity
- 
setMaxShortcutCountPerActivitypublic void setMaxShortcutCountPerActivity(int value) Sets the value returned bygetMaxShortcutCountPerActivity().
- 
getPinnedShortcuts
- 
isRateLimitingActive
- 
isRequestPinShortcutSupported
- 
setIsRequestPinShortcutSupportedpublic void setIsRequestPinShortcutSupported(boolean isRequestPinShortcutSupported) 
- 
removeAllDynamicShortcuts
- 
removeDynamicShortcuts
- 
reportShortcutUsed
- 
requestPinShortcut@Implementation(minSdk=26) protected boolean requestPinShortcut(ShortcutInfo shortcut, IntentSender resultIntent) 
- 
setDynamicShortcuts
- 
updateShortcuts
- 
updateShortcutVisibilityNo-op on Robolectric. The real implementation calls out to a service, which will NPE on Robolectric.
- 
getShortcutsIn Robolectric, ShadowShortcutManager doesn't perform any caching so long lived shortcuts are returned on place of shortcuts cached when shown in notifications.
- 
pushDynamicShortcutIn Robolectric, ShadowShortcutManager doesn't handle rate limiting or shortcut count limits. So, pushDynamicShortcut is similar toaddDynamicShortcuts(List)but with only oneShortcutInfo.
- 
removeLongLivedShortcutsNo-op on Robolectric. The real implementation calls out to a service, which will NPE on Robolectric.
 
-