disableShortcuts

open fun disableShortcuts(@NonNull context: Context, @NonNull shortcutIds: List<String>, @Nullable disabledMessage: CharSequence)(source)

Disable pinned shortcuts, showing the user a custom error message when they try to select the disabled shortcuts. For more details, read Disable shortcuts. Compatibility behavior:

  • API 25 and above, this method matches platform behavior.
  • API 24 and earlier, this method behaves the same as removeDynamicShortcuts

Throws

If trying to disable immutable shortcuts.

when the user is locked.