Skip to content

Commit

Permalink
wait to allow HAL closes all camera
Browse files Browse the repository at this point in the history
camera close call is aync call, multi camera exit soon after
placing request which create issue in camera HAL as buffer
release failed.

wait for 100 msec to allow HAL release all the buffers.

Tracked-On: OAM-125256
Signed-off-by: shivasku82 <[email protected]>
  • Loading branch information
shivasku82 committed Oct 8, 2024
1 parent 5849dc8 commit c568ee5
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,16 @@ protected void onPause() {
protected void onStop() {
super.onStop();
Log.v(TAG, "onStop");
if(isSwitchingActivity == false)
System.exit(0);
if(isSwitchingActivity == false) {
closeCamera();
try {
// Sleep for 100 milliseconds
TimeUnit.MILLISECONDS.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.exit(0);
}
}

public void settingView(View view) {
Expand Down

0 comments on commit c568ee5

Please sign in to comment.