Gate controls controllers with system feature flag
Instantiation of the Controls Controllers is now flagged behind PackageManager.FEATURE_CONTROLS. This is done in the following way: * The class ControlsComponent has accessors to the top level controllers (as Optional), but they will be Optional.empty() if the feature is disabled. * GlobalActionsDialog injects a ControlsComponent and works with the optionals. * ControlsRequestReceiver checks this flag and returns immediately if it's false. In this way, the whole controls subsystem is only instantiated if the feature is supported. Bug: 157244528 Test: manual (enable and disable the flag). Test: atest ControlsComponentTest ControlsRequestReceiverTest Change-Id: I05419bb28289afbf5813791cfc72c54a123f4c87
Loading
Please register or sign in to comment