Merge "Fix NPE in ScreenshotHelper" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a4b9474647
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user