Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef31feab authored by shubang's avatar shubang
Browse files

TIAF: build IApp service list for 1st getTvInteractiveAppServiceList

To fix the issue that TvIAppService can not be queried when boot up

Bug: 213559890
Test: mmm
Change-Id: I527f67349cb624484436434d583bde900d4eb484
parent 056333fa
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -95,6 +95,10 @@ public class TvInteractiveAppManagerService extends SystemService {
    @GuardedBy("mLock")
    private final SparseArray<UserState> 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<TvInteractiveAppInfo> iAppList = new ArrayList<>();
                    for (TvInteractiveAppState state : userState.mIAppMap.values()) {