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

Commit 5e89a188 authored by Aleksander Morgado's avatar Aleksander Morgado
Browse files

systemui: check for telephony calling support in global actions dialog

When FEATURE_TELEPHONY is declared, the global actions dialog in
SystemUI has logic to show an "Emergency" red button that allows
opening the dialer to call emergency services.

The check for FEATURE_TELEPHONY is very broad and would also pass on
data-only telephony-capable devices (e.g. those declaring
FEATURE_TELEPHONY_DATA but not FEATURE_TELEPHONY_CALLING), effectively
making the Emergency calling option be shown in devices where voice
calling is unsupported, so unusable. Directly checking for
FEATURE_TELEPHONY_CALLING solves this issue.

The global actions dialog has two different ways to check for airplane
mode activation, either via the Telephony stack (when telephony is
available) or via the ContentObserver (when telephony is not
available). Given that the more reliable Telephony-stack based
airplane mode detection is needed to ensure airplane mode is not
disabled during an emergency call, it also makes sense to modify this
logic to be specific to devices with calling support, not just
telephony. The change to check for FEATURE_TELEPHONY_CALLING is
appropriate also in this context.

Bug: 435624005
Test: atest GlobalActionsDialogLiteTest (after manual re-enabling it)
Flag: EXEMPT bugfix

Change-Id: Ib177756d832007fa5be7ebfcca1805c840e98a70
parent 08d0feb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment