Sequenceablepublic class ShortcutInfo extends Object implements Sequenceable
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<ShortcutInfo> |
PRODUCER |
Creates a
ShortcutInfo instance from a Parcel. |
| 构造器 | 说明 |
|---|---|
ShortcutInfo() |
Default constructor used to create a
ShortcutInfo instance. |
ShortcutInfo(ShortcutInfo source) |
A constructor used to create an
ShortcutInfo instance by copying parameters from an
existing one. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getBundleName() |
Obtains the bundle name of the application to which this shortcut belongs.
|
String |
getDisableMessage() |
Obtains the disable message of this shortcut.
|
String |
getHostAbilityName() |
Obtains the class name of the ability hosting this shortcut.
|
String |
getIcon() |
Obtains the icon path of this shortcut.
|
String |
getId() |
Obtains the ID of this shortcut.
|
ShortcutIntent |
getIntent() |
Obtains the
ShortcutIntent object of this shortcut. |
List<ShortcutIntent> |
getIntents() |
Obtains all
ShortcutIntent objects contained in this shortcut. |
String |
getLabel() |
Obtains the label of this shortcut.
|
boolean |
isEnabled() |
Checks whether this shortcut is enabled.
|
boolean |
isHomeShortcut() |
Checks whether this shortcut is a home-screen shortcut.
|
boolean |
isStatic() |
Checks whether this shortcut is static.
|
boolean |
marshalling(Parcel out) |
Marshals this
Sequenceable object into a Parcel. |
void |
setBundleName(String bundleName) |
Sets the bundleName for this shortcut.
|
void |
setDisableMessage(String disableMessage) |
Sets the disable message for this shortcut.
|
void |
setHostAbilityName(String hostAbility) |
Sets the class name of the ability hosting this shortcut.
|
void |
setIcon(String icon) |
Sets icon path of this shortcut.
|
void |
setId(String id) |
Sets the ID for this shortcut.
|
void |
setIntent(ShortcutIntent intent) |
Sets the
ShortcutIntent for this shortcut. |
void |
setIntents(List<ShortcutIntent> intents) |
Sets multiple intents for this shortcut.
|
void |
setLabel(String label) |
Sets the label for this shortcut.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals this
Sequenceable object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<ShortcutInfo> PRODUCER
ShortcutInfo instance from a Parcel.public ShortcutInfo()
ShortcutInfo instance.public ShortcutInfo(ShortcutInfo source)
ShortcutInfo instance by copying parameters from an
existing one.source - Indicates the ShortcutInfo object.public void setId(String id)
id - Indicates the shortcut ID to set.public String getId()
The shortcut ID uniquely identifies a shortcut.
public void setBundleName(String bundleName)
bundleName - Indicates bundle name of the application to which this shortcut belongs.public String getBundleName()
public void setHostAbilityName(String hostAbility)
hostAbility - Indicates the class name of the ability that created this shortcut.public String getHostAbilityName()
public void setIcon(String icon)
icon - Indicates the path storing the shortcut icon.public String getIcon()
public void setLabel(String label)
The label of a shortcut is the shortcut information visible to users.
label - Indicates the shortcut label to set.public String getLabel()
public void setDisableMessage(String disableMessage)
disableMessage - Indicates the disable message to set.public String getDisableMessage()
public void setIntents(List<ShortcutIntent> intents)
If multiple intents are set for a shortcut, the abilities specified in all these ShortcutIntent
objects will be started in sequence when the shortcut is started.
intents - Indicates the list of ShortcutIntent objects to set.public void setIntent(ShortcutIntent intent)
ShortcutIntent for this shortcut. If this method is called multiple times,
the ShortcutIntent set in the most recent call will overwrite the previous one.
This method does not take effect for static shortcuts.intent - Indicates the ShortcutIntent object to set.public List<ShortcutIntent> getIntents()
ShortcutIntent objects contained in this shortcut.
The ohos.bundle.ShortcutIntent objects are used for navigating to a shortcut's target ability.
ohos.bundle.ShortcutIntent objects in this shortcut.public ShortcutIntent getIntent()
ShortcutIntent object of this shortcut. If there are multiple intents,
the last one in the ShortcutIntent list is returned.ShortcutIntent list of this shortcut.public boolean isStatic()
true if this shortcut is static; returns false otherwise.public boolean isHomeShortcut()
true if this shortcut is a home-screen shortcut; returns false otherwise.public boolean isEnabled()
true if this shortcut is enabled; returns false otherwise.public boolean marshalling(Parcel out)
SequenceableSequenceable object into a Parcel.marshalling 在接口中 Sequenceableout - Indicates the Parcel object to which the Sequenceable
object will be marshaled..true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
SequenceableSequenceable object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object into which the Sequenceable
object has been marshaled.true if the unmarshalling is successful; returns false otherwise.