Enforce ComponentName belongs to caller app

Add checks that enforce ComponentName's package belongs to calling app
in MediaButtonReceiverHolder and MediaSessionRecord. This avoids
privileged execution of arbitrary code.

Bug: 238177121
Test: atest CtsMediaBetterTogetherTestCases
Change-Id: Iac143d8bbc9422f3ca3f42f8c0154b9906ecd897
Merged-In: Iac143d8bbc9422f3ca3f42f8c0154b9906ecd897
2 files changed