(两百零一) 探讨p2p0的粘性
前言:在平常工作中,注意到关闭热点后,p2p0就自己起来了,而这是自己又没操作p2p相关的应用,这是为什么呢? 1.p2p0自启动流程 // Check & re-enable P2P if needed. // P2P interface will be created if all of the below are true: // a) Wifi is enabled. // b) HAL (HIDL) interface is available. // c) There is atleast 1 client app which invoked initialize(). private void checkAndReEnableP2p() { boolean isHalInterfaceAvailable = isHalInterfaceAvailable(); Log.d(TAG, "Wifi enabled=" + mIsWifiEnabled + ", P2P Interface availability=" + isHalInterfaceAvailable + ", Number of clients=" + mDeathDataByBinder.size()); if (mIsWifiEnabled && isHalInterfaceAvailable &&