当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.getBinder方法代码示例

本文整理汇总了Java中android.os.Bundle.getBinder方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.getBinder方法的具体用法?Java Bundle.getBinder怎么用?Java Bundle.getBinder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.getBinder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBinder

import android.os.Bundle; //导入方法依赖的package包/类
public static IBinder getBinder(Bundle bundle, String key) {
    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
        return bundle.getBinder(key);
    } else {
        try {
            return (IBinder) ReflectUtil.invoke(Bundle.class, bundle, "getIBinder", key);
        } catch (Exception e) {
        }

        return null;
    }
}
 
开发者ID:didi,项目名称:VirtualAPK,代码行数:13,代码来源:PluginUtil.java

示例2: getBinder

import android.os.Bundle; //导入方法依赖的package包/类
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);
	}
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:8,代码来源:BundleCompat.java

示例3: onTransact

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags)
		throws RemoteException {
	
	if(code == ServiceContext.TRANSACT_BUNDLE_SENDER) {
		Bundle bundle = data.readBundle();
		
		IBinder binder = bundle.getBinder(ServiceContext.EXTRA_CALLBACK);
		
		Bundle result = onReceiver(bundle,new IBinderCallback(binder));
		reply.writeBundle(result);
	}
	
	return true;
}
 
开发者ID:devyok,项目名称:DroidIPC,代码行数:16,代码来源:BundleReceiveDecorator.java

示例4: getBinder

import android.os.Bundle; //导入方法依赖的package包/类
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);
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:8,代码来源:BundleCompat.java

示例5: createClientServiceManager

import android.os.Bundle; //导入方法依赖的package包/类
static ServiceManagerImpl createClientServiceManager(Context context,Intent intent) {
	
	log("createClientServiceManager");
	
	Bundle binders = intent.getBundleExtra(ServiceContext.EXTRA_BUNDLE);
	IBinder remoteServiceManager = binders.getBinder(ServiceContext.EXTRA_BUNDLE_BINDER);
	
	int cmd = intent.getIntExtra(ServiceContext.EXTRA_COMMAND, ServiceContext.CMD_CREATE_CLIENT_SERVICE_MANAGER);
	
	log("createClientServiceManager cmd = " + cmd);
	
	ServiceManagerImpl serviceManager = ServiceManagerImpl.createLocalServiceManager(context, remoteServiceManager);
	
	return serviceManager;
}
 
开发者ID:devyok,项目名称:DroidIPC,代码行数:16,代码来源:ServiceManagerImpl.java

示例6: getBinder

import android.os.Bundle; //导入方法依赖的package包/类
public static IBinder getBinder(Bundle bundle, String key) {
    return bundle.getBinder(key);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:BundleCompatJellybeanMR2.java

示例7: onHandleCommand

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onHandleCommand(int cmd, Intent intent) {
	
	if(cmd == ServiceContext.CMD_GET_SERVER_SERVICE_MANAGER) {
		
		Bundle binders = intent.getBundleExtra(ServiceContext.EXTRA_BUNDLE);
		IBinder serverReadyBinder = binders.getBinder(ServiceContext.EXTRA_BUNDLE_SERVER_READY_BINDER);
		String packageName = binders.getString(ServiceContext.EXTRA_BUNDLE_PACKAGE_NAME);
		
		ServerReadyNotifier serverReadyNotifier = new ServerReadyNotifier(packageName,serverReadyBinder);
		serverReadyNotifier.runInCoreThread();
		
	}
	
}
 
开发者ID:devyok,项目名称:DroidIPC,代码行数:16,代码来源:RemoteClientCommandListener.java


注:本文中的android.os.Bundle.getBinder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。