Fix: Prevent boot crash on foldable devices with missing auto-rotate config
The logic introduced in ag/34327514 causes devices to crash during boot if they are foldable, have auto-rotate enabled, and lack the `config_perDeviceStateRotationLockDefaults` configuration. The current behavior is problematic because `config_perDeviceStateRotationLockDefaults` is an optional setting for device state-based auto-rotate. A device should boot and function normally regardless of whether this optional setting is present. To resolve this, the logic is updated to initialize device state-based auto-rotate classes only when config_perDeviceStateRotationLockDefaults is present and not empty. Test: atest DisplayRotationTests DeviceStateAutoRotateSettingManagerProviderTest Fixes: 431045703 Flag: EXEMPT bugfix Change-Id: I53ac476987af89608fd5e6a5724a4926612f7951
Loading
Please register or sign in to comment