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

Skip to content
Commit c3479650 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Use TelecomManager.isInCall instead of TelephonyManager.getCallState

UserManager.canSwitchUsers and UserManager.getUserSwitchability were
using the deprecated method TelephonyManager.getCallState and
comparing the result with TelephonyManager.CALL_STATE_IDLE to findout
whether there is an ongoing telephone call. This CL changes those
methods to use a helper method, which calls TelecomManager.isInCall
instead of the deprecated one.

Also UserInteractor.canSwitchUsers was sometimes failing with a
SecurityException during a user switch and crashing the systemui
process, causing it to restart after the user switch. This change
also saves the user switch flow from the underlying problem.

Bug: 257538981
Test: atest UserManagerTest
Change-Id: I378527db7decc170d385f0f1d89235b6f02649e6
parent 189b67e8
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