diff options
| author | 2023-05-12 13:11:46 +0000 | |
|---|---|---|
| committer | 2023-05-12 13:47:01 +0000 | |
| commit | 5479dacd8c99a6d7df26aa58747417b16c46183e (patch) | |
| tree | 371a21159f01b8c9a1f9ec52b9d4fe6a6606f254 | |
| parent | be2d9c4580920323e7e29df9d2720264db7e09c9 (diff) | |
Open intent with animation for mini-resolver
Uses an animation when the min-resolver opens
an intent (push down and fade out the mini-resolver,
then sliding in the new activity).
Note that this does not work if the new activity is opened
in a new task, due to being unable to override the system
animations for task transitions.
Bug: 271818896
Test: Manual, see bug for before and after video
Test: atest IntentForwarderActivityTest
Change-Id: If64da935621f49e5c5013dd791b85f48c0cfd861
| -rw-r--r-- | core/java/com/android/internal/app/IntentForwarderActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/com/android/internal/app/IntentForwarderActivity.java b/core/java/com/android/internal/app/IntentForwarderActivity.java index 44d517ad0c32..009d65a83151 100644 --- a/core/java/com/android/internal/app/IntentForwarderActivity.java +++ b/core/java/com/android/internal/app/IntentForwarderActivity.java @@ -29,6 +29,7 @@ import static com.android.internal.app.ResolverActivity.EXTRA_SELECTED_PROFILE; import android.annotation.Nullable; import android.annotation.TestApi; import android.app.Activity; +import android.app.ActivityOptions; import android.app.ActivityThread; import android.app.AppGlobals; import android.app.admin.DevicePolicyManager; @@ -220,7 +221,15 @@ public class IntentForwarderActivity extends Activity { findViewById(R.id.use_same_profile_browser).setOnClickListener(v -> finish()); findViewById(R.id.button_open).setOnClickListener(v -> { - startActivityAsCaller(launchIntent, targetUserId); + startActivityAsCaller( + launchIntent, + ActivityOptions.makeCustomAnimation( + getApplicationContext(), + R.anim.activity_open_enter, + R.anim.push_down_out) + .toBundle(), + /* ignoreTargetSecurity= */ false, + targetUserId); finish(); }); } |