Use the calling worksource uid for trusted apps.
- Set ThreadLocalWorkSource to the work source uid when app has the UPDATE_DEVICE_STATS permission. We only enable that in system server for now. - By default, set ThreadLocalWorkSource to the calling uid since we always trust this value. - If an app sets a work source uid without having the right permission, we just ignore it (we do not throw an exception) A follow-up commit will update the code to use the worksource from the beginning of the call. Currently we get the work source at the end inside of BinderCallStats, however the value might have been changed when executing onTransact. Test: atest binderLibTest BinderWorkSourceTest BinderCallsStatsServiceTest Change-Id: I351b8ac2b31feececc46c73f373f198b9b603c7e
Loading
Please register or sign in to comment