Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e98c5c0 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Make sure flags are sane after DeleteStagedFileOnResult

Otherwise we might accidentially start a new task and
DeleteStagedFileOnResult gets a premature onActivityResult.

Also: Suppress unneccssary animation after stage

Fixes: 73999303
Test: Repro's scenario in bug
Change-Id: I11a6f583c780f18bd7c1b6e74e188205fbe7d08c
parent d141a529
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@ public class DeleteStagedFileOnResult extends Activity {
        if (savedInstanceState == null) {
            Intent installIntent = new Intent(getIntent());
            installIntent.setClass(this, PackageInstallerActivity.class);
            installIntent.setFlags(installIntent.getFlags() & ~Intent.FLAG_ACTIVITY_FORWARD_RESULT);

            installIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
            startActivityForResult(installIntent, 0);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -668,8 +668,8 @@ public class PackageInstallerActivity extends OverlayTouchActivity implements On
        }
        if (getIntent().getBooleanExtra(Intent.EXTRA_RETURN_RESULT, false)) {
            newIntent.putExtra(Intent.EXTRA_RETURN_RESULT, true);
            newIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
        }
        newIntent.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
        if(localLOGV) Log.i(TAG, "downloaded app uri="+mPackageURI);
        startActivity(newIntent);
        finish();