From c25c4bb378a0f22a42d3dd7787b381543d42464c Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 20 Feb 2020 16:19:57 -0800 Subject: [PATCH] Updating documentation for isDefaultApplicationIcon API Bug: 149758817 Test: N/A Change-Id: Iaa9b29f55087204f4af849a384cb6c9b01df4465 --- core/java/android/content/pm/PackageManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index f2ec938b3d9d4..fa751d3805808 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -7853,11 +7853,16 @@ public abstract class PackageManager { /** * Returns if the provided drawable represents the default activity icon provided by the system. * - * PackageManager provides a default icon for any package/activity if the app itself does not - * define one or if the system encountered any error when loading the icon. + * PackageManager silently returns a default application icon for any package/activity if the + * app itself does not define one or if the system encountered any error when loading the icon. + * + * Developers can use this to check implement app specific logic around retrying or caching. * * @return true if the drawable represents the default activity icon, false otherwise * @see #getDefaultActivityIcon() + * @see PackageItemInfo#loadDefaultIcon(PackageManager) + * @see #getActivityIcon + * @see LauncherActivityInfo#getIcon(int) */ public boolean isDefaultApplicationIcon(@NonNull Drawable drawable) { int resId = drawable instanceof AdaptiveIconDrawable