Java Code Examples for android.os.Parcel.readException()

The following are Jave code examples for showing how to use readException() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: kognitivo   File: AttributionIdentifiers.java   View Source Code Vote up 6 votes
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;
}
 
Example 2
Project: letv   File: d.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 3
Project: boohee_v5.6   File: IRemoteServiceCallback.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 4
Project: letv   File: IMediaSession.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 5
Project: letv   File: AIDLService.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 6
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 7
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 8
Project: letv   File: IMediaSession.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 9
Project: letv   File: IMediaSession.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 10
Project: PlusGram   File: ICustomTabsService.java   View Source Code Vote up 6 votes
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;
}
 
Example 11
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 12
Project: letv   File: TmsCallbackProxy.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 13
Project: airgram   File: ICustomTabsService.java   View Source Code Vote up 5 votes
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;
}
 
Example 14
Project: letv   File: d.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 15
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 16
Project: boohee_v5.6   File: IAlixPay.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 17
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 18
Project: boohee_v5.6   File: IMediaSession.java   View Source Code Vote up 5 votes
public void registerCallbackListener(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(3, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
Example 19
Project: letv   File: ICdeBinder.java   View Source Code Vote up 5 votes
public String getCdeVersion() throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        this.mRemote.transact(2, _data, _reply, 0);
        _reply.readException();
        String _result = _reply.readString();
        return _result;
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
Example 20
Project: letv   File: RubbishScanListenerProxy.java   View Source Code Vote up 5 votes
public void onRubbishFound(int type, DataEntity result) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        data.writeInt(type);
        result.writeToParcel(data, 0);
        this.mRemote.transact(2, data, reply, 0);
        reply.readException();
    } finally {
        data.recycle();
        reply.recycle();
    }
}