Update to ConnectivityService to use utils am: 4ab1ffca29 am: 241bbaddf3
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1934218 Change-Id: I5cdadfa7d589e63013baf752d1dc752dfc9c3cc2
This commit is contained in:
@@ -10235,12 +10235,8 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
private void enforceAutomotiveDevice() {
|
||||
final boolean isAutomotiveDevice =
|
||||
mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE);
|
||||
if (!isAutomotiveDevice) {
|
||||
throw new UnsupportedOperationException(
|
||||
"setOemNetworkPreference() is only available on automotive devices.");
|
||||
}
|
||||
PermissionUtils.enforceSystemFeature(mContext, PackageManager.FEATURE_AUTOMOTIVE,
|
||||
"setOemNetworkPreference() is only available on automotive devices.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user