Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81a46841 authored by Jack Yu's avatar Jack Yu
Browse files

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
parent 8270d61d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2059,8 +2059,7 @@ public class ApnSetting implements Parcelable {
                    | TYPE_FOTA | TYPE_IMS | TYPE_CBS | TYPE_IA | TYPE_EMERGENCY | TYPE_MCX
                    | TYPE_XCAP | TYPE_VSIM | TYPE_BIP | TYPE_ENTERPRISE)) == 0
                || TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) {
                throw new IllegalArgumentException("mApName=" + mApnName + ", mEntryName="
                        + mEntryName + ", mApnTypeBitmask=" + mApnTypeBitmask);
                return null;
            }
            return new ApnSetting(this);
        }