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

Commit a16b83c2 authored by Olivier Gaillard's avatar Olivier Gaillard
Browse files

Fix x86 bug with restoreCallingWorkSource

Test: atest BinderWorkSourceTest
Change-Id: Ia26f5a0164957fee22e66b7aaef83c84c9f56c70
parent 02e7db9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -919,7 +919,7 @@ static jlong android_os_Binder_clearCallingWorkSource()
    return IPCThreadState::self()->clearCallingWorkSource();
}

static void android_os_Binder_restoreCallingWorkSource(long token)
static void android_os_Binder_restoreCallingWorkSource(jlong token)
{
    IPCThreadState::self()->restoreCallingWorkSource(token);
}
+2 −0
Original line number Diff line number Diff line
@@ -125,8 +125,10 @@ public class BinderWorkSourceTest {
        Binder.setCallingWorkSourceUid(UID);
        long token = Binder.clearCallingWorkSource();
        Binder.restoreCallingWorkSource(token);
        assertEquals(UID, Binder.getCallingWorkSourceUid());

        assertEquals(UID, mService.getIncomingWorkSourceUid());
        // Still the same after the binder transaction.
        assertEquals(UID, Binder.getCallingWorkSourceUid());
    }