Merge "Fix NPE in ScreenshotHelper" into rvc-dev am: a4b9474647

Change-Id: I0275b6eeb70abdeffeb88223e68b0b0e335ebb93
This commit is contained in:
Miranda Kephart
2020-05-13 16:23:38 +00:00
committed by Automerger Merge Worker

View File

@@ -132,6 +132,7 @@ public class ScreenshotHelper {
}
};
}
private static final String TAG = "ScreenshotHelper";
// Time until we give up on the screenshot & show an error instead.
@@ -146,8 +147,6 @@ public class ScreenshotHelper {
mContext = context;
}
/**
* Request a screenshot be taken.
*
@@ -284,8 +283,8 @@ public class ScreenshotHelper {
break;
case SCREENSHOT_MSG_PROCESS_COMPLETE:
synchronized (mScreenshotLock) {
if (mScreenshotConnection == myConn) {
mContext.unbindService(mScreenshotConnection);
if (myConn != null && mScreenshotConnection == myConn) {
mContext.unbindService(myConn);
mScreenshotConnection = null;
mScreenshotService = null;
}