diff options
author | Steve Howard <showard@google.com> | 2010-07-23 20:32:21 -0700 |
---|---|---|
committer | Steve Howard <showard@google.com> | 2010-07-23 20:32:21 -0700 |
commit | 93155e1da7e89d4925e244f5afa94afb8ada7381 (patch) | |
tree | a5cafd34f505277bf760162711eda1d90d9e0d4a /src/com/android/providers/downloads/SystemFacade.java | |
parent | 691fc58e9a61d99ab5018c5ddc8349ed413e4470 (diff) | |
download | android_packages_providers_DownloadProvider-93155e1da7e89d4925e244f5afa94afb8ada7381.tar.gz android_packages_providers_DownloadProvider-93155e1da7e89d4925e244f5afa94afb8ada7381.tar.bz2 android_packages_providers_DownloadProvider-93155e1da7e89d4925e244f5afa94afb8ada7381.zip |
Stub out and test system notifications.
This change abstracts NotificationManager interactions behind
SystemFacade and takes advantage of that to test notifications, to a
limited degree.
It also fixes a silly typo in AbstractDownloadManagerFunctionalTest,
and it introduces an extra sleep between tests to avoid some
flakiness. I'll look for a better solution to that problem after this
change goes in.
Change-Id: I3a0307f828955cd45b0e3581ad499da28cc0556e
Diffstat (limited to 'src/com/android/providers/downloads/SystemFacade.java')
-rw-r--r-- | src/com/android/providers/downloads/SystemFacade.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/providers/downloads/SystemFacade.java b/src/com/android/providers/downloads/SystemFacade.java index d48e6b80..e41644ab 100644 --- a/src/com/android/providers/downloads/SystemFacade.java +++ b/src/com/android/providers/downloads/SystemFacade.java @@ -1,6 +1,7 @@ package com.android.providers.downloads; +import android.app.Notification; import android.content.Intent; import android.content.pm.PackageManager.NameNotFoundException; @@ -37,4 +38,19 @@ interface SystemFacade { * Returns true if the specified UID owns the specified package name. */ public boolean userOwnsPackage(int uid, String pckg) throws NameNotFoundException; + + /** + * Post a system notification to the NotificationManager. + */ + public void postNotification(int id, Notification notification); + + /** + * Cancel a system notification. + */ + public void cancelNotification(int id); + + /** + * Cancel all system notifications. + */ + public void cancelAllNotifications(); } |