Restrict wifi p2p broadcasts
1. Add new API requestDeviceInfo to support get device information since
remove sticky intent for permission protect
Intents from sticy to non-sticy:
WIFI_P2P_CONNECTION_CHANGED_ACTION
WIFI_P2P_THIS_DEVICE_CHANGED_ACTION
2. Add unit test for new API in #1
3. Add location fine permission for broadcast, only apps with location permissions
should receive broadcasts that carry device or peer information.
Intents which are protected by permission:
WIFI_P2P_CONNECTION_CHANGED_ACTION
WIFI_P2P_THIS_DEVICE_CHANGED_ACTION
WIFI_P2P_PEERS_CHANGED_ACTION
Bug: 77228252
Test: Unit tests - atest frameworks/opt/net/wifi/tests/wifitests
Test: Manually test Wi-Fi Direct settings/WiFiDirectDemo
Change-Id: Ide348eb09a9f7c523bb5a9cf5cb343af19dbe6dd
2 files changed