Merge "Camera: Fix physical camera availability update" into tm-qpr-dev am: 608b9ec7bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20979105 Change-Id: Ibcd43666c50069da9a04ac22017aed5e178c4808 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2378,9 +2378,8 @@ public final class CameraManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Do we need to treat this as error?
|
//TODO: Do we need to treat this as error?
|
||||||
if (!mDeviceStatus.containsKey(id) || !isAvailable(mDeviceStatus.get(id))
|
if (!mDeviceStatus.containsKey(id) || !mUnavailablePhysicalDevices.containsKey(id)) {
|
||||||
|| !mUnavailablePhysicalDevices.containsKey(id)) {
|
Log.e(TAG, String.format("Camera %s is not present. Ignore physical camera "
|
||||||
Log.e(TAG, String.format("Camera %s is not available. Ignore physical camera "
|
|
||||||
+ "status change", id));
|
+ "status change", id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2405,6 +2404,12 @@ public final class CameraManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isAvailable(mDeviceStatus.get(id))) {
|
||||||
|
Log.i(TAG, String.format("Camera %s is not available. Ignore physical camera "
|
||||||
|
+ "status change callback(s)", id));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final int callbackCount = mCallbackMap.size();
|
final int callbackCount = mCallbackMap.size();
|
||||||
for (int i = 0; i < callbackCount; i++) {
|
for (int i = 0; i < callbackCount; i++) {
|
||||||
Executor executor = mCallbackMap.valueAt(i);
|
Executor executor = mCallbackMap.valueAt(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user