Loading core/java/android/net/Network.java +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading native/android/net.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ static int getnetidfromhandle(net_handle_t handle, unsigned *netid) { static const uint32_t k32BitMask = 0xffffffff; // This value MUST be kept in sync with the corresponding value in // the android.net.Network#getNetworkHandle() implementation. static const uint32_t kHandleMagic = 0xfacade; static const uint32_t kHandleMagic = 0xcafed00d; // Check for minimum acceptable version of the API in the low bits. if (handle != NETWORK_UNSPECIFIED && Loading Loading
core/java/android/net/Network.java +3 −3 Original line number Diff line number Diff line Loading @@ -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 Loading
native/android/net.c +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ static int getnetidfromhandle(net_handle_t handle, unsigned *netid) { static const uint32_t k32BitMask = 0xffffffff; // This value MUST be kept in sync with the corresponding value in // the android.net.Network#getNetworkHandle() implementation. static const uint32_t kHandleMagic = 0xfacade; static const uint32_t kHandleMagic = 0xcafed00d; // Check for minimum acceptable version of the API in the low bits. if (handle != NETWORK_UNSPECIFIED && Loading