Merge "Enforce NETWORK_STACK permission for calling NSS#forceUpdateIfaces"
am: 41c49d1a8e
Change-Id: Id5922a41d07c95958090f88a65d22ef5883aefff
This commit is contained in:
@@ -25,6 +25,7 @@ import static android.content.Intent.ACTION_USER_REMOVED;
|
|||||||
import static android.content.Intent.EXTRA_UID;
|
import static android.content.Intent.EXTRA_UID;
|
||||||
import static android.net.ConnectivityManager.ACTION_TETHER_STATE_CHANGED;
|
import static android.net.ConnectivityManager.ACTION_TETHER_STATE_CHANGED;
|
||||||
import static android.net.ConnectivityManager.isNetworkTypeMobile;
|
import static android.net.ConnectivityManager.isNetworkTypeMobile;
|
||||||
|
import static android.net.NetworkStack.checkNetworkStackPermission;
|
||||||
import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
|
import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
|
||||||
import static android.net.NetworkStats.IFACE_ALL;
|
import static android.net.NetworkStats.IFACE_ALL;
|
||||||
import static android.net.NetworkStats.INTERFACES_ALL;
|
import static android.net.NetworkStats.INTERFACES_ALL;
|
||||||
@@ -899,7 +900,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
VpnInfo[] vpnArray,
|
VpnInfo[] vpnArray,
|
||||||
NetworkState[] networkStates,
|
NetworkState[] networkStates,
|
||||||
String activeIface) {
|
String activeIface) {
|
||||||
mContext.enforceCallingOrSelfPermission(READ_NETWORK_USAGE_HISTORY, TAG);
|
checkNetworkStackPermission(mContext);
|
||||||
assertBandwidthControlEnabled();
|
assertBandwidthControlEnabled();
|
||||||
|
|
||||||
final long token = Binder.clearCallingIdentity();
|
final long token = Binder.clearCallingIdentity();
|
||||||
|
|||||||
Reference in New Issue
Block a user