TIF: Do not build input list for background user

Building input list for background user leads to unnecessary connection
request to hardware input and that causes incomplete service state.

Bug: 27407198
Change-Id: Id8d5d5001394781edd2dafe8681c674855332ae3
This commit is contained in:
Dongwon Kang
2016-04-19 13:39:47 -07:00
parent f2d2aab3f1
commit a897e5f5e3

View File

@@ -161,8 +161,10 @@ public final class TvInputManagerService extends SystemService {
PackageMonitor monitor = new PackageMonitor() {
private void buildTvInputList(String[] packages) {
synchronized (mLock) {
buildTvInputListLocked(getChangingUserId(), packages);
buildTvContentRatingSystemListLocked(getChangingUserId());
if (mCurrentUserId == getChangingUserId()) {
buildTvInputListLocked(mCurrentUserId, packages);
buildTvContentRatingSystemListLocked(mCurrentUserId);
}
}
}