A new class has been added in Android 6.0: NetworkStatsManager
. This helps you query for data usage statistics that can be seen in Settings | Data usage.
Access for profile owners is automatically granted in order for them to query data on their profile. Device owners get access to the data usage of the managed primary user.