summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorHugo Benichi <hugobenichi@google.com>2017-07-14 07:25:51 +0900
committerHugo Benichi <hugobenichi@google.com>2017-07-14 07:25:51 +0900
commita428392c1ddb93cabf0186ea0507b1fbc5254c60 (patch)
treebf4c6024d1456f06da1849be5639c14d61c785bf /core/java/android
parent791a698a6a5f6c6e8b37f43c38f0027af9ee70be (diff)
parent4f2a0fe213e56d1eb4221a02a09571262ef8036a (diff)
resolve merge conflicts of 4f2a0fe213e5 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution. Change-Id: I61cfb2d4798350f28f1bb36aed67ee8f18895031
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/net/LinkAddress.java20
-rw-r--r--core/java/android/net/metrics/IpManagerEvent.java2
2 files changed, 12 insertions, 10 deletions
diff --git a/core/java/android/net/LinkAddress.java b/core/java/android/net/LinkAddress.java
index 6e74f14bd138..62de9911bc48 100644
--- a/core/java/android/net/LinkAddress.java
+++ b/core/java/android/net/LinkAddress.java
@@ -16,6 +16,15 @@
package android.net;
+import static android.system.OsConstants.IFA_F_DADFAILED;
+import static android.system.OsConstants.IFA_F_DEPRECATED;
+import static android.system.OsConstants.IFA_F_OPTIMISTIC;
+import static android.system.OsConstants.IFA_F_TENTATIVE;
+import static android.system.OsConstants.RT_SCOPE_HOST;
+import static android.system.OsConstants.RT_SCOPE_LINK;
+import static android.system.OsConstants.RT_SCOPE_SITE;
+import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
+
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Pair;
@@ -26,15 +35,6 @@ import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.UnknownHostException;
-import static android.system.OsConstants.IFA_F_DADFAILED;
-import static android.system.OsConstants.IFA_F_DEPRECATED;
-import static android.system.OsConstants.IFA_F_OPTIMISTIC;
-import static android.system.OsConstants.IFA_F_TENTATIVE;
-import static android.system.OsConstants.RT_SCOPE_HOST;
-import static android.system.OsConstants.RT_SCOPE_LINK;
-import static android.system.OsConstants.RT_SCOPE_SITE;
-import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
-
/**
* Identifies an IP address on a network link.
*
@@ -101,7 +101,7 @@ public class LinkAddress implements Parcelable {
* Per RFC 4193 section 8, fc00::/7 identifies these addresses.
*/
private boolean isIPv6ULA() {
- if (address != null && address instanceof Inet6Address) {
+ if (address instanceof Inet6Address) {
byte[] bytes = address.getAddress();
return ((bytes[0] & (byte)0xfe) == (byte)0xfc);
}
diff --git a/core/java/android/net/metrics/IpManagerEvent.java b/core/java/android/net/metrics/IpManagerEvent.java
index f5aea73cf2aa..a94b9284df3b 100644
--- a/core/java/android/net/metrics/IpManagerEvent.java
+++ b/core/java/android/net/metrics/IpManagerEvent.java
@@ -39,10 +39,12 @@ public final class IpManagerEvent implements Parcelable {
public static final int ERROR_STARTING_IPV4 = 4;
public static final int ERROR_STARTING_IPV6 = 5;
public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6;
+ public static final int ERROR_INVALID_PROVISIONING = 7;
@IntDef(value = {
PROVISIONING_OK, PROVISIONING_FAIL, COMPLETE_LIFECYCLE,
ERROR_STARTING_IPV4, ERROR_STARTING_IPV6, ERROR_STARTING_IPREACHABILITYMONITOR,
+ ERROR_INVALID_PROVISIONING,
})
@Retention(RetentionPolicy.SOURCE)
public @interface EventType {}