Merge "Update TV input list upon package state changes in Kids profile" into sc-dev am: a93719505c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15330816

Change-Id: I6250c29ad2ac89cf003edb0b8912f377bb845be3
This commit is contained in:
TreeHugger Robot
2021-07-21 06:41:02 +00:00
committed by Automerger Merge Worker

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