一. WifiP2pSettings和WifiP2pService介绍
WifiP2pSettings是Settings应用中负责处理P2P相关UI/UE逻辑的主要类,与之交互的则是位于SystemServer进程中的WifiP2pService.
1.1 涉及源码文件名及位置 (备注Android 13中代码已经在packages/modules/目录下,非framework目录)
- WifiP2pSettings packages/apps/Settings/src/com/android/settings/wifi/p2p/WifiP2pSettings.java
- WifiP2pManager packages/modules/Wifi/framework/java/android/net/wifi/p2p/WifiP2pManager.java
- WifiP2pServiceImpl packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
- WifiP2pService packages/modules/Wifi/service/java/com/android/server/wifi/p2p/WifiP2pService.java
- WifiNative packages/modules/Wifi/service/java/com/android/server/wifi/WifiNative.java