本文整理了Java中android.os.Bundle.getBinder()
方法的一些代码示例,展示了Bundle.getBinder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.getBinder()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:getBinder
暂无
代码示例来源:origin: android-hacker/VirtualXposed
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);
}
}
代码示例来源:origin: limpoxe/Android-ServiceManager
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});
}
}
代码示例来源:origin: bzsome/VirtualApp-x326
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);
}
}
代码示例来源:origin: darkskygit/VirtualApp
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);
}
}
代码示例来源:origin: LuckyJayce/EventBus-Apt
public static IBinder getBinder(Bundle bundle, String key) {
return Build.VERSION.SDK_INT >= 18 ? bundle.getBinder(key) : BundleCompatBaseImpl.getBinder(bundle, key);
}
代码示例来源:origin: PeterCxy/Shelter
@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;
}
代码示例来源:origin: PeterCxy/Shelter
@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");
}
代码示例来源:origin: PeterCxy/Shelter
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();
}
代码示例来源:origin: PeterCxy/Shelter
@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();
}
代码示例来源:origin: PeterCxy/Shelter
IBinder binder = extra.getBinder("service");
mServiceWork = IShelterService.Stub.asInterface(binder);
startKiller();
代码示例来源:origin: plusCubed/anticipate
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());
}
代码示例来源:origin: PeterCxy/Shelter
addPreferencesFromResource(R.xml.preferences_settings);
mServiceWork = IShelterService.Stub.asInterface(
((Bundle) getActivity().getIntent().getParcelableExtra("extras")).getBinder("profile_service"));
内容来源于网络,如有侵权,请联系作者删除!