Android CTS 5.1 release 1
Before the first call to clearCallingIdentity, cache the calling package.

Then it will be saved as a mutator when the dirty bit is set.
This may be accessed by multiple threads, so the data is cached in ThreadLocal.
Also track the calling Uid, and clear the cached package when the tracked Uid
is restored.

Bug: 18421411
Change-Id: I4597bd4169636c3988d72ddde51578a02af193ea
2 files changed