Adding support for listening to end callbacks when launching an intent from Launcher

Also moving various state handling to these end callbacks enstead of relying on resume

Bug: 265134143
Test: Verified that the end callback is received
Change-Id: I326a99c80154d244c0e49f678717c476602b6240
This commit is contained in:
Sunny Goyal
2023-05-12 12:08:53 -07:00
parent 7bc6cdee56
commit 4fdc9181dd
7 changed files with 96 additions and 41 deletions

View File

@@ -281,7 +281,7 @@ public class OptionsPopupView extends ArrowPopup<Launcher>
if (!TextUtils.isEmpty(pickerPackage)) {
intent.setPackage(pickerPackage);
}
return launcher.startActivitySafely(v, intent, placeholderInfo(intent));
return launcher.startActivitySafely(v, intent, placeholderInfo(intent)) != null;
}
static WorkspaceItemInfo placeholderInfo(Intent intent) {