diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2014-10-02 15:58:31 -0700 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-09-27 15:44:28 -0700 |
commit | bedfa5e3c344273d8c45a603ba3456acbac801e9 (patch) | |
tree | 40caee9294fc229a80aeaef821381713e172f213 /src/com/android/launcher3/ShortcutInfo.java | |
parent | 6d5f97506bc6b93471d7e29bd2cbd996895cc0d7 (diff) | |
download | android_packages_apps_Trebuchet-bedfa5e3c344273d8c45a603ba3456acbac801e9.tar.gz android_packages_apps_Trebuchet-bedfa5e3c344273d8c45a603ba3456acbac801e9.tar.bz2 android_packages_apps_Trebuchet-bedfa5e3c344273d8c45a603ba3456acbac801e9.zip |
Keeping icons in disabled state when SD-card is unmounted
> changing shortcutInfo.isDisabled to be a flag based variable
> on received OnPackageUnavailable, icons are disabled from desktop
instead of being removed. Icons in all apps are removed
Bug: 15852084
Bug: 16238283
Change-Id: I126d23c709682a917d4bbb84de71032593dce8f9
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r-- | src/com/android/launcher3/ShortcutInfo.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java index daf343460..01f79314e 100644 --- a/src/com/android/launcher3/ShortcutInfo.java +++ b/src/com/android/launcher3/ShortcutInfo.java @@ -88,10 +88,20 @@ public class ShortcutInfo extends ItemInfo { private Bitmap mIcon; /** + * Indicates that the icon is disabled due to safe mode restrictions. + */ + public static final int FLAG_DISABLED_SAFEMODE = 1; + + /** + * Indicates that the icon is disabled as the app is not available. + */ + public static final int FLAG_DISABLED_NOT_AVAILABLE = 2; + + /** * Could be disabled, if the the app is installed but unavailable (eg. in safe mode or when * sd-card is not available). */ - boolean isDisabled = false; + int isDisabled = DEFAULT; int status; |