Fixing PendingArgs not cleared when going home

Bug: 174781600
Test: manual
Change-Id: I2f192b0f60d843b49b290fa70b76f562fca81e36
This commit is contained in:
Sunny Goyal
2020-12-14 12:30:38 -08:00
parent e1358149fc
commit fee1b25fee
2 changed files with 10 additions and 8 deletions

View File

@@ -167,9 +167,14 @@ public abstract class BaseQuickstepLauncher extends Launcher
}
@Override
protected void handlePendingActivityRequest() {
super.handlePendingActivityRequest();
if (mPendingActivityRequestCode != -1 && isInState(NORMAL)) {
public void onStateSetEnd(LauncherState state) {
super.onStateSetEnd(state);
handlePendingActivityRequest();
}
private void handlePendingActivityRequest() {
if (mPendingActivityRequestCode != -1 && isInState(NORMAL)
&& ((getActivityFlags() & ACTIVITY_STATE_DEFERRED_RESUMED) != 0)) {
// Remove any active ProxyActivityStarter task and send RESULT_CANCELED to Launcher.
onActivityResult(mPendingActivityRequestCode, RESULT_CANCELED, null);
// ProxyActivityStarter is started with clear task to reset the task after which it