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

Commit 8ace5f6e authored by Matt Pape's avatar Matt Pape
Browse files

Update systemui components to DeviceConfig.onPropertiesChangedListener

Remove references to @removed onPropertyChangedListener so we can delete
the code.

Test: atest AssistHandleBehaviorControllerTest
Bug: 128902955
Change-Id: I0e2563b3667d21f272bcaf3d94406b2663b3321e
parent cffd546f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -94,12 +94,14 @@ public final class AssistHandleBehaviorController implements AssistHandleCallbac
                DeviceConfig.NAMESPACE_SYSTEMUI,
                SystemUiDeviceConfigFlags.ASSIST_HANDLES_BEHAVIOR_MODE,
                DEFAULT_BEHAVIOR.toString()));
        DeviceConfig.addOnPropertyChangedListener(
        DeviceConfig.addOnPropertiesChangedListener(
                DeviceConfig.NAMESPACE_SYSTEMUI,
                mHandler::post,
                (namespace, name, value) -> {
                    if (SystemUiDeviceConfigFlags.ASSIST_HANDLES_BEHAVIOR_MODE.equals(name)) {
                        setBehavior(value);
                (properties) -> {
                    if (properties.getKeyset().contains(
                            SystemUiDeviceConfigFlags.ASSIST_HANDLES_BEHAVIOR_MODE)) {
                        setBehavior(properties.getString(
                                SystemUiDeviceConfigFlags.ASSIST_HANDLES_BEHAVIOR_MODE, null));
                    }
                });
    }