Redact sensitive task info when caller lacks getTasksAllowed
AppTaskImpl.getTaskInfo() previously bypassed permission checks
and hardcoded getTasksAllowed=true when fetching task info. This
allowed callers of AppTaskImpl to view top activity details even
when topActivityUid differed from the task's effectiveUid.
This change:
1. Enforces mService.isGetTasksAllowed(callingPid, callingUid)
inside AppTaskImpl.getTaskInfo().
2. Redacts pictureInPictureParams, mTopActivityLocusId, and
taskDescription in Task.trimIneffectiveInfo() when top activity
UID differs from task effectiveUid and getTasksAllowed is false.
Flag: EXEMPT BUGFIX
Bug: 527037031
Test: atest WmTests:AppTaskImplTests WmTests:TaskTests
TAG=agy
CONV=66230edf-f2c8-4750-9691-231050737ce2
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:eebb44a69a12873f8ff47750895b6cb3617db80e
Merged-In: I78a6fa8331ebaef246f1f4d1e9f0e32dd9db0639
Change-Id: I78a6fa8331ebaef246f1f4d1e9f0e32dd9db0639
2 files changed