Remove data item from app info when not supported
Bug: 21207963 Change-Id: I91693d9a85c0905cbb021181967fa16aac61d3ea
This commit is contained in:
@@ -55,7 +55,9 @@ import android.net.Uri;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.INetworkManagementService;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.os.storage.StorageManager;
|
||||
@@ -1179,4 +1181,14 @@ public final class Utils {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isBandwidthControlEnabled() {
|
||||
final INetworkManagementService netManager = INetworkManagementService.Stub
|
||||
.asInterface(ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE));
|
||||
try {
|
||||
return netManager.isBandwidthControlEnabled();
|
||||
} catch (RemoteException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user