Add more debug logs for screenshots

Make sure we can track the process of requesting and saving a
screenshot.

Bug: 274612592
Fix: 274612592
Test: manual (observing adb logs)
Change-Id: I958fb64469d9c928501b34c220c197a9574e6e9f
This commit is contained in:
Miranda Kephart
2023-03-21 12:33:53 -04:00
parent 0f351cb629
commit e14339ad5f
3 changed files with 3 additions and 6 deletions

View File

@@ -194,9 +194,7 @@ class SaveImageInBackgroundTask extends AsyncTask<Void, Void, Void> {
} catch (Exception e) {
// IOException/UnsupportedOperationException may be thrown if external storage is
// not mounted
if (DEBUG_STORAGE) {
Log.d(TAG, "Failed to store screenshot", e);
}
Log.d(TAG, "Failed to store screenshot", e);
mParams.clearImage();
mImageData.reset();
mQuickShareData.reset();

View File

@@ -1128,9 +1128,7 @@ public class ScreenshotController {
/** Reset screenshot view and then call onCompleteRunnable */
private void finishDismiss() {
if (DEBUG_DISMISS) {
Log.d(TAG, "finishDismiss");
}
Log.d(TAG, "finishDismiss");
if (mLastScrollCaptureRequest != null) {
mLastScrollCaptureRequest.cancel(true);
mLastScrollCaptureRequest = null;

View File

@@ -256,6 +256,7 @@ public class TakeScreenshotService extends Service {
Consumer<Uri> uriConsumer, RequestCallback callback) {
mUiEventLogger.log(ScreenshotEvent.getScreenshotSource(screenshot.getSource()), 0,
screenshot.getPackageNameString());
Log.d(TAG, "Screenshot request: " + screenshot);
mScreenshot.handleScreenshot(screenshot, uriConsumer, callback);
}