public static IBinder getBinder(Bundle bundle, String key) { if (Build.VERSION.SDK_INT >= 18) { return bundle.getBinder(key); } else { return mirror.android.os.Bundle.getIBinder.call(bundle, key); } }
public static IBinder getBinder(Bundle bundle, String key) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { return bundle.getBinder(key); } else { return (IBinder) RefIectUtil.invokeMethod(bundle, Bundle.class, "getIBinder", new Class[]{String.class}, new Object[]{key}); } }
public static IBinder getBinder(Bundle bundle, String key) { if (Build.VERSION.SDK_INT >= 18) { return bundle.getBinder(key); } else { return mirror.android.os.Bundle.getIBinder.call(bundle, key); } }
public static IBinder getBinder(Bundle bundle, String key) { if (Build.VERSION.SDK_INT >= 18) { return bundle.getBinder(key); } else { return mirror.android.os.Bundle.getIBinder.call(bundle, key); } }
public static IBinder getBinder(Bundle bundle, String key) { return Build.VERSION.SDK_INT >= 18 ? bundle.getBinder(key) : BundleCompatBaseImpl.getBinder(bundle, key); }
@Override public int onStartCommand(Intent intent, int flags, int startId) { Bundle extras = intent.getBundleExtra("extra"); mServiceMain = IShelterService.Stub.asInterface(extras.getBinder("main")); mServiceWork = IShelterService.Stub.asInterface(extras.getBinder("work")); return START_REDELIVER_INTENT; }
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mDefaultIcon = getActivity().getPackageManager().getDefaultActivityIcon(); IBinder service = getArguments().getBinder("service"); mService = IShelterService.Stub.asInterface(service); mIsRemote = getArguments().getBoolean("is_remote"); }
private void appInstallFinished(int resultCode) { // Clear the fd anyway since we have finished installation. // Because we might have been installing an APK opened from // the other profile. We don't know, but just clean it. FileProviderProxy.clearForwardProxy(); if (!getIntent().hasExtra("callback")) return; // Send the result code back to the caller Bundle callbackExtra = getIntent().getBundleExtra("callback"); IAppInstallCallback callback = IAppInstallCallback.Stub .asInterface(callbackExtra.getBinder("callback")); try { callback.callback(resultCode); } catch (RemoteException e) { // do nothing } finish(); }
@Override public void onServiceConnected(ComponentName name, IBinder service) { IFileShuttleService shuttle = IFileShuttleService.Stub.asInterface(service); IFileShuttleServiceCallback callback = IFileShuttleServiceCallback.Stub.asInterface( getIntent().getBundleExtra("extra").getBinder("callback")); try { callback.callback(shuttle); } catch (RemoteException e) { // Do Nothing } finish(); }
IBinder binder = extra.getBinder("service"); mServiceWork = IShelterService.Stub.asInterface(binder); startKiller();
public void testBareboneCustomTabIntent() { CustomTabsIntent customTabsIntent = new CustomTabsIntent.Builder().build(); Intent intent = customTabsIntent.intent; assertNotNull(intent); assertNull(customTabsIntent.startAnimationBundle); assertEquals(Intent.ACTION_VIEW, intent.getAction()); assertTrue(intent.hasExtra(CustomTabsIntent.EXTRA_SESSION)); assertNull(intent.getExtras().getBinder(CustomTabsIntent.EXTRA_SESSION)); assertNull(intent.getComponent()); }
addPreferencesFromResource(R.xml.preferences_settings); mServiceWork = IShelterService.Stub.asInterface( ((Bundle) getActivity().getIntent().getParcelableExtra("extras")).getBinder("profile_service"));