Skip to content
Commit 504c98ca authored by Tony Mak's avatar Tony Mak
Browse files

Fix the issue that SettingsProvider sees mismatched calling uid and pkg

From SettingsProvider point of view, the calling package is "android".
However, the callingUID is the client that calls into TCMS.
The solution is to clear the calling identity when accessing
DeviceConfig in a binder call.

The problem is intermittent is because TCMS also accesses
DeviceConfig in its constructor. It is not in a binder call, and thus
it works. DeviceConfig caches the value, and so subsequent DeviceConfig
calls won't actually call into SettingsProvider, not until the cache
is invalidated somehow.
I can reproduce the issue all the time by commenting the line that
accesses DeviceConfig in the constructor.

BUG: 149219961

Test: Comment the line that accesses DeviceConfig in the constructor.
      And try out smart selection and smart reply.

Change-Id: I6d27bf9b5ec0d4337c2623a83d326adc688269af
parent 83235861
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