public static class NotificationUsageStats.SingleNotificationStats extends Object
Modifier and Type | Field and Description |
---|---|
long |
airtimeCount
Number of times the notification has been made visible.
|
long |
airtimeExpandedMs
Accumulated visible expanded time.
|
long |
airtimeMs
Accumulated visible time.
|
long |
currentAirtimeExpandedStartElapsedMs
If currently visible, SystemClock.elapsedRealtime() when the notification was made
visible; -1 otherwise.
|
long |
currentAirtimeStartElapsedMs
If currently visible, SystemClock.elapsedRealtime() when the notification was made
visible; -1 otherwise.
|
boolean |
isNoisy
Did the app include sound or vibration on the notificaiton.
|
int |
naturalImportance
Importance after initial filtering for noise and other features
|
long |
posttimeElapsedMs
SystemClock.elapsedRealtime() when the notification was posted.
|
long |
posttimeToDismissMs
Elpased time since the notification was posted until it was dismissed by the user.
|
long |
posttimeToFirstAirtimeMs
Time in ms between the notification was posted and first shown; -1 if never shown.
|
long |
posttimeToFirstClickMs
Elapsed time since the notification was posted until it was first clicked, or -1.
|
long |
posttimeToFirstVisibleExpansionMs
Time in ms between the notification being posted and when it first
became visible and expanded; -1 if it was never visibly expanded.
|
int |
requestedImportance
Importance directly requested by the app.
|
long |
userExpansionCount
Number of times the notification has been expanded by the user.
|
Constructor and Description |
---|
SingleNotificationStats() |
Modifier and Type | Method and Description |
---|---|
void |
finish()
The notification is leaving the system.
|
long |
getCurrentAirtimeExpandedMs() |
long |
getCurrentAirtimeMs() |
long |
getCurrentPosttimeMs() |
void |
onCancel() |
void |
onClick()
Called when the user clicked the notification.
|
void |
onDismiss()
Called when the user removed the notification.
|
void |
onExpansionChanged(boolean userAction,
boolean expanded) |
void |
onRemoved() |
void |
onVisibilityChanged(boolean visible) |
String |
toString()
Returns a string representation of the object.
|
void |
updateFrom(NotificationUsageStats.SingleNotificationStats old)
Copy useful information out of the stats from the pre-update notifications.
|
public long posttimeElapsedMs
public long posttimeToFirstClickMs
public long posttimeToDismissMs
public long airtimeCount
public long posttimeToFirstAirtimeMs
public long currentAirtimeStartElapsedMs
public long airtimeMs
public long posttimeToFirstVisibleExpansionMs
public long currentAirtimeExpandedStartElapsedMs
public long airtimeExpandedMs
public long userExpansionCount
public int requestedImportance
public boolean isNoisy
public int naturalImportance
public long getCurrentPosttimeMs()
public long getCurrentAirtimeMs()
public long getCurrentAirtimeExpandedMs()
public void onClick()
public void onDismiss()
public void onCancel()
public void onRemoved()
public void onVisibilityChanged(boolean visible)
public void onExpansionChanged(boolean userAction, boolean expanded)
public void finish()
public String toString()
Object
toString
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())
public void updateFrom(NotificationUsageStats.SingleNotificationStats old)