From 6586f05457e496bbb6119cc43d77694b38336dd1 Mon Sep 17 00:00:00 2001 From: yuemingw Date: Wed, 21 Mar 2018 16:32:09 +0000 Subject: [PATCH] Add javadoc to explain ApnSetting conflict. As per discussion with Amit, it's better to define "conflict" of ApnSetting in DevicePolicyManager API javadoc. Bug: 72153573 Test: not required. Change-Id: I765dace36a3c9c491c988dc0a87479cdec620e37 --- .../android/app/admin/DevicePolicyManager.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 4cb7f89cec5cb..e455948c8ac1c 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -9418,7 +9418,21 @@ public class DevicePolicyManager { *

This method may returns {@code -1} if {@code apnSetting} conflicts with an existing * override APN. Update the existing conflicted APN with * {@link #updateOverrideApn(ComponentName, int, ApnSetting)} instead of adding a new entry. - *

See {@link ApnSetting} for the definition of conflict. + *

Two override APNs are considered to conflict when all the following APIs return + * the same values on both override APNs: + *

* * @param admin which {@link DeviceAdminReceiver} this request is associated with * @param apnSetting the override APN to insert @@ -9447,7 +9461,7 @@ public class DevicePolicyManager { * {@code apnId}. *

This method may also returns {@code false} if {@code apnSetting} conflicts with an * existing override APN. Update the existing conflicted APN instead. - *

See {@link ApnSetting} for the definition of conflict. + *

See {@link #addOverrideApn} for the definition of conflict. * * @param admin which {@link DeviceAdminReceiver} this request is associated with * @param apnId the {@code id} of the override APN to update