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

Commit 02d46d99 authored by Jason Chang's avatar Jason Chang
Browse files

Fix DocuementsUI can start multiple ResolverActivity

Add intent flag FLAG_ACTIVITY_SINGLE_TOP to prevent ResolverActivity
be launched if it is already running at the top of the history stack.

Bug: 137065134
Test: manual
Test: atest DocumentsUIGoogleTests
Change-Id: Ie42f31b4fc6f95f02b53b251426dc9cb21fc4c91
parent 31c44df8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -727,7 +727,7 @@ public class ActionHandler<T extends FragmentActivity & Addons> extends Abstract
        // established, we set the same permission for non-managed files
        // This ensures consistent behavior between the Downloads root
        // and other roots.
        int flags = Intent.FLAG_GRANT_READ_URI_PERMISSION;
        int flags = Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_ACTIVITY_SINGLE_TOP;
        if (doc.isWriteSupported()) {
            flags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
        }