Loading core/java/android/os/Binder.java +1 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,7 @@ public class Binder implements IBinder { * * @see #clearCallingIdentity */ @CriticalNative public static final native void restoreCallingIdentity(long token); /** Loading core/jni/android_util_Binder.cpp +2 −10 Original line number Diff line number Diff line Loading @@ -960,17 +960,8 @@ static jlong android_os_Binder_clearCallingIdentity() return IPCThreadState::self()->clearCallingIdentity(); } static void android_os_Binder_restoreCallingIdentity(JNIEnv* env, jobject clazz, jlong token) { // XXX temporary validation check to debug crashes. int uid = (int)(token>>32); if (uid > 0 && uid < 999) { // In Android currently there are no uids in this range. char buf[128]; sprintf(buf, "Restoring bad calling ident: 0x%" PRIx64, token); jniThrowException(env, "java/lang/IllegalStateException", buf); return; } static void android_os_Binder_restoreCallingIdentity(jlong token) { IPCThreadState::self()->restoreCallingIdentity(token); } Loading Loading @@ -1064,6 +1055,7 @@ static const JNINativeMethod gBinderMethods[] = { { "isHandlingTransaction", "()Z", (void*)android_os_Binder_isHandlingTransaction }, // @CriticalNative { "clearCallingIdentity", "()J", (void*)android_os_Binder_clearCallingIdentity }, // @CriticalNative { "restoreCallingIdentity", "(J)V", (void*)android_os_Binder_restoreCallingIdentity }, // @CriticalNative { "setThreadStrictModePolicy", "(I)V", (void*)android_os_Binder_setThreadStrictModePolicy }, Loading Loading
core/java/android/os/Binder.java +1 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,7 @@ public class Binder implements IBinder { * * @see #clearCallingIdentity */ @CriticalNative public static final native void restoreCallingIdentity(long token); /** Loading
core/jni/android_util_Binder.cpp +2 −10 Original line number Diff line number Diff line Loading @@ -960,17 +960,8 @@ static jlong android_os_Binder_clearCallingIdentity() return IPCThreadState::self()->clearCallingIdentity(); } static void android_os_Binder_restoreCallingIdentity(JNIEnv* env, jobject clazz, jlong token) { // XXX temporary validation check to debug crashes. int uid = (int)(token>>32); if (uid > 0 && uid < 999) { // In Android currently there are no uids in this range. char buf[128]; sprintf(buf, "Restoring bad calling ident: 0x%" PRIx64, token); jniThrowException(env, "java/lang/IllegalStateException", buf); return; } static void android_os_Binder_restoreCallingIdentity(jlong token) { IPCThreadState::self()->restoreCallingIdentity(token); } Loading Loading @@ -1064,6 +1055,7 @@ static const JNINativeMethod gBinderMethods[] = { { "isHandlingTransaction", "()Z", (void*)android_os_Binder_isHandlingTransaction }, // @CriticalNative { "clearCallingIdentity", "()J", (void*)android_os_Binder_clearCallingIdentity }, // @CriticalNative { "restoreCallingIdentity", "(J)V", (void*)android_os_Binder_restoreCallingIdentity }, // @CriticalNative { "setThreadStrictModePolicy", "(I)V", (void*)android_os_Binder_setThreadStrictModePolicy }, Loading