本文整理汇总了Java中android.os.Parcel.writeInterfaceToken方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.writeInterfaceToken方法的具体用法?Java Parcel.writeInterfaceToken怎么用?Java Parcel.writeInterfaceToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.writeInterfaceToken方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendBroadcast
import android.os.Parcel; //导入方法依赖的package包/类
public void sendBroadcast(String deviceId, Intent intent) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(deviceId);
if (intent != null) {
_data.writeInt(1);
intent.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(12, _data, _reply, 0);
ExceptionUtils.readExceptionFromParcel(_reply);
} finally {
_reply.recycle();
_data.recycle();
}
}
示例2: getVolumeAttributes
import android.os.Parcel; //导入方法依赖的package包/类
public ParcelableVolumeInfo getVolumeAttributes() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
ParcelableVolumeInfo _result;
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(10, _data, _reply, 0);
_reply.readException();
if (_reply.readInt() != 0) {
_result = (ParcelableVolumeInfo) ParcelableVolumeInfo.CREATOR.createFromParcel(_reply);
} else {
_result = null;
}
_reply.recycle();
_data.recycle();
return _result;
} catch (Throwable th) {
_reply.recycle();
_data.recycle();
}
}
示例3: payEnd
import android.os.Parcel; //导入方法依赖的package包/类
public final void payEnd(boolean z, String str) throws RemoteException {
int i = 0;
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
if (z) {
i = 1;
}
obtain.writeInt(i);
obtain.writeString(str);
this.a.transact(2, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例4: initDevice
import android.os.Parcel; //导入方法依赖的package包/类
public void initDevice(Bundle bundle) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (bundle != null) {
_data.writeInt(1);
bundle.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(2, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例5: getAdvertisingID
import android.os.Parcel; //导入方法依赖的package包/类
public String getAdvertisingID() {
try {
Intent intent = new Intent("com.google.android.gms.ads.identifier.service.START");
intent.setPackage("com.google.android.gms");
Object gSConnection = new GSConnection();
this.context.bindService(intent, gSConnection, 1);
IBinder takeBinder = gSConnection.takeBinder();
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.identifier.internal" +
".IAdvertisingIdService");
takeBinder.transact(1, obtain, obtain2, 0);
obtain2.readException();
String readString = obtain2.readString();
obtain2.recycle();
obtain.recycle();
Ln.i("getAdvertisingID === %s", readString);
return readString;
} catch (Throwable th) {
Ln.w(th);
return null;
}
}
示例6: onEvent
import android.os.Parcel; //导入方法依赖的package包/类
public void onEvent(String event, Bundle extras) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(event);
if (extras != null) {
_data.writeInt(1);
extras.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(1, _data, null, 1);
} finally {
_data.recycle();
}
}
示例7: onFocusOnEditText
import android.os.Parcel; //导入方法依赖的package包/类
public void onFocusOnEditText(String deviceId, int editTextId, String currentText) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(deviceId);
_data.writeInt(editTextId);
_data.writeString(currentText);
this.mRemote.transact(3, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例8: stop
import android.os.Parcel; //导入方法依赖的package包/类
public void stop() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(19, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例9: setChannelSeekPosition
import android.os.Parcel; //导入方法依赖的package包/类
public void setChannelSeekPosition(String url, double pos) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(url);
_data.writeDouble(pos);
this.mRemote.transact(10, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例10: onSessionDestroyed
import android.os.Parcel; //导入方法依赖的package包/类
public void onSessionDestroyed() throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(2, _data, null, 1);
} finally {
_data.recycle();
}
}
示例11: onVolumeInfoChanged
import android.os.Parcel; //导入方法依赖的package包/类
public void onVolumeInfoChanged(ParcelableVolumeInfo info) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (info != null) {
_data.writeInt(1);
info.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(8, _data, null, 1);
} finally {
_data.recycle();
}
}
示例12: getId
import android.os.Parcel; //导入方法依赖的package包/类
public String getId() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
String id;
try {
data.writeInterfaceToken("com.google.android.gms.ads.identifier.internal.IAdvertisingIdService");
mBinder.transact(1, data, reply, 0);
reply.readException();
id = reply.readString();
} finally {
reply.recycle();
data.recycle();
}
return id;
}
示例13: cancelAll
import android.os.Parcel; //导入方法依赖的package包/类
public void cancelAll(String packageName) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(packageName);
this.mRemote.transact(3, _data, null, 1);
} finally {
_data.recycle();
}
}
示例14: getStateLastReceiveSpeed
import android.os.Parcel; //导入方法依赖的package包/类
public long getStateLastReceiveSpeed(String url) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeString(url);
this.mRemote.transact(5, _data, _reply, 0);
_reply.readException();
long _result = _reply.readLong();
return _result;
} finally {
_reply.recycle();
_data.recycle();
}
}
示例15: unregisterCallbackListener
import android.os.Parcel; //导入方法依赖的package包/类
public void unregisterCallbackListener(IMediaControllerCallback cb) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
_data.writeStrongBinder(cb != null ? cb.asBinder() : null);
this.mRemote.transact(4, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}