android.os.Parcel.writeNoException()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(12.2k)|赞(0)|评价(0)|浏览(223)

本文整理了Java中android.os.Parcel.writeNoException()方法的一些代码示例,展示了Parcel.writeNoException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.writeNoException()方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:writeNoException

Parcel.writeNoException介绍

[英]Special function for writing information at the front of the Parcel indicating that no exception occurred.
[中]特殊功能,用于在包裹正面书写信息,表明未发生异常。

代码示例

代码示例来源:origin: robolectric/robolectric

@Override
 protected boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
  this.code = code;
  this.data = data;
  this.reply = reply;
  this.flags = flags;
  String string = data.readString();
  reply.writeNoException();
  reply.writeString(string);
  return true;
 }
}

代码示例来源:origin: android-hacker/VirtualXposed

reply.writeNoException();
reply.writeInt(_result);
return true;
_arg0 = data.readInt();
this.cancel(_arg0);
reply.writeNoException();
return true;
data.enforceInterface(DESCRIPTOR);
this.cancelAll();
reply.writeNoException();
return true;
data.enforceInterface(DESCRIPTOR);
List<JobInfo> _result = this.getAllPendingJobs();
reply.writeNoException();
reply.writeTypedList(_result);
return true;
reply.writeNoException();
reply.writeInt(_result);
return true;
_arg0 = data.readInt();
JobInfo _result = this.getPendingJob(_arg0);
reply.writeNoException();
if ((_result != null)) {
  reply.writeInt(1);

代码示例来源:origin: limpoxe/Android-Plugin-Framework

_arg5 = data.readString();
this.basicTypes(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5);
reply.writeNoException();
return true;

代码示例来源:origin: jamorham/xDrip-plus

@Override
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_addPowerSaveWhitelistApp: {
      data.enforceInterface(DESCRIPTOR);
      java.lang.String _arg0;
      _arg0 = data.readString();
      this.addPowerSaveWhitelistApp(_arg0);
      reply.writeNoException();
      return true;
    }
  }
  return true;
}

代码示例来源:origin: Unity-Technologies/unity-ads-android

@SuppressWarnings("NullableProblems")
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
  switch (code) {
    case 1:
      data.enforceInterface(ADVERTISING_ID_SERVICE_NAME);
      String str1 = getId();
      reply.writeNoException();
      reply.writeString(str1);
      return true;
    case 2:
      data.enforceInterface(ADVERTISING_ID_SERVICE_NAME);
      boolean bool1 = 0 != data.readInt();
      boolean bool2 = getEnabled(bool1);
      reply.writeNoException();
      reply.writeInt(bool2 ? 1 : 0);
      return true;
  }
  return super.onTransact(code, data, reply, flags);
}

代码示例来源:origin: stackoverflow.com

public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
   throws RemoteException {
 switch (code) {
 case START_ACTIVITY_TRANSACTION:
 {
   data.enforceInterface(IActivityManager.descriptor);
   IBinder b = data.readStrongBinder();
   IApplicationThread app = ApplicationThreadNative.asInterface(b);
   Intent intent = Intent.CREATOR.createFromParcel(data);
   String resolvedType = data.readString();
   Uri[] grantedUriPermissions = data.createTypedArray(Uri.CREATOR);
   int grantedMode = data.readInt();
   IBinder resultTo = data.readStrongBinder();
   String resultWho = data.readString();    
   int requestCode = data.readInt();
   boolean onlyIfNeeded = data.readInt() != 0;
   boolean debug = data.readInt() != 0;
   int result = startActivity(app, intent, resolvedType,
       grantedUriPermissions, grantedMode, resultTo, resultWho,
       requestCode, onlyIfNeeded, debug);
   reply.writeNoException();
   reply.writeInt(result);
   return true;
 }
 .....

代码示例来源:origin: shyluo/CrashImmuneDecoder

reply.writeNoException();
reply.writeNoException();
onDecodeHardwareFrame(pts);
reply.writeNoException();

代码示例来源:origin: bzsome/VirtualApp-x326

public void handleTransact(Object server, Parcel data, Parcel reply) {
  data.enforceInterface(interfaceName);
  Object[] parameters = data.readArray(getClass().getClassLoader());
  if (parameters != null && parameters.length > 0) {
    for (int i = 0; i < parameters.length; i++) {
      if (converters[i] != null) {
        parameters[i] = converters[i].convert(parameters[i]);
      }
    }
  }
  try {
    Object res = method.invoke(server, parameters);
    reply.writeNoException();
    reply.writeValue(res);
  } catch (IllegalAccessException e) {
    e.printStackTrace();
    reply.writeException(e);
  } catch (InvocationTargetException e) {
    e.printStackTrace();
    reply.writeException(e);
  }
}

代码示例来源:origin: limpoxe/Android-ServiceManager

@Override
public final 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 FIRST_CODE: {
      data.enforceInterface(DESCRIPTOR);
      Bundle param;
      if ((0 != data.readInt())) {
        param = Bundle.CREATOR.createFromParcel(data);
      } else {
        param = null;
      }
      Bundle result = MethodRouter.routerToInstance(param);
      reply.writeNoException();
      if ((result != null)) {
        reply.writeInt(1);
        result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
      } else {
        reply.writeInt(0);
      }
      return true;
    }
  }
  return super.onTransact(code, data, reply, flags);
}

