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

Commit 624f0cb4 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Ensure parsing PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT

Update DeviceStateProviderImpl to parse the additional device
state property. This is needed for devices who define their
device states in device_state_configuration.xml overlays (as
opposed to java-based configurations like
BookStyleDeviceStatePolicy.java)

Test: On Cuttlefish, run atest android.server.wm.jetpack.area.ExtensionRearDisplayTest#testRearDisplayStatusListeners
Fixes: 379780843
Bug: 372486634

Flag: EXEMPT bugfix
Change-Id: I03393ae40321ef79f403c78035f0d31493496cf9
parent 5ac361ad
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -137,6 +137,8 @@ public final class DeviceStateProviderImpl implements DeviceStateProvider,
            "com.android.server.policy.PROPERTY_FEATURE_REAR_DISPLAY";
    private static final String PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT =
            "com.android.server.policy.PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT";
    private static final String PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT =
            "com.android.server.policy.PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT";



@@ -281,6 +283,9 @@ public final class DeviceStateProviderImpl implements DeviceStateProvider,
            case PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT:
                systemProperties.add(DeviceState.PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT);
                break;
            case PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT:
                systemProperties.add(DeviceState.PROPERTY_FEATURE_REAR_DISPLAY_OUTER_DEFAULT);
                break;
            default:
                Slog.w(TAG, "Parsed unknown flag with name: " + propertyString);
                break;