Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 491d1fef authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am f58f041b: am cffde30f: am 44220a56: Merge "Add some debug code to try to...

am f58f041b: am cffde30f: am 44220a56: Merge "Add some debug code to try to track down issue 3183612" into gingerbread

* commit 'f58f041b':
  Add some debug code to try to track down issue 3183612
parents 79d6ffab f58f041b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -680,6 +680,15 @@ static jlong android_os_Binder_clearCallingIdentity(JNIEnv* env, jobject clazz)

static void android_os_Binder_restoreCallingIdentity(JNIEnv* env, jobject clazz, jlong token)
{
    // XXX temporary sanity 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%Lx", token);
        jniThrowException(env, "java/lang/IllegalStateException", buf);
        return;
    }
    IPCThreadState::self()->restoreCallingIdentity(token);
}