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

This commit is contained in:
Miranda Kephart
2020-06-05 18:55:08 +00:00
committed by Android (Google) Code Review

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();
}
}
}
}