Merge "Updating documentation for isDefaultApplicationIcon API" into rvc-dev
This commit is contained in:
@@ -7853,11 +7853,16 @@ public abstract class PackageManager {
|
|||||||
/**
|
/**
|
||||||
* Returns if the provided drawable represents the default activity icon provided by the system.
|
* 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
|
* PackageManager silently returns a default application icon for any package/activity if the
|
||||||
* define one or if the system encountered any error when loading the icon.
|
* 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
|
* @return true if the drawable represents the default activity icon, false otherwise
|
||||||
* @see #getDefaultActivityIcon()
|
* @see #getDefaultActivityIcon()
|
||||||
|
* @see PackageItemInfo#loadDefaultIcon(PackageManager)
|
||||||
|
* @see #getActivityIcon
|
||||||
|
* @see LauncherActivityInfo#getIcon(int)
|
||||||
*/
|
*/
|
||||||
public boolean isDefaultApplicationIcon(@NonNull Drawable drawable) {
|
public boolean isDefaultApplicationIcon(@NonNull Drawable drawable) {
|
||||||
int resId = drawable instanceof AdaptiveIconDrawable
|
int resId = drawable instanceof AdaptiveIconDrawable
|
||||||
|
|||||||
Reference in New Issue
Block a user