Clear both ContentProvider and local identities.

The logic in ensureDefaultRingtones() ends up calling through the
public ContentProvider interface, meaning our LocalCallingIdentity
is reset back to reflect the incoming Binder call.

We really do want all these operations to run with identity cleared,
so we need to clear both LocalCallingIdentity and the identity
maintained by ContentProvider.

Bug: 133434049
Test: atest android.media.cts.MediaScannerTest
Change-Id: Id2e5eb6943e88988707dffbbd98e22d55de05a96
1 file changed