DO NOT MERGE - fix compile error from cherry pick due to member method becoming static.
Bug: 23953967
Change-Id: I0d1b11f94497b8853f343b6f63948ae03a1ec5ad
diff --git a/tests/tests/security/jni/android_security_cts_AudioFlingerBinderTest.cpp b/tests/tests/security/jni/android_security_cts_AudioFlingerBinderTest.cpp
index 61b27f1..24e3130 100644
--- a/tests/tests/security/jni/android_security_cts_AudioFlingerBinderTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_AudioFlingerBinderTest.cpp
@@ -256,7 +256,7 @@
Parcel data, reply;
data.writeInterfaceToken(af->getInterfaceDescriptor());
data.writeInt32((int32_t)j);
- status_t status = af->asBinder()->transact(40, data, &reply); // 40 is CREATE_EFFECT
+ status_t status = af->asBinder(af)->transact(40, data, &reply); // 40 is CREATE_EFFECT
if (status != NO_ERROR) {
return false;
}
diff --git a/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp b/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
index 71d9948..753d0ef 100644
--- a/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_AudioPolicyBinderTest.cpp
@@ -205,7 +205,7 @@
Parcel data, reply;
data.writeInterfaceToken(aps->getInterfaceDescriptor());
data.writeInt32(-i);
- aps->asBinder()->transact(START_AUDIO_SOURCE, data, &reply);
+ aps->asBinder(aps)->transact(START_AUDIO_SOURCE, data, &reply);
status_t err = (status_t)reply.readInt32();
if (err == NO_ERROR) {
continue;
@@ -238,7 +238,7 @@
data.writeInterfaceToken(aps->getInterfaceDescriptor());
data.writeInt32(-1); // stream type
data.writeInt32(-1); // device
- aps->asBinder()->transact(GET_STREAM_VOLUME, data, &reply);
+ aps->asBinder(aps)->transact(GET_STREAM_VOLUME, data, &reply);
int index = reply.readInt32();
err = reply.readInt32();
diff --git a/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp b/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp
index 41262ac..9de5836 100644
--- a/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp
+++ b/tests/tests/security/jni/android_security_cts_MediaPlayerInfoLeakTest.cpp
@@ -39,14 +39,14 @@
Parcel data, reply;
int dummyAudioSessionId = 1;
data.writeInterfaceToken(iMPService->getInterfaceDescriptor());
- data.writeStrongBinder(client->asBinder());
+ data.writeStrongBinder(client->asBinder(client));
data.writeInt32(dummyAudioSessionId);
// Keep synchronized with IMediaPlayerService.cpp!
enum {
CREATE = IBinder::FIRST_CALL_TRANSACTION,
};
- status_t err = iMPService->asBinder()->transact(CREATE, data, &reply);
+ status_t err = iMPService->asBinder(iMPService)->transact(CREATE, data, &reply);
if (err == NO_ERROR) {
iMP = interface_cast<IMediaPlayer>(reply.readStrongBinder());
@@ -64,7 +64,7 @@
Parcel data, reply;
data.writeInterfaceToken(iMP->getInterfaceDescriptor());
- iMP->asBinder()->transact(command, data, &reply);
+ iMP->asBinder(iMP)->transact(command, data, &reply);
int leak = reply.readInt32();
status_t err = reply.readInt32();