NetworkTools

Provider for the network tools: data usage, cellular signal, and VPN status. Combines a normal runtime permission (ACCESS_NETWORK_STATE) with the PACKAGE_USAGE_STATS special-access grant (checked via android.app.AppOpsManager, not a runtime dialog). GetDataUsageTool degrades to TrafficStats without usage access; the signal and VPN tools only need ACCESS_NETWORK_STATE.

Functions

Link copied to clipboard
fun all(context: Context): List<McpTool>

All network McpTools bound to context.

Link copied to clipboard

True only when both usage-stats access (AppOps) and ACCESS_NETWORK_STATE are granted.

Link copied to clipboard

The two permissions backing full functionality (usage-stats + network-state).