代码示例来源:origin: codezjx/AndLinker

@Override
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_callback: {
      data.enforceInterface(DESCRIPTOR);
      Request _arg0;
      if ((0 != data.readInt())) {
        _arg0 = Request.CREATOR.createFromParcel(data);
      } else {
        _arg0 = null;
      }
      Response _result = this.callback(_arg0);
      reply.writeNoException();
      if ((_result != null)) {
        reply.writeInt(1);
        _result.writeToParcel(reply, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
      } else {
        reply.writeInt(0);
      }
      return true;
    }
  }
  return super.onTransact(code, data, reply, flags);
}

代码示例来源:origin: jberkel/pay-me

_arg2 = data.readString();
int _result = this.isBillingSupported(_arg0, _arg1, _arg2);
reply.writeNoException();
reply.writeInt(_result);
return true;
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg4 = data.readString();
android.os.Bundle _result = this.getBuyIntent(_arg0, _arg1, _arg2, _arg3, _arg4);
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg3 = data.readString();
android.os.Bundle _result = this.getPurchases(_arg0, _arg1, _arg2, _arg3);
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg2 = data.readString();
int _result = this.consumePurchase(_arg0, _arg1, _arg2);
reply.writeNoException();
reply.writeInt(_result);
return true;

代码示例来源:origin: shyluo/CrashImmuneDecoder

@Override
  public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
    switch (code) {
      case CREATE_H264_HARDWARE_DECODER_TRANSACTION: {
        data.enforceInterface(DESCRIPTION);

        IVideoDecoder decoder = createH264HardwareDecoder();

        reply.writeNoException();
        reply.writeInt(1);
        reply.writeStrongBinder(decoder.asBinder());

        return true;
      }
    }

    return super.onTransact(code, data, reply, flags);
  }
}

代码示例来源:origin: shyluo/CrashImmuneDecoder

boolean result = config(params);
reply.writeNoException();
reply.writeInt(result ? 1 : 0);
  reply.writeNoException();
reply.writeNoException();
reply.writeNoException();
reply.writeNoException();
reply.writeNoException();

代码示例来源:origin: whyalwaysmea/AndroidDemos

@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
    throws RemoteException {
  switch (code) {
  case INTERFACE_TRANSACTION: {
    reply.writeString(DESCRIPTOR);
    return true;
  }
  case TRANSACTION_getBookList: {
    data.enforceInterface(DESCRIPTOR);
    List<Book> result = this.getBookList();
    reply.writeNoException();
    reply.writeTypedList(result);
    return true;
  }
  case TRANSACTION_addBook: {
    data.enforceInterface(DESCRIPTOR);
    Book arg0;
    if ((0 != data.readInt())) {
      arg0 = Book.CREATOR.createFromParcel(data);
    } else {
      arg0 = null;
    }
    this.addBook(arg0);
    reply.writeNoException();
    return true;
  }
  }
  return super.onTransact(code, data, reply, flags);
}

代码示例来源:origin: jberkel/pay-me

