summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2021-04-03 21:04:16 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2021-04-03 21:04:16 +0000
commitfd1311893de289d7085497bbad5e6282f69961c7 (patch)
treee9271387bc8cc7970862f6849995ec3c985f239d /core/java/android
parent8d12f4feaef7ed7f56a9bde705dd34a195cf9380 (diff)
parent3a6b247ec091e79a31feed5baab82b054e6561d8 (diff)
Snap for 7256547 from 3a6b247ec091e79a31feed5baab82b054e6561d8 to rvc-qpr3-release
Change-Id: If544b68af2156503a1eedfe05f197b4c980cca48
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 933dee3a6470..609da3125485 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -1363,6 +1363,8 @@ public final class CameraManager {
// devices going offline (in real world scenarios, these permissions aren't
// changeable). Future calls to getCameraIdList() will reflect the changes in
// the camera id list after getCameraIdListNoLazy() is called.
+ // We need to remove the torch ids which may have been associated with the
+ // devices removed as well. This is the same situation.
cameraStatuses = mCameraService.addListener(testListener);
mCameraService.removeListener(testListener);
for (CameraStatus c : cameraStatuses) {
@@ -1381,6 +1383,7 @@ public final class CameraManager {
}
for (String id : deviceIdsToRemove) {
onStatusChangedLocked(ICameraServiceListener.STATUS_NOT_PRESENT, id);
+ mTorchStatus.remove(id);
}
} catch (ServiceSpecificException e) {
// Unexpected failure