Sequenceablepublic class NotificationSorting extends Object implements Sequenceable
When a new notification arrives, the sorting of existing active notifications such as their respective priority or time order will change, and the sorting information about the current notification will change accordingly. This information is only a snapshot and changes in real time. You can only obtain but cannot set information in this class.
SystemCapability.Notification#ANSSequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<NotificationSorting> |
PRODUCER |
Creates a
NotificationSorting instance from a Parcel. |
| 构造器 | 说明 |
|---|---|
NotificationSorting() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
String |
getGroupKeyOverride() |
Obtains the overridden notification group key.
|
String |
getHashCode() |
Obtains the notification hash code, which is unique in the current application.
|
int |
getImportance() |
Obtains the importance level of the current notification set in the corresponding
NotificationSlot. |
int |
getRanking() |
Obtains the sequence number of a notification among all the active notifications.
|
NotificationSlot |
getSlot() |
Obtains the
NotificationSlot the current notification belongs to. |
int |
getVisiblenessOverride() |
Obtains the visibility of the current notification on the lock screen set in the
corresponding
NotificationSlot. |
boolean |
isDisplayBadge() |
Checks whether the badge is displayed for the current notification.
|
boolean |
isHiddenNotification() |
Checks whether the current notification is hidden.
|
boolean |
marshalling(Parcel out) |
Marshals a
NotificationSorting object into a Parcel. |
String |
toString() |
Returns a string representation of the object.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals a
NotificationSorting object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<NotificationSorting> PRODUCER
NotificationSorting instance from a Parcel.public String getHashCode()
Generally, the notification hash code is a string in the format Notification ID_Creator package name_Creator UID_Owner package name.
public int getRanking()
public NotificationSlot getSlot()
NotificationSlot the current notification belongs to. Each notification must be
in a particular NotificationSlot.NotificationSlot of the notification.public boolean isDisplayBadge()
true if the badge is displayed; returns false otherwise.public boolean isHiddenNotification()
true if the notification is hidden; returns false otherwise.public int getImportance()
NotificationSlot.NotificationSlotpublic String getGroupKeyOverride()
public int getVisiblenessOverride()
NotificationSlot.public boolean marshalling(Parcel out)
NotificationSorting object into a Parcel.
A process can call the unmarshalling(ohos.utils.Parcel) method to unmarshal
a NotificationSorting object from a Parcel to implement inter-process
communication (IPC).
marshalling 在接口中 Sequenceableout - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
NotificationSorting object from a Parcel.unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())