Skip to content

Commit 51f2430

Browse files
author
Jeff Brown
committed
Support toast cancellation.
Change-Id: Idd00b9c6e3049822e437afaf56351575a5c167df
1 parent 13a0271 commit 51f2430

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/java/android/widget/Toast.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ public void show() {
120120
*/
121121
public void cancel() {
122122
mTN.hide();
123-
// TODO this still needs to cancel the inflight notification if any
123+
124+
try {
125+
getService().cancelToast(mContext.getPackageName(), mTN);
126+
} catch (RemoteException e) {
127+
// Empty
128+
}
124129
}
125130

126131
/**

0 commit comments

Comments
 (0)