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

Skip to content
Commit 0ef782f7 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Sms: Fix appOps checks for app-sent text messages

The CM SMS Send broadcast introduced at I063288461161979f951932f32ade2cfbd72f8b73
makes all messages go through a broadcast loop inside the telephony stack
before being sent to the actual interface manager. Calling context is
preserved, down to the calling package, but the actual text is sent by
the framework itself, under the radio UID, resulting in a mismatch vs
the calling app's that makes AppOps reject the operation:

W/AppOps  (  422): Bad call: specified package com.android.mms under uid 1001 but it is really 10030

Instead of rewriting the callingPackage name to the true sender (telephony),
which would break AppOps' ability to block text messages from apps, preserve
the UID of the original app and use that when checking.

Change-Id: I62a4a55567b10252bc37388f233e6fb83282bb1d
parent ed914089
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