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

Skip to content
Commit c67761d0 authored by David Braun's avatar David Braun
Browse files

Make SmsApplication checks more defensive

When SmsApplication::getApplication is called it will check to see if the
configured default SMS app and the phone package have the needed app ops
to work properly. If the call was made from a privilidged caller where
updateIfNeeded == true then the issue will be corrected, if the call was
made from an insecure caller we will return null indicating no default SMS
app which will cause client apps to know that they are not properly set
as the default SMS app. Either way we log an error.

When SmsApplication::setDefaultApplication is called we will ensure that
even if the previous app is no longer enabled or no longer set up as a
valid SMS app, we will still revoke it's OP_WRITE_SMS permission.

Bug: 11071837 Hangouts on KLP lost the WRITE_SMS permission
Change-Id: Ifea39a3d63e4ec3a30a6a1fa5834878dcc9ccfa0
parent 1260f1c6
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