setExcludedFromSurfaces

Sets which surfaces a shortcut will be excluded from. If the shortcut is set to be excluded from SURFACE_LAUNCHER, shortcuts will be excluded from the search result of getShortcuts and getShortcuts. This generally means the shortcut would not be displayed by a launcher app (e.g. in Long-Press menu), while remain visible in other surfaces such as assistant or on-device-intelligence.

On API <= 31, shortcuts that are excluded from SURFACE_LAUNCHER are not actually sent to ShortcutManager. These shortcuts might still be made available to other surfaces via alternative means.