android.os.RemoteException.getMessage()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(95)

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

RemoteException.getMessage介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onClick(View view) {
 try {
  binding.download(TO_DOWNLOAD);
 }
 catch (RemoteException e) {
  Log.e(getClass().getSimpleName(), "Exception requesting download", e);
  Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();
 }
}

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

@Override
public void renameAccount(int userId, IAccountManagerResponse response, Account accountToRename, String newName) {
  if (accountToRename == null) throw new IllegalArgumentException("account is null");
  Account resultingAccount = renameAccountInternal(userId, accountToRename, newName);
  Bundle result = new Bundle();
  result.putString(AccountManager.KEY_ACCOUNT_NAME, resultingAccount.name);
  result.putString(AccountManager.KEY_ACCOUNT_TYPE, resultingAccount.type);
  try {
    response.onResult(result);
  } catch (RemoteException e) {
    Log.w(TAG, e.getMessage());
  }
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onClick(View view) {
 try {
  binding.download(TO_DOWNLOAD);
 }
 catch (RemoteException e) {
  Log.e(getClass().getSimpleName(), "Exception requesting download", e);
  Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public void onClick(View view) {
 try {
  binding.download(TO_DOWNLOAD, cb);
 }
 catch (RemoteException e) {
  Log.e(getClass().getSimpleName(), "Exception requesting download", e);
  Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();
 }
}

代码示例来源:origin: schwabe/ics-openvpn

protected void listVPNs() {
  try {
    List<APIVpnProfile> list = mService.getProfiles();
    String all="List:";
    for(APIVpnProfile vp:list.subList(0, Math.min(5, list.size()))) {
      all = all + vp.mName + ":" + vp.mUUID + "\n";
    }
    if (list.size() > 5)
      all +="\n And some profiles....";
    if(list.size()> 0) {
      Button b= mStartVpn;
      b.setOnClickListener(this);
      b.setVisibility(View.VISIBLE);
      b.setText(list.get(0).mName);
      mStartUUID = list.get(0).mUUID;
    }
    mHelloWorld.setText(all);
  } catch (RemoteException e) {
    // TODO Auto-generated catch block
    mHelloWorld.setText(e.getMessage());
  }
}

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

public void onSlow(boolean restart) {
  if (callback != null) {
    try {
      callback.onSlow(restart);
    } catch (RemoteException e) {
      Log.e(LOG_TAG, "Faile to notify decoder slow, error: " + e.getMessage());
    }
  }
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

@Override
  public void send(final Intent message) {
    try {
      callback.sendMessage(message);
    } catch (RemoteException e) {
      mLogger.warning("Failed to send message to Device Connect Manager: message = " +
        e.getMessage());
    }
  }
});

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

public void onDecodeHardwareFrame(long pts) {
  if (callback != null) {
    try {
      callback.onDecodeHardwareFrame(pts);
    } catch (RemoteException e) {
      Log.e(LOG_TAG, "Faile to notify hardware decode event, error: " + e.getMessage());
    }
  }
}

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

public void onError(int code) {
  if (callback != null) {
    try {
      callback.onError(code);
    } catch (RemoteException e) {
      Log.e(LOG_TAG, "Faile to notify error code: " + code + ", error: " + e.getMessage());
    }
  }
}

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

@Override
public void renameAccount(int userId, IAccountManagerResponse response, Account accountToRename, String newName) {
  if (accountToRename == null) throw new IllegalArgumentException("account is null");
  Account resultingAccount = renameAccountInternal(userId, accountToRename, newName);
  Bundle result = new Bundle();
  result.putString(AccountManager.KEY_ACCOUNT_NAME, resultingAccount.name);
  result.putString(AccountManager.KEY_ACCOUNT_TYPE, resultingAccount.type);
  try {
    response.onResult(result);
  } catch (RemoteException e) {
    Log.w(TAG, e.getMessage());
  }
}

代码示例来源:origin: darkskygit/VirtualApp

@Override
public void renameAccount(int userId, IAccountManagerResponse response, Account accountToRename, String newName) {
  if (accountToRename == null) throw new IllegalArgumentException("account is null");
  Account resultingAccount = renameAccountInternal(userId, accountToRename, newName);
  Bundle result = new Bundle();
  result.putString(AccountManager.KEY_ACCOUNT_NAME, resultingAccount.name);
  result.putString(AccountManager.KEY_ACCOUNT_TYPE, resultingAccount.type);
  try {
    response.onResult(result);
  } catch (RemoteException e) {
    Log.w(TAG, e.getMessage());
  }
}

代码示例来源:origin: thuryn/your-local-weather

public void onServiceConnected(ComponentName className, IBinder binderService) {
  widgetRefreshIconService = new Messenger(binderService);
  widgetRotationServiceLock.lock();
  try {
    while (!unsentMessages.isEmpty()) {
      widgetRefreshIconService.send(unsentMessages.poll());
    }
  } catch (RemoteException e) {
    appendLog(context, TAG, e.getMessage(), e);
  } finally {
    widgetRotationServiceLock.unlock();
  }
}
public void onServiceDisconnected(ComponentName className) {

代码示例来源:origin: alessandrojp/android-easy-checkout

private Bundle getPurchasesBundle(IInAppBillingService service,
                 String itemType,
                 String continueToken) throws BillingException {
  try {
    return service.getPurchases(mApiVersion, mPackageName, itemType, continueToken);
  } catch (RemoteException e) {
    throw new BillingException(Constants.ERROR_REMOTE_EXCEPTION, e.getMessage());
  }
}

代码示例来源:origin: thuryn/your-local-weather

public void onServiceConnected(ComponentName className, IBinder binderService) {
  currentWeatherService = new Messenger(binderService);
  currentWeatherServiceLock.lock();
  try {
    while (!currentWeatherUnsentMessages.isEmpty()) {
      currentWeatherService.send(currentWeatherUnsentMessages.poll());
    }
  } catch (RemoteException e) {
    appendLog(getBaseContext(), TAG, e.getMessage(), e);
  } finally {
    currentWeatherServiceLock.unlock();
  }
}
public void onServiceDisconnected(ComponentName className) {

代码示例来源:origin: thuryn/your-local-weather

public void onServiceConnected(ComponentName className, IBinder binderService) {
  weatherForecastService = new Messenger(binderService);
  weatherForecastServiceLock.lock();
  try {
    while (!weatherForecastUnsentMessages.isEmpty()) {
      weatherForecastService.send(weatherForecastUnsentMessages.poll());
    }
  } catch (RemoteException e) {
    appendLog(getBaseContext(), TAG, e.getMessage(), e);
  } finally {
    weatherForecastServiceLock.unlock();
  }
}
public void onServiceDisconnected(ComponentName className) {

代码示例来源:origin: thuryn/your-local-weather

public void onServiceConnected(ComponentName className, IBinder binderService) {
  weatherForecastService = new Messenger(binderService);
  weatherForecastServiceLock.lock();
  try {
    while (!weatherForecastUnsentMessages.isEmpty()) {
      weatherForecastService.send(weatherForecastUnsentMessages.poll());
    }
  } catch (RemoteException e) {
    appendLog(getBaseContext(), TAG, e.getMessage(), e);
  } finally {
    weatherForecastServiceLock.unlock();
  }
}
public void onServiceDisconnected(ComponentName className) {

代码示例来源:origin: johncarpenter/Android-GPX-Mock-Location-Provider

public void onServiceConnected(ComponentName name, IBinder boundService) {
  service = IPlaybackService.Stub.asInterface(boundService);
  try {
    state = service.getState();
  } catch (RemoteException e) {
    Logger.e(LOGNAME, "Unable to access state:" + e.getMessage());
  }
  updateUi();
}

代码示例来源:origin: MicrosoftTranslator/Local-Feature-Android

TextTranslationResult translate(String key, String category, String fromCode, String toCode, List<String> texts) {
  if (iTranslatorApi == null) {
    return new TextTranslationResult(Translator.ERROR_NOT_BOUND, "not bound!");
  }
  try {
    return new TextTranslationResult(iTranslatorApi.translateTextArray(key, category, fromCode, toCode, texts));
  } catch (RemoteException ex) {
    return new TextTranslationResult(Translator.ERROR_OTHER, ex.getMessage());
  }
}

代码示例来源:origin: MicrosoftTranslator/Local-Feature-Android

LanguageListResult getTextLanguages() {
  if (iTranslatorApi == null) {
    return new LanguageListResult(Translator.ERROR_NOT_BOUND, "not bound!");
  }
  try {
    return new LanguageListResult(iTranslatorApi.getTextLanguages());
  } catch (RemoteException ex) {
    return new LanguageListResult(Translator.ERROR_OTHER, ex.getMessage());
  }
}

代码示例来源:origin: TongmingWu/Manga

private void pauseTask(DownloadInfo info) {
  if (serviceStarted) {
    try {
      Logger.d("暂停" + info.getChapter_name() + "的下载");
      binder.pauseTask(info);
    } catch (RemoteException e) {
      Logger.e(e.getMessage());
    }
  }
}

相关文章