diff options
author | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2015-12-23 17:21:24 -0800 |
---|---|---|
committer | Artem Shvadskiy <ashvadskiy@cyngn.com> | 2016-01-04 17:46:57 -0800 |
commit | 1a75f660937c99d39110c3f1335ae3bea1a85914 (patch) | |
tree | a59d306f5ac0f37b930b286957646288ccf201b2 /src/com/android/launcher3/ShortcutInfo.java | |
parent | b7121babd1abedc085244a5145052ad453ce86a6 (diff) | |
download | android_packages_apps_Trebuchet-1a75f660937c99d39110c3f1335ae3bea1a85914.tar.gz android_packages_apps_Trebuchet-1a75f660937c99d39110c3f1335ae3bea1a85914.tar.bz2 android_packages_apps_Trebuchet-1a75f660937c99d39110c3f1335ae3bea1a85914.zip |
Implement RemoteFolder metrics.
Additional changes:
1. Refactor drawer code to move xml and implementation out of trebuchet.
2. Move RemoteFolderUpdater to overlay, no stub class needed.
3. Pull TrackingEvent.Category out into EventCategory, and create overlay.
4. Remove old sync code from Folder.
5. Prevent RemoteFolder from inserting shortcuts into the database. All
remote items will exist in memory only.
6. Move RemoteFolder into overlay, and have manager create an instance
for FolderIcon.
7. Move folder sync out of LauncherModel.
Patch 2: Re-add shortcut click handling in Folder and move EventCategory
back into TrackingEvent.Category.
Patch 3: Remove whitespace/javadoc/import changes.
Change-Id: Ifc648f231bf6f6f35d8be45f8885f741b7539487
issue-id: CYNGNOS-1330
Diffstat (limited to 'src/com/android/launcher3/ShortcutInfo.java')
-rw-r--r-- | src/com/android/launcher3/ShortcutInfo.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/launcher3/ShortcutInfo.java b/src/com/android/launcher3/ShortcutInfo.java index 01f79314e..0a762849c 100644 --- a/src/com/android/launcher3/ShortcutInfo.java +++ b/src/com/android/launcher3/ShortcutInfo.java @@ -59,6 +59,9 @@ public class ShortcutInfo extends ItemInfo { */ public static final int FLAG_RESTORE_STARTED = 8; + /** Indicates that this shortcut is part of the remote folder **/ + public static final int FLAG_REMOTE = 16; + /** * The intent used to start the application. */ @@ -243,6 +246,14 @@ public class ShortcutInfo extends ItemInfo { return (status & flag) != 0; } + /** + * Check if this shortcut has a specific flag. + * @param flag flag to check. + * @return true if the flag is present, false otherwise. + */ + public boolean hasFlag(int flag) { + return (flags & flag) != 0; + } public final boolean isPromise() { return hasStatusFlag(FLAG_RESTORED_ICON | FLAG_AUTOINTALL_ICON); |