Reverted the ApnSetting behavior

Returning null is already a behavior mentioned in the
public API document. Reverted the behavior back to be consistent
with Android 12.

Fix: 201089892
Test: atest CtsDevicePolicyManagerTestCases
Change-Id: Id4c8b41b23adfe931b9953113f7175a11703dc10
This commit is contained in:
Jack Yu
2021-09-28 15:40:44 -07:00
parent 8270d61d1b
commit 81a4684119

View File

@@ -2059,8 +2059,7 @@ public class ApnSetting implements Parcelable {
| TYPE_FOTA | TYPE_IMS | TYPE_CBS | TYPE_IA | TYPE_EMERGENCY | TYPE_MCX | TYPE_FOTA | TYPE_IMS | TYPE_CBS | TYPE_IA | TYPE_EMERGENCY | TYPE_MCX
| TYPE_XCAP | TYPE_VSIM | TYPE_BIP | TYPE_ENTERPRISE)) == 0 | TYPE_XCAP | TYPE_VSIM | TYPE_BIP | TYPE_ENTERPRISE)) == 0
|| TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) { || TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) {
throw new IllegalArgumentException("mApName=" + mApnName + ", mEntryName=" return null;
+ mEntryName + ", mApnTypeBitmask=" + mApnTypeBitmask);
} }
return new ApnSetting(this); return new ApnSetting(this);
} }