From 5183e57449f1e4a5d82fb2495a6ebd75ed4b8885 Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Tue, 5 Sep 2017 11:15:37 +0900 Subject: [PATCH] Change the netId to nethandle mapping. Being able to update this handle is necessary to ensure that system-only OTAs do not break vendor code that relies on nethandles. Bug: 63052780 Test: walleye builds, boots, networking works Test: MultinetworkApiTest CTS tests passes Change-Id: I049a4ad2610ca68b8f56377b63be7e5e8ce76039 --- core/java/android/net/Network.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java index 903b602b42..3683d3450b 100644 --- a/core/java/android/net/Network.java +++ b/core/java/android/net/Network.java @@ -356,13 +356,13 @@ public class Network implements Parcelable { // Multiple Provisioning Domains API recommendations, as made by the // IETF mif working group. // - // The HANDLE_MAGIC value MUST be kept in sync with the corresponding + // The handleMagic value MUST be kept in sync with the corresponding // value in the native/android/net.c NDK implementation. if (netId == 0) { return 0L; // make this zero condition obvious for debugging } - final long HANDLE_MAGIC = 0xfacade; - return (((long) netId) << 32) | HANDLE_MAGIC; + final long handleMagic = 0xcafed00dL; + return (((long) netId) << 32) | handleMagic; } // implement the Parcelable interface