Add support for device state based auto-rotation preferences in Settings.
- Creates new preferences that are shown when device-state rotation is supported. - Hides standard preferences when device-state rotation is supported. - Controllers/Preferences for individual folded/unfolded rotation settings are created and added programatically based on the settable device states available. Test: Manually + Unit tests Bug: 195757480 Change-Id: If254220ca3018bc6ec1c4e3947375733f6816f92
This commit is contained in:
@@ -77,6 +77,7 @@ public class SmartAutoRotatePreferenceController extends TogglePreferenceControl
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return RotationPolicy.isRotationLockToggleVisible(mContext)
|
||||
&& !DeviceStateAutoRotationHelper.isDeviceStateRotationEnabled(mContext)
|
||||
? AVAILABLE : UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user