Loading packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +7 −2 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class LongScreenshotActivity extends Activity { private ImageView mTransitionView; private ImageView mEnterTransitionView; private View mSave; private View mCancel; private View mEdit; private View mShare; private CropView mCropView; Loading Loading @@ -119,15 +120,15 @@ public class LongScreenshotActivity extends Activity { mSave = requireViewById(R.id.save); mEdit = requireViewById(R.id.edit); mShare = requireViewById(R.id.share); mCancel = requireViewById(R.id.cancel); mCropView = requireViewById(R.id.crop_view); mMagnifierView = requireViewById(R.id.magnifier); mCropView.setCropInteractionListener(mMagnifierView); mTransitionView = requireViewById(R.id.transition); mEnterTransitionView = requireViewById(R.id.enter_transition); requireViewById(R.id.cancel).setOnClickListener(v -> finishAndRemoveTask()); mSave.setOnClickListener(this::onClicked); mCancel.setOnClickListener(this::onClicked); mEdit.setOnClickListener(this::onClicked); mShare.setOnClickListener(this::onClicked); Loading Loading @@ -353,6 +354,7 @@ public class LongScreenshotActivity extends Activity { v.setPressed(true); setButtonsEnabled(false); if (id == R.id.save) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_SAVED); startExport(PendingAction.SAVE); } else if (id == R.id.edit) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_EDIT); Loading @@ -360,6 +362,9 @@ public class LongScreenshotActivity extends Activity { } else if (id == R.id.share) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_SHARE); startExport(PendingAction.SHARE); } else if (id == R.id.cancel) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_EXIT); finishAndRemoveTask(); } } Loading packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java +5 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,11 @@ public enum ScreenshotEvent implements UiEventLogger.UiEventEnum { @UiEvent(doc = "Long screenshot editor activity loaded a previously saved screenshot") SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_CACHED_IMAGE_LOADED(890), @UiEvent(doc = "Long screenshot editor activity finished") SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_FINISHED(891); SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_FINISHED(891), @UiEvent(doc = "User has saved a long screenshot to a file") SCREENSHOT_LONG_SCREENSHOT_SAVED(910), @UiEvent(doc = "User has discarded the result of a long screenshot") SCREENSHOT_LONG_SCREENSHOT_EXIT(911); private final int mId; Loading Loading
packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +7 −2 Original line number Diff line number Diff line Loading @@ -78,6 +78,7 @@ public class LongScreenshotActivity extends Activity { private ImageView mTransitionView; private ImageView mEnterTransitionView; private View mSave; private View mCancel; private View mEdit; private View mShare; private CropView mCropView; Loading Loading @@ -119,15 +120,15 @@ public class LongScreenshotActivity extends Activity { mSave = requireViewById(R.id.save); mEdit = requireViewById(R.id.edit); mShare = requireViewById(R.id.share); mCancel = requireViewById(R.id.cancel); mCropView = requireViewById(R.id.crop_view); mMagnifierView = requireViewById(R.id.magnifier); mCropView.setCropInteractionListener(mMagnifierView); mTransitionView = requireViewById(R.id.transition); mEnterTransitionView = requireViewById(R.id.enter_transition); requireViewById(R.id.cancel).setOnClickListener(v -> finishAndRemoveTask()); mSave.setOnClickListener(this::onClicked); mCancel.setOnClickListener(this::onClicked); mEdit.setOnClickListener(this::onClicked); mShare.setOnClickListener(this::onClicked); Loading Loading @@ -353,6 +354,7 @@ public class LongScreenshotActivity extends Activity { v.setPressed(true); setButtonsEnabled(false); if (id == R.id.save) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_SAVED); startExport(PendingAction.SAVE); } else if (id == R.id.edit) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_EDIT); Loading @@ -360,6 +362,9 @@ public class LongScreenshotActivity extends Activity { } else if (id == R.id.share) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_SHARE); startExport(PendingAction.SHARE); } else if (id == R.id.cancel) { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_LONG_SCREENSHOT_EXIT); finishAndRemoveTask(); } } Loading
packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotEvent.java +5 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,11 @@ public enum ScreenshotEvent implements UiEventLogger.UiEventEnum { @UiEvent(doc = "Long screenshot editor activity loaded a previously saved screenshot") SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_CACHED_IMAGE_LOADED(890), @UiEvent(doc = "Long screenshot editor activity finished") SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_FINISHED(891); SCREENSHOT_LONG_SCREENSHOT_ACTIVITY_FINISHED(891), @UiEvent(doc = "User has saved a long screenshot to a file") SCREENSHOT_LONG_SCREENSHOT_SAVED(910), @UiEvent(doc = "User has discarded the result of a long screenshot") SCREENSHOT_LONG_SCREENSHOT_EXIT(911); private final int mId; Loading