Skip to content

Commit fd13118

Browse files
author
android-build-team Robot
committed
Snap for 7256547 from 3a6b247 to rvc-qpr3-release
Change-Id: If544b68af2156503a1eedfe05f197b4c980cca48
2 parents 8d12f4f + 3a6b247 commit fd13118

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

core/java/android/hardware/camera2/CameraManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,8 @@ public void onCameraClosed(String id) {
13631363
// devices going offline (in real world scenarios, these permissions aren't
13641364
// changeable). Future calls to getCameraIdList() will reflect the changes in
13651365
// the camera id list after getCameraIdListNoLazy() is called.
1366+
// We need to remove the torch ids which may have been associated with the
1367+
// devices removed as well. This is the same situation.
13661368
cameraStatuses = mCameraService.addListener(testListener);
13671369
mCameraService.removeListener(testListener);
13681370
for (CameraStatus c : cameraStatuses) {
@@ -1381,6 +1383,7 @@ public void onCameraClosed(String id) {
13811383
}
13821384
for (String id : deviceIdsToRemove) {
13831385
onStatusChangedLocked(ICameraServiceListener.STATUS_NOT_PRESENT, id);
1386+
mTorchStatus.remove(id);
13841387
}
13851388
} catch (ServiceSpecificException e) {
13861389
// Unexpected failure

0 commit comments

Comments
 (0)