summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kensuke Miyagi <kemiyagi@google.com> 2021-07-19 13:35:21 -0700
committer Kensuke Miyagi <kemiyagi@google.com> 2021-07-19 20:39:53 +0000
commita9b95f54be681b30f5263c984fe5deebc2197df0 (patch)
treeb6374ee9f8482ef743ce858062ff46237403e411
parent4438cf6799554ebe69088252c6da87d06063d1f7 (diff)
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
-rwxr-xr-xservices/core/java/com/android/server/tv/TvInputManagerService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/tv/TvInputManagerService.java b/services/core/java/com/android/server/tv/TvInputManagerService.java
index 8658334dba1d..36a854e5374c 100755
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -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);
}
}
}