Merge "Only show error if screenshot process dies within timeout period" into rvc-dev am: 3a51a85aaf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11739868

Change-Id: I7df8fd90028980a0815d8fb08e27fa11d08b68ef
This commit is contained in:
Miranda Kephart
2020-06-05 19:09:39 +00:00
committed by Automerger Merge Worker

View File

@@ -351,8 +351,11 @@ public class ScreenshotHelper {
mContext.unbindService(mScreenshotConnection);
mScreenshotConnection = null;
mScreenshotService = null;
handler.removeCallbacks(mScreenshotTimeout);
notifyScreenshotError();
// only log an error if we're still within the timeout period
if (handler.hasCallbacks(mScreenshotTimeout)) {
handler.removeCallbacks(mScreenshotTimeout);
notifyScreenshotError();
}
}
}
}