Remove data item from app info when not supported

Bug: 21207963
Change-Id: I91693d9a85c0905cbb021181967fa16aac61d3ea
This commit is contained in:
Jason Monk
2015-05-20 13:35:43 -04:00
parent f675409e23
commit b45e27bc0f
3 changed files with 35 additions and 22 deletions

View File

@@ -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;
}
}
}