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

Commit 7dcdd4ae authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge "Handle onUnlockUser on fg thread" into oc-mr1-dev

am: 02fbb07f

Change-Id: I2176c443aa84ebf8df92586da37e4afc630af4f8
parents 9deca40c 02fbb07f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.server.appwidget;
import android.content.Context;

import com.android.server.AppWidgetBackupBridge;
import com.android.server.FgThread;
import com.android.server.SystemService;

/**
@@ -48,7 +49,7 @@ public class AppWidgetService extends SystemService {

    @Override
    public void onUnlockUser(int userHandle) {
        mImpl.onUserUnlocked(userHandle);
        FgThread.getHandler().post(() -> mImpl.onUserUnlocked(userHandle));
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -2645,6 +2645,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            Slog.w(TAG, "User " + userId + " is no longer unlocked - exiting");
            return;
        }
        long time = SystemClock.elapsedRealtime();
        synchronized (mLock) {
            Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "appwidget ensure");
            ensureGroupStateLoadedLocked(userId);
@@ -2673,6 +2674,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                }
            }
        }
        Slog.i(TAG, "Async processing of onUserUnlocked u" + userId + " took "
                + (SystemClock.elapsedRealtime() - time) + " ms");
    }

    // only call from initialization -- it assumes that the data structures are all empty