diff options
| author | Ricky Wai <rickywai@google.com> | 2018-09-05 20:55:11 +0100 |
|---|---|---|
| committer | Ricky Wai <rickywai@google.com> | 2018-09-25 00:06:39 +0100 |
| commit | c5ea08b2d108295da33151bdaae027ecaa3c3bce (patch) | |
| tree | 2bb0c162292e040d83b228425eda95eb2623bb73 /core/java | |
| parent | 068923f3de71560185de4cd5c2f05753707d1854 (diff) | |
Show app installed notification from PackageInstaller
Bug: 111214100
Change-Id: If3f82bfac740f4f3cf8312f396943f2ebd447c12
Test: Notifications are showing correctly after new apps installed
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/content/pm/PackageInstaller.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index 316ace16f0a4..b446c689cd00 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -85,6 +85,19 @@ import java.util.List; * <p> * The ApiDemos project contains examples of using this API: * <code>ApiDemos/src/com/example/android/apis/content/InstallApk*.java</code>. + * <p> + * On Android Q or above, an app installed notification will be posted + * by system after a new app is installed. + * To customize installer's notification icon, you should declare the following in the manifest + * <application> as follows: </p> + * <pre> + * <meta-data android:name="com.android.packageinstaller.notification.smallIcon" + * android:resource="@drawable/installer_notification_icon"/> + * </pre> + * <pre> + * <meta-data android:name="com.android.packageinstaller.notification.color" + * android:resource="@color/installer_notification_color"/> + * </pre> */ public class PackageInstaller { private static final String TAG = "PackageInstaller"; |
