本文整理匯總了Java中android.os.Parcel.readException方法的典型用法代碼示例。如果您正苦於以下問題:Java Parcel.readException方法的具體用法?Java Parcel.readException怎麽用?Java Parcel.readException使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.readException方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isTrackingLimited
import android.os.Parcel; //導入方法依賴的package包/類
public boolean isTrackingLimited() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
boolean limitAdTracking;
try {
data.writeInterfaceToken(
"com.google.android.gms.ads.identifier.internal.IAdvertisingIdService");
data.writeInt(1);
binder.transact(SECOND_TRANSACTION_CODE, data, reply, 0);
reply.readException();
limitAdTracking = 0 != reply.readInt();
} finally {
reply.recycle();
data.recycle();
}
return limitAdTracking;
}
示例2: a
import android.os.Parcel; //導入方法依賴的package包/類
public final String a(String str, String str2) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(z);
obtain.writeString(str);
obtain.writeString(str2);
this.a.transact(8, obtain, obtain2, 0);
obtain2.readException();
String readString = obtain2.readString();
return readString;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例3: startActivity
import android.os.Parcel; //導入方法依賴的package包/類
public final void startActivity(String str, String str2, int i, Bundle bundle) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeString(str);
obtain.writeString(str2);
obtain.writeInt(i);
if (bundle != null) {
obtain.writeInt(1);
bundle.writeToParcel(obtain, 0);
} else {
obtain.writeInt(0);
}
this.a.transact(1, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例4: sendMediaButton
import android.os.Parcel; //導入方法依賴的package包/類
public boolean sendMediaButton(KeyEvent mediaButton) throws RemoteException {
boolean _result = true;
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (mediaButton != null) {
_data.writeInt(1);
mediaButton.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(2, _data, _reply, 0);
_reply.readException();
if (_reply.readInt() == 0) {
_result = false;
}
_reply.recycle();
_data.recycle();
return _result;
} catch (Throwable th) {
_reply.recycle();
_data.recycle();
}
}
示例5: sendPush
import android.os.Parcel; //導入方法依賴的package包/類
public void sendPush(Bundle bundle, String deId) 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);
}
_data.writeString(deId);
this.mRemote.transact(4, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例6: 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();
}
}
示例7: getQueueTitle
import android.os.Parcel; //導入方法依賴的package包/類
public CharSequence getQueueTitle() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
CharSequence _result;
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(30, _data, _reply, 0);
_reply.readException();
if (_reply.readInt() != 0) {
_result = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(_reply);
} else {
_result = null;
}
_reply.recycle();
_data.recycle();
return _result;
} catch (Throwable th) {
_reply.recycle();
_data.recycle();
}
}
示例8: newSession
import android.os.Parcel; //導入方法依賴的package包/類
public boolean newSession(ICustomTabsCallback callback) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
boolean _result;
try {
_data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
_data.writeStrongBinder(callback != null ? callback.asBinder() : null);
this.mRemote.transact(3, _data, _reply, 0);
_reply.readException();
_result = 0 != _reply.readInt();
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
示例9: pause
import android.os.Parcel; //導入方法依賴的package包/類
public void pause() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(18, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}
示例10: onResultGot
import android.os.Parcel; //導入方法依賴的package包/類
public void onResultGot(int err, DataEntity result) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
try {
data.writeInt(err);
result.writeToParcel(data, 0);
this.mRemote.transact(1, data, reply, 0);
reply.readException();
} finally {
data.recycle();
reply.recycle();
}
}
示例11: mayLaunchUrl
import android.os.Parcel; //導入方法依賴的package包/類
public boolean mayLaunchUrl(ICustomTabsCallback callback, Uri url, Bundle extras, List<Bundle> otherLikelyBundles) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
boolean _result;
try {
_data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
_data.writeStrongBinder(callback != null ? callback.asBinder() : null);
if (url != null) {
_data.writeInt(1);
url.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
if (extras != null) {
_data.writeInt(1);
extras.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
_data.writeTypedList(otherLikelyBundles);
this.mRemote.transact(4, _data, _reply, 0);
_reply.readException();
_result = 0 != _reply.readInt();
} finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
示例12: b
import android.os.Parcel; //導入方法依賴的package包/類
public final void b(String str, String str2) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(z);
obtain.writeString(str);
obtain.writeString(str2);
this.a.transact(9, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例13: getQueue
import android.os.Parcel; //導入方法依賴的package包/類
public List<QueueItem> getQueue() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(29, _data, _reply, 0);
_reply.readException();
List<QueueItem> _result = _reply.createTypedArrayList(QueueItem.CREATOR);
return _result;
} finally {
_reply.recycle();
_data.recycle();
}
}
示例14: prePay
import android.os.Parcel; //導入方法依賴的package包/類
public final String prePay(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(Stub.DESCRIPTOR);
obtain.writeString(str);
this.a.transact(5, obtain, obtain2, 0);
obtain2.readException();
String readString = obtain2.readString();
return readString;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例15: play
import android.os.Parcel; //導入方法依賴的package包/類
public void play() throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
this.mRemote.transact(13, _data, _reply, 0);
_reply.readException();
} finally {
_reply.recycle();
_data.recycle();
}
}