diff options
| author | 2023-05-05 17:44:04 +0000 | |
|---|---|---|
| committer | 2023-05-05 17:44:04 +0000 | |
| commit | 05a834b1d84b25138a8033ac47492b98d11ac53b (patch) | |
| tree | 1f7e97a5e2c189f2de9b3afb981147aa1603a4b0 | |
| parent | 793951c7c99ac8d370fef5a478350c82214144dc (diff) | |
| parent | 9c524230b3257bc4b9116171ec8b93b5330447f2 (diff) | |
Merge "Skip shared element transition for implicit intent" into udc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java index 2312c705cd6e..4bc7ec844794 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java @@ -343,22 +343,24 @@ public class LongScreenshotActivity extends Activity { } else { String editorPackage = getString(R.string.config_screenshotEditor); Intent intent = new Intent(Intent.ACTION_EDIT); - if (!TextUtils.isEmpty(editorPackage)) { - intent.setComponent(ComponentName.unflattenFromString(editorPackage)); - } intent.setDataAndType(uri, "image/png"); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION); + Bundle options = null; - mTransitionView.setImageBitmap(mOutputBitmap); - mTransitionView.setVisibility(View.VISIBLE); - mTransitionView.setTransitionName( - ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME); - // TODO: listen for transition completing instead of finishing onStop - mTransitionStarted = true; - startActivity(intent, - ActivityOptions.makeSceneTransitionAnimation(this, mTransitionView, - ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME).toBundle()); + // Skip shared element transition for implicit edit intents + if (!TextUtils.isEmpty(editorPackage)) { + intent.setComponent(ComponentName.unflattenFromString(editorPackage)); + mTransitionView.setImageBitmap(mOutputBitmap); + mTransitionView.setVisibility(View.VISIBLE); + mTransitionView.setTransitionName( + ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME); + options = ActivityOptions.makeSceneTransitionAnimation(this, mTransitionView, + ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME).toBundle(); + // TODO: listen for transition completing instead of finishing onStop + mTransitionStarted = true; + } + startActivity(intent, options); } } |