Pass fake package name for ROOT_UID in WorkSource.
Apparently, root does not have a package name of its own, but
WorkSource's constructor requires one. We can't use the alternative of
WorkSource(int uid), since that causes an exception when the RIL
attmepts to chain it when acquiring a wakelock. So we simply fake a
"root" package name to be attributed for the work. Since this is not for
apps or normal shell use on user builds, we assume this is acceptable.
The use case here is new TelephonyShellCommand usages that plumb through
to the RIL which are intended to be run as root.
Bug: 210884765
Test: make, call ITelephony methods through shell with adb rooted,
verify no more NPE from getWorkSource
Change-Id: I9f2c5bd51fb6bc7021b182e660502b107ee0e0b0
1 file changed