當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。