| Index: mojo/android/system/core_impl.cc
|
| diff --git a/mojo/android/system/core_impl.cc b/mojo/android/system/core_impl.cc
|
| index d42c292b9898b87eac3f98715a3e38b653297b7d..0a80e60b1a2909ab5dd757bae669759e34dedc5a 100644
|
| --- a/mojo/android/system/core_impl.cc
|
| +++ b/mojo/android/system/core_impl.cc
|
| @@ -388,6 +388,18 @@ static void CancelAsyncWait(JNIEnv* env,
|
| Environment::GetDefaultAsyncWaiter()->CancelWait(id);
|
| }
|
|
|
| +static jint GetNativeBufferOffset(JNIEnv* env,
|
| + jobject jcaller,
|
| + jobject buffer,
|
| + jint alignment) {
|
| + jint offset =
|
| + reinterpret_cast<uintptr_t>(env->GetDirectBufferAddress(buffer)) %
|
| + alignment;
|
| + if (offset == 0)
|
| + return 0;
|
| + return alignment - offset;
|
| +}
|
| +
|
| bool RegisterCoreImpl(JNIEnv* env) {
|
| return RegisterNativesImpl(env);
|
| }
|
|
|