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

Commit e241c636 authored by Youngsang Cho's avatar Youngsang Cho Committed by The Android Automerger
Browse files

TIF: build TvInput list at onUnlockUser

From N, apps cannot be accesible until onUnlockUser is called.
So the TvInput's list needs to be built at onUnlockUser.

Bug: 28586844
Change-Id: I84c896fa243c05c7e1f794863d8a83288549e6ff
parent 360fcdc1
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -157,6 +157,18 @@ public final class TvInputManagerService extends SystemService {
        mTvInputHardwareManager.onBootPhase(phase);
    }

    @Override
    public void onUnlockUser(int userHandle) {
        if (DEBUG) Slog.d(TAG, "onUnlockUser(userHandle=" + userHandle + ")");
        synchronized (mLock) {
            if (mCurrentUserId != userHandle) {
                return;
            }
            buildTvInputListLocked(mCurrentUserId, null);
            buildTvContentRatingSystemListLocked(mCurrentUserId);
        }
    }

    private void registerBroadcastReceivers() {
        PackageMonitor monitor = new PackageMonitor() {
            private void buildTvInputList(String[] packages) {