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

Commit c97b9302 authored by Andrey Yepin's avatar Andrey Yepin
Browse files

Ignore activity animation in interactive Chooser session.

Bug: 433531911
Test: presubmits
Flag: android.service.chooser.interactive_chooser
Change-Id: I63812873f43d2148e0e85b60bb457f6733ff4dcc
parent 9a368d9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ public class ChooserManager {
                | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
                | Intent.FLAG_ACTIVITY_TASK_ON_HOME
                | Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
        chooserIntent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
        Bundle binderExtras = new Bundle();
        ChooserSession chooserSession = new ChooserSession();
        binderExtras.putBinder(ChooserSession.EXTRA_CHOOSER_SESSION, chooserSession.getBinder());
+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP
import android.content.Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT
import android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
import android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION
import android.content.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
import android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP
import android.content.Intent.FLAG_ACTIVITY_TASK_ON_HOME
@@ -72,6 +73,8 @@ class ChooserManagerTest {
        }

        assertThat(intentCaptor.firstValue.flags and flags).isEqualTo(0)
        assertThat(intentCaptor.firstValue.flags and FLAG_ACTIVITY_NO_ANIMATION)
            .isEqualTo(FLAG_ACTIVITY_NO_ANIMATION)
        val options = ActivityOptions.fromBundle(optionsCaptor.firstValue)
        assertThat(options.isAllowPassThroughOnTouchOutside).isTrue()
    }