Update to ConnectivityService to use utils am: 4ab1ffca29

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1934218

Change-Id: I7c7ad0a9e797ad6c279fe97c66211854d061dfea
This commit is contained in:
James Mattis
2022-01-06 04:32:48 +00:00
committed by Automerger Merge Worker

View File

@@ -10235,13 +10235,9 @@ public class ConnectivityService extends IConnectivityManager.Stub
} }
private void enforceAutomotiveDevice() { private void enforceAutomotiveDevice() {
final boolean isAutomotiveDevice = PermissionUtils.enforceSystemFeature(mContext, PackageManager.FEATURE_AUTOMOTIVE,
mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE);
if (!isAutomotiveDevice) {
throw new UnsupportedOperationException(
"setOemNetworkPreference() is only available on automotive devices."); "setOemNetworkPreference() is only available on automotive devices.");
} }
}
/** /**
* Used by automotive devices to set the network preferences used to direct traffic at an * Used by automotive devices to set the network preferences used to direct traffic at an