Merge "Fix x86 bug with restoreCallingWorkSource"

This commit is contained in:
TreeHugger Robot
2018-12-13 15:29:21 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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());
}