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

Commit fa45376f authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Sync non-perf. class characteristics

The native device info sensor orientation characteristic
can change depending on the device state. Ensure that the
non-perf. class copy is also updated respectively before
usage.

Bug: 277840843
Test:atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/MultiViewTest.java#testTextureViewPreviewWithMirroring

Change-Id: I04be517d83f2e25fecd6062d34e01bb852fe0cf5
parent d8b8e3e9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2526,6 +2526,10 @@ void CameraProviderManager::ProviderInfo::DeviceInfo3::notifyDeviceStateChange(i
            (mDeviceStateOrientationMap.find(newState) != mDeviceStateOrientationMap.end())) {
        mCameraCharacteristics.update(ANDROID_SENSOR_ORIENTATION,
                &mDeviceStateOrientationMap[newState], 1);
        if (mCameraCharNoPCOverride.get() != nullptr) {
            mCameraCharNoPCOverride->update(ANDROID_SENSOR_ORIENTATION,
                &mDeviceStateOrientationMap[newState], 1);
        }
    }
}