readException ( )源码实例Demo

android.os.Parcel#readException ( )源码实例Demo

下面列出了android.os.Parcel#readException ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: Telegram   文件: ICustomTabsCallback.java
public void onPostMessage(String message, Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsCallback");
        _data.writeString(message);
        if(extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(5, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

}
 
源代码2 项目: TelePlus-Android   文件: ICustomTabsCallback.java
public void onNavigationEvent(int navigationEvent, Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsCallback");
        _data.writeInt(navigationEvent);
        if(extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(2, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

}
 
源代码3 项目: letv   文件: IMediaSession.java
public void playFromSearch(String string, Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        _data.writeString(string);
        if (extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }
        this.mRemote.transact(15, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
源代码4 项目: Telegram   文件: ICustomTabsCallback.java
public void onMessageChannelReady(Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsCallback");
        if(extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(4, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

}
 
源代码5 项目: android-art-res   文件: BookManagerImpl.java
@Override
public List<Book> getBookList() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    List<Book> result;
    try {
        data.writeInterfaceToken(DESCRIPTOR);
        mRemote.transact(TRANSACTION_getBookList, data, reply, 0);
        reply.readException();
        result = reply.createTypedArrayList(Book.CREATOR);
    } finally {
        reply.recycle();
        data.recycle();
    }
    return result;
}
 
源代码6 项目: Telegram-FOSS   文件: ICustomTabsService.java
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;
}
 
源代码7 项目: letv   文件: d.java
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();
    }
}
 
源代码8 项目: kognitivo   文件: AttributionIdentifiers.java
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;
}
 
源代码9 项目: TelePlus-Android   文件: ICustomTabsCallback.java
public void onMessageChannelReady(Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsCallback");
        if(extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(4, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }

}
 
源代码10 项目: letv   文件: IMediaSession.java
public void playFromUri(Uri uri, Bundle extras) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        if (uri != null) {
            _data.writeInt(1);
            uri.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }
        if (extras != null) {
            _data.writeInt(1);
            extras.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }
        this.mRemote.transact(16, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
源代码11 项目: letv   文件: ExceptionUtils.java
private static final void readExceptionFromParcel(Parcel reply, String msg, int code) {
    switch (code) {
        case 1:
            throw new DeviceUnavailableException(msg);
        default:
            reply.readException(code, msg);
            return;
    }
}
 
源代码12 项目: letv   文件: IMediaSession.java
public String getPackageName() throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        this.mRemote.transact(6, _data, _reply, 0);
        _reply.readException();
        String _result = _reply.readString();
        return _result;
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
源代码13 项目: letv   文件: RubbishScanListenerProxy.java
public void onScanStarted() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        this.mRemote.transact(1, data, reply, 0);
        reply.readException();
    } finally {
        data.recycle();
        reply.recycle();
    }
}
 
源代码14 项目: letv   文件: IMediaSession.java
public void fastForward() throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        this.mRemote.transact(22, _data, _reply, 0);
        _reply.readException();
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
源代码15 项目: letv   文件: RubbishScanListenerProxy.java
public void onScanCanceled() throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    try {
        this.mRemote.transact(4, data, reply, 0);
        reply.readException();
    } finally {
        data.recycle();
        reply.recycle();
    }
}
 
源代码16 项目: TelePlus-Android   文件: ICustomTabsService.java
public Bundle extraCommand(String commandName, Bundle args) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    Bundle _result;
    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
        _data.writeString(commandName);
        if(args != null) {
            _data.writeInt(1);
            args.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(5, _data, _reply, 0);
        _reply.readException();
        if(0 != _reply.readInt()) {
            _result = Bundle.CREATOR.createFromParcel(_reply);
        } else {
            _result = null;
        }
    } finally {
        _reply.recycle();
        _data.recycle();
    }

    return _result;
}
 
源代码17 项目: letv   文件: TmsCallbackProxy.java
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();
    }
}
 
源代码18 项目: letv   文件: DeviceCallback.java
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();
    }
}
 
源代码19 项目: letv   文件: ICdeBinder.java
public int getUpgradePercentage() throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();
    try {
        _data.writeInterfaceToken(Stub.DESCRIPTOR);
        this.mRemote.transact(11, _data, _reply, 0);
        _reply.readException();
        int _result = _reply.readInt();
        return _result;
    } finally {
        _reply.recycle();
        _data.recycle();
    }
}
 
源代码20 项目: TelePlus-Android   文件: ICustomTabsService.java
public Bundle extraCommand(String commandName, Bundle args) throws RemoteException {
    Parcel _data = Parcel.obtain();
    Parcel _reply = Parcel.obtain();

    Bundle _result;
    try {
        _data.writeInterfaceToken("android.support.customtabs.ICustomTabsService");
        _data.writeString(commandName);
        if(args != null) {
            _data.writeInt(1);
            args.writeToParcel(_data, 0);
        } else {
            _data.writeInt(0);
        }

        this.mRemote.transact(5, _data, _reply, 0);
        _reply.readException();
        if(0 != _reply.readInt()) {
            _result = Bundle.CREATOR.createFromParcel(_reply);
        } else {
            _result = null;
        }
    } finally {
        _reply.recycle();
        _data.recycle();
    }

    return _result;
}
 
源代码评论
动弹
沙发等你来抢
 方法所在类
 同类方法