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
2017-01-12 16:55:36 -08:00
parent 3e9be43b6e
commit e6e7200791
7 changed files with 47 additions and 56 deletions

View File

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