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

Skip to content
Commit 137951c7 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

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
parent 12416fba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment