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

Commit 81007e33 authored by Kevin Barry's avatar Kevin Barry
Browse files

Add synchronized to avoid a race condition

Race condition could cause AppWidget hosts to be denied access to their own
widgets. This was especially an issue when using WidgetLocker along with a
normal launcher, and then using the CM Theme Chooser.

CyanogenMod Issue # 3167 ( http://code.google.com/p/cyanogenmod/issues/detail?id=3167 )

Change-Id: If5406663a60a8e53a831d3e8e5dd67e7173771d7
parent 3e58fc81
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -126,8 +126,10 @@ class AppWidgetService extends IAppWidgetService.Stub
    public void systemReady(boolean safeMode) {
        mSafeMode = safeMode;

        synchronized (mAppWidgetIds) {
            loadAppWidgetList();
            loadStateLocked();
        }

        // Register for the boot completed broadcast, so we can send the
        // ENABLE broacasts.  If we try to send them now, they time out,