Merge "Skip shared element transition for implicit intent" into udc-dev am: 05a834b1d8 am: 12898fbf1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23036065 Change-Id: I6225ae9b305a6333d861d33b0e03d8ddb5a8f99a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -343,22 +343,24 @@ public class LongScreenshotActivity extends Activity {
|
|||||||
} else {
|
} else {
|
||||||
String editorPackage = getString(R.string.config_screenshotEditor);
|
String editorPackage = getString(R.string.config_screenshotEditor);
|
||||||
Intent intent = new Intent(Intent.ACTION_EDIT);
|
Intent intent = new Intent(Intent.ACTION_EDIT);
|
||||||
if (!TextUtils.isEmpty(editorPackage)) {
|
|
||||||
intent.setComponent(ComponentName.unflattenFromString(editorPackage));
|
|
||||||
}
|
|
||||||
intent.setDataAndType(uri, "image/png");
|
intent.setDataAndType(uri, "image/png");
|
||||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
|
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||||
|
Bundle options = null;
|
||||||
|
|
||||||
|
// Skip shared element transition for implicit edit intents
|
||||||
|
if (!TextUtils.isEmpty(editorPackage)) {
|
||||||
|
intent.setComponent(ComponentName.unflattenFromString(editorPackage));
|
||||||
mTransitionView.setImageBitmap(mOutputBitmap);
|
mTransitionView.setImageBitmap(mOutputBitmap);
|
||||||
mTransitionView.setVisibility(View.VISIBLE);
|
mTransitionView.setVisibility(View.VISIBLE);
|
||||||
mTransitionView.setTransitionName(
|
mTransitionView.setTransitionName(
|
||||||
ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME);
|
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
|
// TODO: listen for transition completing instead of finishing onStop
|
||||||
mTransitionStarted = true;
|
mTransitionStarted = true;
|
||||||
startActivity(intent,
|
}
|
||||||
ActivityOptions.makeSceneTransitionAnimation(this, mTransitionView,
|
startActivity(intent, options);
|
||||||
ChooserActivity.FIRST_IMAGE_PREVIEW_TRANSITION_NAME).toBundle());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user