Removing promiseIntent property from ShortuctInfo

> Instead of checking promiseIntent != null, using isPromise() for consistency
> Fixing bug where clicking a pending icon does not launch anything
> Fixing bug where draging an icon on Info target, permanently hides the icon

Change-Id: Ic8f6b56042dba42d5ed9aedb0f5947186e1a4208
This commit is contained in:
Sunny Goyal committed 2017-01-12 18:54:21 -08:00
1 parent 3e9be43b6e
commit e6e7200791
7 files changed
+47 -56

No files matched your search

@@ -163,10 +163,8 @@ public class AddWorkspaceItemsTask extends ExtendedModelTask {
for (ItemInfo item : dataModel.itemsIdMap) {
if (item instanceof ShortcutInfo) {
ShortcutInfo info = (ShortcutInfo) item;
Intent targetIntent = info.promisedIntent == null
? info.intent : info.promisedIntent;
if (targetIntent != null && info.user.equals(user)) {
Intent copyIntent = new Intent(targetIntent);
if (item.getIntent() != null && info.user.equals(user)) {
Intent copyIntent = new Intent(item.getIntent());
copyIntent.setSourceBounds(intent.getSourceBounds());
String s = copyIntent.toUri(0);
if (intentWithPkg.equals(s) || intentWithoutPkg.equals(s)) {