Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74416950 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

camera2: Don't NPE in onStatusChanged

Bug: 10360518
Change-Id: Icf70a908581af209b889237ad64a555b7e794b67
parent 298cbe9c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public final class CameraManager {

    private final ICameraService mCameraService;
    private ArrayList<String> mDeviceIdList;
    private HashSet<CameraListener> mListenerSet = new HashSet<CameraListener>();
    private final HashSet<CameraListener> mListenerSet = new HashSet<CameraListener>();
    private final Context mContext;
    private final Object mLock = new Object();

@@ -332,7 +332,7 @@ public final class CameraManager {

                Integer oldStatus = mDeviceStatus.put(id, status);

                if (oldStatus == status) {
                if (oldStatus != null && oldStatus == status) {
                    Log.v(TAG, String.format(
                            "Device status changed to 0x%x, which is what it already was",
                            status));