_arg2 = data.readString();
int _result = this.isBillingSupported(_arg0, _arg1, _arg2);
reply.writeNoException();
reply.writeInt(_result);
return true;
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg4 = data.readString();
android.os.Bundle _result = this.getBuyIntent(_arg0, _arg1, _arg2, _arg3, _arg4);
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg3 = data.readString();
android.os.Bundle _result = this.getPurchases(_arg0, _arg1, _arg2, _arg3);
reply.writeNoException();
if ((_result!=null)) {
reply.writeInt(1);
_arg2 = data.readString();
int _result = this.consumePurchase(_arg0, _arg1, _arg2);
reply.writeNoException();
reply.writeInt(_result);
return true;

代码示例来源:origin: rockon999/LeanbackLauncher

data.enforceInterface("IRecommendationsService");
  int _result2 = getApiVersion();
  reply.writeNoException();
  reply.writeInt(_result2);
  return true;
  data.enforceInterface("IRecommendationsService");
  registerRecommendationsClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()), data.readInt());
  reply.writeNoException();
  return true;
case 3:
  data.enforceInterface("IRecommendationsService");
  unregisterRecommendationsClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()));
  reply.writeNoException();
  return true;
case 4:
  data.enforceInterface("IRecommendationsService");
  registerPartnerRowClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()), data.readInt());
  reply.writeNoException();
  return true;
case 5:
  data.enforceInterface("IRecommendationsService");
  unregisterPartnerRowClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()));
  reply.writeNoException();
  return true;
case 6:
  data.enforceInterface("IRecommendationsService");
  dismissRecommendation(data.readString());
  reply.writeNoException();

代码示例来源:origin: codezjx/AndLinker

reply.writeNoException();
if ((_result != null)) {
  reply.writeInt(1);
_arg0 = ICallback.Stub.asInterface(data.readStrongBinder());
this.register(_arg0);
reply.writeNoException();
return true;
_arg0 = ICallback.Stub.asInterface(data.readStrongBinder());
this.unRegister(_arg0);
reply.writeNoException();
return true;

代码示例来源:origin: MoMoWait/LeanbackLauncher

data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  int _result2 = getApiVersion();
  reply.writeNoException();
  reply.writeInt(_result2);
  return true;
  data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  registerRecommendationsClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()), data.readInt());
  reply.writeNoException();
  return true;
case android.support.v7.preference.R.styleable.Preference_android_layout /*3*/:
  data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  unregisterRecommendationsClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()));
  reply.writeNoException();
  return true;
case android.support.v7.preference.R.styleable.Preference_android_title /*4*/:
  data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  registerPartnerRowClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()), data.readInt());
  reply.writeNoException();
  return true;
case android.support.v7.preference.R.styleable.Preference_android_selectable /*5*/:
  data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  unregisterPartnerRowClient(IRecommendationsClient.Stub.asInterface(data.readStrongBinder()));
  reply.writeNoException();
  return true;
case android.support.v7.preference.R.styleable.Preference_android_key /*6*/:
  data.enforceInterface("com.rockchips.android.tvrecommendations.IRecommendationsService");
  dismissRecommendation(data.readString());
  reply.writeNoException();

代码示例来源:origin: klinker41/android-smsmms

_arg1 = data.readInt();
this.setUidPolicy(_arg0, _arg1);
reply.writeNoException();
return true;
_arg0 = data.readInt();
int _result = this.getUidPolicy(_arg0);
reply.writeNoException();
reply.writeInt(_result);
return true;
_arg0 = data.readInt();
int[] _result = this.getUidsWithPolicy(_arg0);
reply.writeNoException();
reply.writeIntArray(_result);
return true;
_arg0 = data.readInt();
boolean _result = this.isUidForeground(_arg0);
reply.writeNoException();
reply.writeInt(((_result) ? (1) : (0)));
return true;
_arg0 = android.net.INetworkPolicyListener.Stub.asInterface(data.readStrongBinder());
this.registerListener(_arg0);
reply.writeNoException();
return true;
_arg0 = android.net.INetworkPolicyListener.Stub.asInterface(data.readStrongBinder());

代码示例来源:origin: com.madgag/ssh-android

reply.writeNoException();
reply.writeMap(_result);
return true;
_arg1 = data.createByteArray();
byte[] _result = this.sign(_arg0, _arg1);
reply.writeNoException();
reply.writeByteArray(_result);
return true;

相关文章

Parcel类方法