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

@@ -155,6 +155,13 @@ public abstract class BaseDraggingActivity extends BaseActivity
return wrapper;
}
@Override
public ActivityOptionsWrapper makeDefaultActivityOptions(int splashScreenStyle) {
ActivityOptionsWrapper wrapper = super.makeDefaultActivityOptions(splashScreenStyle);
addOnResumeCallback(wrapper.onEndCallback::executeAllAndDestroy);
return wrapper;
}
@Override
protected void onStart() {
super.onStart();