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); mContext.unbindService(mScreenshotConnection);
mScreenshotConnection = null; mScreenshotConnection = null;
mScreenshotService = null; mScreenshotService = null;
handler.removeCallbacks(mScreenshotTimeout); // only log an error if we're still within the timeout period
notifyScreenshotError(); if (handler.hasCallbacks(mScreenshotTimeout)) {
handler.removeCallbacks(mScreenshotTimeout);
notifyScreenshotError();
}
} }
} }
} }