本文整理了Java中android.os.Parcel.readStrongBinder()
方法的一些代码示例,展示了Parcel.readStrongBinder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.readStrongBinder()
方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:readStrongBinder
[英]Read an object from the parcel at the current dataPosition().
[中]从当前dataPosition()处的地块读取对象。
代码示例来源:origin: johncarl81/parceler
@Override
public IBinder nullSafeFromParcel(Parcel parcel) {
return parcel.readStrongBinder();
}
代码示例来源:origin: android-hacker/VirtualXposed
protected PendingResultData(Parcel in) {
this.mType = in.readInt();
this.mOrderedHint = in.readByte() != 0;
this.mInitialStickyHint = in.readByte() != 0;
this.mToken = in.readStrongBinder();
this.mSendingUser = in.readInt();
this.mFlags = in.readInt();
this.mResultCode = in.readInt();
this.mResultData = in.readString();
this.mResultExtras = in.readBundle();
this.mAbortBroadcast = in.readByte() != 0;
this.mFinished = in.readByte() != 0;
}
代码示例来源:origin: firebase/firebase-jobdispatcher-android
public PendingCallback(Parcel in) {
binder = in.readStrongBinder();
}
代码示例来源:origin: stackoverflow.com
public IBinder getService(String name) throws RemoteException {
116 Parcel data = Parcel.obtain();
117 Parcel reply = Parcel.obtain();
118 data.writeInterfaceToken(IServiceManager.descriptor);
119 data.writeString(name);
120 mRemote.transact(GET_SERVICE_TRANSACTION, data, reply, 0);
121 IBinder binder = reply.readStrongBinder();
122 reply.recycle();
123 data.recycle();
124 return binder;
125 }
代码示例来源:origin: android-hacker/VirtualXposed
return;
final IBinder retriever = p.readStrongBinder();
while (i < N) {
if (DEBUG)
代码示例来源:origin: robolectric/robolectric
@Test
public void testReadStrongBinderWhenEmpty() {
assertThat(parcel.readStrongBinder()).isNull();
}
代码示例来源:origin: robolectric/robolectric
@Test
@Config(minSdk = LOLLIPOP)
public void testReadWriteMultipleStrongBinders() {
List<IBinder> binders = new ArrayList<>();
for (int i = 0; i < 10; ++i) {
IBinder binder = new Binder();
binders.add(binder);
parcel.writeStrongBinder(binder);
}
parcel.setDataPosition(0);
for (int i = 0; i < 10; ++i) {
assertThat(parcel.readStrongBinder()).isEqualTo(binders.get(i));
}
// now try to read past the number of items written and see what happens
assertThat(parcel.readStrongBinder()).isNull();
}
代码示例来源:origin: firebase/firebase-jobdispatcher-android
IBinder remote = serialized.readStrongBinder();
callback = new GooglePlayJobCallback(remote);
代码示例来源:origin: robolectric/robolectric
@Test
@Config(minSdk = LOLLIPOP)
public void testWriteNullStrongBinder() {
parcel.writeStrongBinder(null);
parcel.setDataPosition(0);
assertThat(parcel.readStrongBinder()).isNull();
}
代码示例来源:origin: robolectric/robolectric
@Test
@Config(minSdk = LOLLIPOP)
public void testReadWriteSingleStrongBinder() {
IBinder binder = new Binder();
parcel.writeStrongBinder(binder);
parcel.setDataPosition(0);
assertThat(parcel.readStrongBinder()).isEqualTo(binder);
}
代码示例来源:origin: LawnchairLauncher/Lawnchair
ILauncherOverlayCallback.Stub.asInterface(data.readStrongBinder()),
data.readInt()
);
bundle = Bundle.CREATOR.createFromParcel(data);
windowAttached2(bundle, com.google.android.libraries.launcherclient.ILauncherOverlayCallback.Stub.asInterface(data.readStrongBinder()));
return true;
case 16:
代码示例来源:origin: org.parceler/parceler-api
@Override
public IBinder nullSafeFromParcel(Parcel parcel) {
return parcel.readStrongBinder();
}
代码示例来源:origin: microg/android_external_GmsApi
@Override
public MessengerCompat createFromParcel(Parcel source) {
IBinder binder = source.readStrongBinder();
return binder != null ? new MessengerCompat(binder) : null;
}
代码示例来源:origin: darkskygit/VirtualApp
protected PendingResultData(Parcel in) {
this.mType = in.readInt();
this.mOrderedHint = in.readByte() != 0;
this.mInitialStickyHint = in.readByte() != 0;
this.mToken = in.readStrongBinder();
this.mSendingUser = in.readInt();
this.mFlags = in.readInt();
this.mResultCode = in.readInt();
this.mResultData = in.readString();
this.mResultExtras = in.readBundle();
this.mAbortBroadcast = in.readByte() != 0;
this.mFinished = in.readByte() != 0;
}
代码示例来源:origin: bzsome/VirtualApp-x326
protected PendingResultData(Parcel in) {
this.mType = in.readInt();
this.mOrderedHint = in.readByte() != 0;
this.mInitialStickyHint = in.readByte() != 0;
this.mToken = in.readStrongBinder();
this.mSendingUser = in.readInt();
this.mFlags = in.readInt();
this.mResultCode = in.readInt();
this.mResultData = in.readString();
this.mResultExtras = in.readBundle();
this.mAbortBroadcast = in.readByte() != 0;
this.mFinished = in.readByte() != 0;
}
代码示例来源:origin: microg/android_external_GmsApi
@Override
public BinderWrapper createFromParcel(Parcel source) {
return new BinderWrapper(source.readStrongBinder());
}
代码示例来源:origin: skjolber/external-nfc-api
@Override
public Acr1255UReader createFromParcel(Parcel in) {
String name = in.readString();
IBinder binder = in.readStrongBinder();
IAcr1255UReaderControl iin = IAcr1255UReaderControl.Stub.asInterface(binder);
return new Acr1255UReader(name, iin);
}
代码示例来源:origin: stackoverflow.com
public IBinder getService(String name) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IServiceManager.descriptor);
data.writeString(name);
mRemote.transact(GET_SERVICE_TRANSACTION, data, reply, 0);
IBinder binder = reply.readStrongBinder();
reply.recycle();
data.recycle();
return binder;
}
代码示例来源:origin: materialos/android-icon-pack
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException {
switch (code) {
case INTERFACE_TRANSACTION: {
reply.writeString(DESCRIPTOR);
return true;
}
case TRANSACTION_checkLicense: {
data.enforceInterface(DESCRIPTOR);
long _arg0;
_arg0 = data.readLong();
java.lang.String _arg1;
_arg1 = data.readString();
com.google.android.vending.licensing.ILicenseResultListener _arg2;
_arg2 = com.google.android.vending.licensing.ILicenseResultListener.Stub.asInterface(data.readStrongBinder());
this.checkLicense(_arg0, _arg1, _arg2);
return true;
}
}
return super.onTransact(code, data, reply, flags);
}
代码示例来源:origin: shyluo/CrashImmuneDecoder
public IVideoDecoder createH264HardwareDecoder() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
IVideoDecoder decoder = null;
try {
data.writeInterfaceToken(DESCRIPTION);
remote.transact(CREATE_H264_HARDWARE_DECODER_TRANSACTION, data, reply, 0);
reply.readException();
if (reply.readInt() == 1) {
decoder = VideoDecoderProxy.asInterface(reply.readStrongBinder());
}
} finally {
reply.recycle();
data.recycle();
}
return decoder;
}
}
内容来源于网络,如有侵权,请联系作者删除!