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

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

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

RemoteException.<init>介绍

暂无

代码示例

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

private Context createPackageContext(String packageName) {
  try {
    Context hostContext = VirtualCore.get().getContext();
    return hostContext.createPackageContext(packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
  } catch (PackageManager.NameNotFoundException e) {
    e.printStackTrace();
    VirtualRuntime.crash(new RemoteException());
  }
  throw new RuntimeException();
}

代码示例来源:origin: firebase/firebase-jobdispatcher-android

@Test
public void serviceConnected_unbindsAfterRemoteException() throws Exception {
 binderMock.setStartException(new RemoteException("something bad happened"));
 connection.onServiceConnected(null, binderMock);
 assertTrue(connection.wasUnbound());
}

代码示例来源:origin: firebase/firebase-jobdispatcher-android

@Test
public void onStop_unbindsAfterRemoteException() throws Exception {
 connection.onServiceConnected(null, binderMock);
 binderMock.verifyStartArguments(jobData, noopCallback);
 assertFalse(connection.wasUnbound());
 binderMock.setStopException(new RemoteException("something bad happened"));
 connection.onStop(job, true);
 binderMock.verifyStopArguments(jobData, true);
 assertTrue(connection.wasUnbound());
 verify(contextMock).unbindService(connection);
}

代码示例来源:origin: AltBeacon/android-beacon-library

@TargetApi(18)
private void applyChangesToServices(int type, Region region) throws RemoteException {
  if (mScheduledScanJobsEnabled) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      ScanJobScheduler.getInstance().applySettingsToScheduledJob(mContext, this);
    }
    return;
  }
  if (serviceMessenger == null) {
    throw new RemoteException("The BeaconManager is not bound to the service.  Call beaconManager.bind(BeaconConsumer consumer) and wait for a callback to onBeaconServiceConnect()");
  }
  Message msg = Message.obtain(null, type, 0, 0);
  if (type == BeaconService.MSG_SET_SCAN_PERIODS) {
    msg.setData(new StartRMData(this.getScanPeriod(), this.getBetweenScanPeriod(), this.mBackgroundMode).toBundle());
  }
  else if (type == BeaconService.MSG_SYNC_SETTINGS) {
    msg.setData(new SettingsData().collect(mContext).toBundle());
  }
  else {
    msg.setData(new StartRMData(region, callbackPackageName(), getScanPeriod(), getBetweenScanPeriod(), mBackgroundMode).toBundle());
  }
  serviceMessenger.send(msg);
}

代码示例来源:origin: gateship-one/odyssey

public synchronized IOdysseyPlaybackService getPBS() throws RemoteException {
  if (mPlaybackService != null) {
    return mPlaybackService;
  } else {
    throw new RemoteException();
  }
}

代码示例来源:origin: tslamic/premiumer

@Override
public Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type,
  String developerPayload) throws RemoteException {
 throw new RemoteException();
}

代码示例来源:origin: gateship-one/odyssey

public IOdysseyPlaybackService getPlaybackService() throws RemoteException {
  if (mServiceConnection != null) {
    return mServiceConnection.getPBS();
  } else {
    throw new RemoteException();
  }
}

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

public void registerPartnerRowClient(IRecommendationsClient client, int version) throws RemoteException {
  if (version < 1) {
    throw new RemoteException("Unsupported client version: " + version);
  }
  registerRecommendationsClient(client, true);
}

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

public void registerPartnerRowClient(IRecommendationsClient client, int version) throws RemoteException {
  if (version < 1) {
    throw new RemoteException("Unsupported client version: " + version);
  }
  registerRecommendationsClient(client, true);
}

代码示例来源:origin: tslamic/premiumer

@Override
public Bundle getSkuDetails(int apiVersion, String packageName, String type, Bundle skusBundle)
  throws RemoteException {
 throw new RemoteException();
}

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

@Override
public Bundle getPurchases(int apiVersion,
              String packageName,
              String type,
              String continuationToken) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_GET_ACTIONS, false)) {
    throw new RemoteException();
  }
  return bundle.getParcelable(GET_PURCHASES);
}

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

@Override
public Bundle getBuyIntent(int apiVersion,
              String packageName,
              String sku,
              String type,
              String developerPayload) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_GET_ACTIONS, false)) {
    throw new RemoteException();
  }
  return bundle.getParcelable(GET_BUY_INTENT);
}

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

@Override
public int isBillingSupported(int apiVersion,
               String packageName,
               String type) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_BILLING_SUPPORTED, false)) {
    throw new RemoteException();
  }
  return bundle.getInt(IN_APP_BILLING_SUPPORTED, 0);
}

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

@Override
public Bundle getBuyIntent(int apiVersion,
              String packageName,
              String sku,
              String type,
              String developerPayload) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_GET_ACTIONS, false)) {
    throw new RemoteException();
  }
  return bundle.getParcelable(GET_BUY_INTENT);
}

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

@Override
public Bundle getSkuDetails(int apiVersion,
              String packageName,
              String type,
              Bundle skusBundle) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_GET_ACTIONS, false)) {
    throw new RemoteException();
  }
  return bundle.getParcelable(GET_SKU_DETAILS);
}

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

@Override
public Bundle getSkuDetails(int apiVersion,
              String packageName,
              String type,
              Bundle skusBundle) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_GET_ACTIONS, false)) {
    throw new RemoteException();
  }
  return bundle.getParcelable(GET_SKU_DETAILS);
}

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

@Override
public int isBillingSupported(int apiVersion,
               String packageName,
               String type) throws RemoteException {
  if (bundle.getBoolean(THROW_REMOTE_EXCEPTION_ON_BILLING_SUPPORTED, false)) {
    throw new RemoteException();
  }
  return bundle.getInt(IN_APP_BILLING_SUPPORTED, 0);
}

代码示例来源:origin: gigabytedevelopers/FireFiles

public static ContentProviderClient acquireUnstableProviderOrThrow(
    ContentResolver resolver, String authority) throws RemoteException {
  final ContentProviderClient client = ContentProviderClientCompat.acquireUnstableContentProviderClient(resolver, authority);
  if (client == null) {
    throw new RemoteException("Failed to acquire provider for " + authority);
  }
  ContentProviderClientCompat.setDetectNotResponding(client, PROVIDER_ANR_TIMEOUT);
  return client;
}

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

private Context createPackageContext(String packageName) {
  try {
    Context hostContext = VirtualCore.get().getContext();
    return hostContext.createPackageContext(packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
  } catch (PackageManager.NameNotFoundException e) {
    e.printStackTrace();
    VirtualRuntime.crash(new RemoteException());
  }
  throw new RuntimeException();
}

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

private Context createPackageContext(String packageName) {
  try {
    Context hostContext = VirtualCore.get().getContext();
    return hostContext.createPackageContext(packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
  } catch (PackageManager.NameNotFoundException e) {
    e.printStackTrace();
    VirtualRuntime.crash(new RemoteException());
  }
  throw new RuntimeException();
}

相关文章