resolve merge conflicts of ef33f4c1c8 to tm-dev am: 7647712c61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20402711 Change-Id: Ia4a523c338232f703aa59b61f3ad4cd2ba9bc4c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -52,6 +52,8 @@ import android.os.Process;
|
|||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ResultReceiver;
|
import android.os.ResultReceiver;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.EventLog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
@@ -956,6 +958,14 @@ public class MediaSessionRecord implements IBinder.DeathRecipient, MediaSessionR
|
|||||||
public void setMediaButtonBroadcastReceiver(ComponentName receiver) throws RemoteException {
|
public void setMediaButtonBroadcastReceiver(ComponentName receiver) throws RemoteException {
|
||||||
final long token = Binder.clearCallingIdentity();
|
final long token = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
|
//mPackageName has been verified in MediaSessionService.enforcePackageName().
|
||||||
|
if (receiver != null && !TextUtils.equals(
|
||||||
|
mPackageName, receiver.getPackageName())) {
|
||||||
|
EventLog.writeEvent(0x534e4554, "238177121", -1, ""); // SafetyNet logging.
|
||||||
|
throw new IllegalArgumentException("receiver does not belong to "
|
||||||
|
+ "package name provided to MediaSessionRecord. Pkg = " + mPackageName
|
||||||
|
+ ", Receiver Pkg = " + receiver.getPackageName());
|
||||||
|
}
|
||||||
if ((mPolicies & MediaSessionPolicyProvider.SESSION_POLICY_IGNORE_BUTTON_RECEIVER)
|
if ((mPolicies & MediaSessionPolicyProvider.SESSION_POLICY_IGNORE_BUTTON_RECEIVER)
|
||||||
!= 0) {
|
!= 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user