118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato/* 218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * Copyright (C) 2008 The Android Open Source Project 318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * 418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * Licensed under the Apache License, Version 2.0 (the "License"); 518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * you may not use this file except in compliance with the License. 618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * You may obtain a copy of the License at 718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * 818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * http://www.apache.org/licenses/LICENSE-2.0 918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * 1018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * Unless required by applicable law or agreed to in writing, software 1118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * distributed under the License is distributed on an "AS IS" BASIS, 1218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * See the License for the specific language governing permissions and 1418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato * limitations under the License. 1518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato */ 1618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 175feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandlerpackage android.service.notification; 1818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 1918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onoratoimport android.app.Notification; 2018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onoratoimport android.os.Parcel; 2118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onoratoimport android.os.Parcelable; 22f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8Dianne Hackbornimport android.os.UserHandle; 2318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 242561b0b10a55841a08e0e1d467e73e10b1bf256dDaniel Sandler/** 25fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler * Class encapsulating a Notification. Sent by the NotificationManagerService to clients including 265feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler * the status bar and any {@link android.service.notification.NotificationListenerService}s. 272561b0b10a55841a08e0e1d467e73e10b1bf256dDaniel Sandler */ 2818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onoratopublic class StatusBarNotification implements Parcelable { 29e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final String pkg; 30e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final int id; 31e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final String tag; 325feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler 33e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final int uid; 34e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final String basePkg; 35e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final int initialPid; 36e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final Notification notification; 37e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final UserHandle user; 38e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final long postTime; 396d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey 40e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler private final int score; 415feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler 425feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler /** @hide */ 436d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey public StatusBarNotification(String pkg, int id, String tag, int uid, int initialPid, int score, 446d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey Notification notification, UserHandle user) { 45fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this(pkg, null, id, tag, uid, initialPid, score, notification, user); 46fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler } 47fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 485feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler /** @hide */ 49fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler public StatusBarNotification(String pkg, String basePkg, int id, String tag, int uid, 50fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler int initialPid, int score, Notification notification, UserHandle user) { 51fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this(pkg, basePkg, id, tag, uid, initialPid, score, notification, user, 52fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler System.currentTimeMillis()); 53fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler } 54fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 55fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler public StatusBarNotification(String pkg, String basePkg, int id, String tag, int uid, 56fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler int initialPid, int score, Notification notification, UserHandle user, 57fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler long postTime) { 5818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato if (pkg == null) throw new NullPointerException(); 5918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato if (notification == null) throw new NullPointerException(); 6018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 6118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.pkg = pkg; 62fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.basePkg = pkg; 6318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.id = id; 6418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.tag = tag; 659d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn this.uid = uid; 669d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn this.initialPid = initialPid; 672561b0b10a55841a08e0e1d467e73e10b1bf256dDaniel Sandler this.score = score; 6818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.notification = notification; 696d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey this.user = user; 706d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey this.notification.setUser(user); 71fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 72fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.postTime = postTime; 7318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 7418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 7518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public StatusBarNotification(Parcel in) { 7618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.pkg = in.readString(); 77fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.basePkg = in.readString(); 7818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.id = in.readInt(); 7918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato if (in.readInt() != 0) { 8018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.tag = in.readString(); 8118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } else { 8218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.tag = null; 8318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 849d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn this.uid = in.readInt(); 859d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn this.initialPid = in.readInt(); 862561b0b10a55841a08e0e1d467e73e10b1bf256dDaniel Sandler this.score = in.readInt(); 8718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.notification = new Notification(in); 886d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey this.user = UserHandle.readFromParcel(in); 89fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.notification.setUser(this.user); 90fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.postTime = in.readLong(); 9118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 9218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 9318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public void writeToParcel(Parcel out, int flags) { 9418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato out.writeString(this.pkg); 95fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler out.writeString(this.basePkg); 9618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato out.writeInt(this.id); 9718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato if (this.tag != null) { 9818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato out.writeInt(1); 9918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato out.writeString(this.tag); 10018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } else { 10118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato out.writeInt(0); 10218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 1039d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn out.writeInt(this.uid); 1049d39d0cb361c5d3bba04a6bacf299be2162a6e92Dianne Hackborn out.writeInt(this.initialPid); 1052561b0b10a55841a08e0e1d467e73e10b1bf256dDaniel Sandler out.writeInt(this.score); 10618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato this.notification.writeToParcel(out, flags); 1076d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey user.writeToParcel(out, flags); 108fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler 109fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler out.writeLong(this.postTime); 11018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 11118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 11218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public int describeContents() { 11318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato return 0; 11418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 11518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 11618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public static final Parcelable.Creator<StatusBarNotification> CREATOR 11718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato = new Parcelable.Creator<StatusBarNotification>() 11818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato { 11918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public StatusBarNotification createFromParcel(Parcel parcel) 12018e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato { 12118e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato return new StatusBarNotification(parcel); 12218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 12318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 12418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public StatusBarNotification[] newArray(int size) 12518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato { 12618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato return new StatusBarNotification[size]; 12718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 12818e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato }; 12918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 1301a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler /** 1311a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler * @hide 1321a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler */ 1331a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler public StatusBarNotification cloneLight() { 1341a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler final Notification no = new Notification(); 1351a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler this.notification.cloneInto(no, false); // light copy 1361a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler return new StatusBarNotification(this.pkg, this.basePkg, 1371a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler this.id, this.tag, this.uid, this.initialPid, 1381a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler this.score, no, this.user, this.postTime); 1391a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler } 1401a497d3a2b1496c12949e47e55f8e46d8f585be5Daniel Sandler 1416d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey @Override 14218e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public StatusBarNotification clone() { 143fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler return new StatusBarNotification(this.pkg, this.basePkg, 144fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.id, this.tag, this.uid, this.initialPid, 145fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.score, this.notification.clone(), this.user, this.postTime); 14618e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 14718e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 1486d51571835737c7502a2e111ee9dc2527ebad984Jeff Sharkey @Override 14918e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato public String toString() { 150fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler return String.format( 151fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler "StatusBarNotification(pkg=%s user=%s id=%d tag=%s score=%d: %s)", 152fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.pkg, this.user, this.id, this.tag, 153fde19b106b2b77bc3540b04445357870caf878b5Daniel Sandler this.score, this.notification); 15418e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato } 15518e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato 1565feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler /** Convenience method to check the notification's flags for 1575feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler * {@link Notification#FLAG_ONGOING_EVENT}. 1585feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler */ 159e345fff2f80947b0a821f6674c197a02b7bff08eJoe Onorato public boolean isOngoing() { 160e345fff2f80947b0a821f6674c197a02b7bff08eJoe Onorato return (notification.flags & Notification.FLAG_ONGOING_EVENT) != 0; 161e345fff2f80947b0a821f6674c197a02b7bff08eJoe Onorato } 162e345fff2f80947b0a821f6674c197a02b7bff08eJoe Onorato 1635feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler /** Convenience method to check the notification's flags for 1645feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler * either {@link Notification#FLAG_ONGOING_EVENT} or 1655feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler * {@link Notification#FLAG_NO_CLEAR}. 1665feceebb892d4cb5777cea3c6174b206705d456bDaniel Sandler */ 1675dd1169ae95162383acf00d1e9a1886e0ac99a70Joe Onorato public boolean isClearable() { 1685dd1169ae95162383acf00d1e9a1886e0ac99a70Joe Onorato return ((notification.flags & Notification.FLAG_ONGOING_EVENT) == 0) 1695dd1169ae95162383acf00d1e9a1886e0ac99a70Joe Onorato && ((notification.flags & Notification.FLAG_NO_CLEAR) == 0); 1705dd1169ae95162383acf00d1e9a1886e0ac99a70Joe Onorato } 171b9301c3a686df05950710ec80e2cd691c3082871Daniel Sandler 172b9301c3a686df05950710ec80e2cd691c3082871Daniel Sandler /** Returns a userHandle for the instance of the app that posted this notification. */ 173b9301c3a686df05950710ec80e2cd691c3082871Daniel Sandler public int getUserId() { 17450cdf7c3069eb2cf82acbad73c322b7a5f3af4b1Dianne Hackborn return this.user.getIdentifier(); 175b9301c3a686df05950710ec80e2cd691c3082871Daniel Sandler } 176e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 177e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** The package of the app that posted the notification. */ 1784f91efdf421e354ee2033ed640e4150cf0cef21bDaniel Sandler public String getPackageName() { 179e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return pkg; 180e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 181e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 18226510320646339fc59e01d392f96efeeac6d91ddScott Main /** The id supplied to {@link android.app.NotificationManager#notify(int,Notification)}. */ 183e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public int getId() { 184e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return id; 185e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 186e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 18726510320646339fc59e01d392f96efeeac6d91ddScott Main /** The tag supplied to {@link android.app.NotificationManager#notify(int,Notification)}, 18826510320646339fc59e01d392f96efeeac6d91ddScott Main * or null if no tag was specified. */ 189e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public String getTag() { 190e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return tag; 191e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 192e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 193e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** The notifying app's calling uid. @hide */ 194e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public int getUid() { 195e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return uid; 196e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 197e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 198e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** The notifying app's base package. @hide */ 199e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public String getBasePkg() { 200e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return basePkg; 201e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 202e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 203e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** @hide */ 204e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public int getInitialPid() { 205e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return initialPid; 206e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 207e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 208e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** The {@link android.app.Notification} supplied to 20926510320646339fc59e01d392f96efeeac6d91ddScott Main * {@link android.app.NotificationManager#notify(int,Notification)}. */ 210e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public Notification getNotification() { 211e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return notification; 212e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 213e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 214e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** 215e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler * The {@link android.os.UserHandle} for whom this notification is intended. 216e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler * @hide 217e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler */ 218e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public UserHandle getUser() { 219e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return user; 220e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 221e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 222e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** The time (in {@link System#currentTimeMillis} time) the notification was posted, 223e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler * which may be different than {@link android.app.Notification#when}. 224e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler */ 225e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public long getPostTime() { 226e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return postTime; 227e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 228e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler 229e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler /** @hide */ 230e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler public int getScore() { 231e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler return score; 232e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0Daniel Sandler } 23318e69dfc7235f8a4bfe257f9d1c43539049a22ceJoe Onorato} 234