Update TV input list upon package state changes in Kids profile

Bug: 194118080
Test: Confirmed buildTvInputListLocked() gets properly called in Kids
profile as well

Change-Id: I0d0537a62fe7728b8e59330817606a352af08180
This commit is contained in:
Kensuke Miyagi
2021-07-19 13:35:21 -07:00
parent 4438cf6799
commit a9b95f54be

View File

@@ -209,10 +209,11 @@ public final class TvInputManagerService extends SystemService {
private void registerBroadcastReceivers() {
PackageMonitor monitor = new PackageMonitor() {
private void buildTvInputList(String[] packages) {
int userId = getChangingUserId();
synchronized (mLock) {
if (mCurrentUserId == getChangingUserId()) {
buildTvInputListLocked(mCurrentUserId, packages);
buildTvContentRatingSystemListLocked(mCurrentUserId);
if (mCurrentUserId == userId || mRunningProfiles.contains(userId)) {
buildTvInputListLocked(userId, packages);
buildTvContentRatingSystemListLocked(userId);
}
}
}