Change-Id: Ic79a60dad0f617a845211d3fbe146c1648a71da3
related-to-bug:
5205804
mStarted = false;
mFrameAvailableCondition.signal();
+ int64_t token;
+ bool isTokenValid = false;
+ if (mCamera != 0) {
+ token = IPCThreadState::self()->clearCallingIdentity();
+ isTokenValid = true;
+ }
releaseQueuedFrames();
while (!mFramesBeingEncoded.empty()) {
if (NO_ERROR !=
}
stopCameraRecording();
releaseCamera();
+ if (isTokenValid) {
+ IPCThreadState::self()->restoreCallingIdentity(token);
+ }
if (mCollectStats) {
LOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us",