Merge "Updating documentation for isDefaultApplicationIcon API" into rvc-dev am: 9962f03b77 am: e2de88b6a4

Change-Id: I8dbfee2c45dab6ba8ad2a23833a4423bf9b9b592
This commit is contained in:
Automerger Merge Worker
2020-02-25 18:04:21 +00:00

View File

@@ -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