diff --git a/services/core/java/com/android/server/tv/interactive/TvInteractiveAppManagerService.java b/services/core/java/com/android/server/tv/interactive/TvInteractiveAppManagerService.java index 35cc43faa4e9e..9ead7fe0534b0 100644 --- a/services/core/java/com/android/server/tv/interactive/TvInteractiveAppManagerService.java +++ b/services/core/java/com/android/server/tv/interactive/TvInteractiveAppManagerService.java @@ -95,6 +95,10 @@ public class TvInteractiveAppManagerService extends SystemService { @GuardedBy("mLock") private final SparseArray mUserStates = new SparseArray<>(); + // TODO: remove mGetServiceListCalled if onBootPhrase work correctly + @GuardedBy("mLock") + private boolean mGetServiceListCalled = false; + private final UserManager mUserManager; /** @@ -638,6 +642,10 @@ public class TvInteractiveAppManagerService extends SystemService { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { + if (!mGetServiceListCalled) { + buildTvInteractiveAppServiceListLocked(userId, null); + mGetServiceListCalled = true; + } UserState userState = getOrCreateUserStateLocked(resolvedUserId); List iAppList = new ArrayList<>(); for (TvInteractiveAppState state : userState.mIAppMap.values()) {