Merge "Change the netId to nethandle mapping." am: 35bd74cfd3 am: feaf412e19
am: fb91426d12
Change-Id: I06e09bfaeb1040b97afa392faace339eb5bab4ad
This commit is contained in:
@@ -357,13 +357,13 @@ public class Network implements Parcelable {
|
|||||||
// Multiple Provisioning Domains API recommendations, as made by the
|
// Multiple Provisioning Domains API recommendations, as made by the
|
||||||
// IETF mif working group.
|
// 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.
|
// value in the native/android/net.c NDK implementation.
|
||||||
if (netId == 0) {
|
if (netId == 0) {
|
||||||
return 0L; // make this zero condition obvious for debugging
|
return 0L; // make this zero condition obvious for debugging
|
||||||
}
|
}
|
||||||
final long HANDLE_MAGIC = 0xfacade;
|
final long handleMagic = 0xcafed00dL;
|
||||||
return (((long) netId) << 32) | HANDLE_MAGIC;
|
return (((long) netId) << 32) | handleMagic;
|
||||||
}
|
}
|
||||||
|
|
||||||
// implement the Parcelable interface
|
// implement the Parcelable interface
|
||||||
|
|||||||
Reference in New Issue
Block a user