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

Commit 20877113 authored by Franck Lenormand's avatar Franck Lenormand Committed by Andre Eisenbach
Browse files

Prevent javacrash when TELEPHONY_SERVICE is not found



The API context.getSystemService can return NULL
A Javacrash can happend when trying to obtain the TELEPHONY_SERVICE
and getting null instead.

The patch warn about the value of the instance of the service returned.
It also log and prevent its use in function startListenForPhoneState and
stopListenForPhoneState.

If the TELEPHONY_SERVICE is not available, the internal variables wont
change.

Change-Id: I9e4abc88a58f7f037bbc4f3f7c1cf1b44328ce38
Signed-off-by: default avatarfranck Lenormand <franckx.lenormand@intel.com>
Signed-off-by: default avatarZhiquan Liu <zhiquan.liu@intel.com>
parent 4f5e5448
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