Merge "Make getCameraIdListNoLazy handle no service case"
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index b61b1ef..9b58578 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -1076,6 +1076,10 @@
}
public String[] getCameraIdListNoLazy() {
+ if (sCameraServiceDisabled) {
+ return new String[] {};
+ }
+
CameraStatus[] cameraStatuses;
ICameraServiceListener.Stub testListener = new ICameraServiceListener.Stub() {
@Override