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

Commit dbff8cda authored by Stefan Andonian's avatar Stefan Andonian
Browse files

Fix crash in LauncherPreviewRenderer.

The LauncherPrefs INSTANCE variable needs to be registered with the
sandbox context used by the LauncherPreview. This will stop the crash
from occuring.

Bug: 266164372
Test: Verified that crash no longer occurs.
Change-Id: I12ef12d082b7afdb08b38321527d13c637e84f2f
parent 1eb59d6c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ import com.android.launcher3.Hotseat;
import com.android.launcher3.InsettableFrameLayout;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.LauncherSettings.Favorites;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
@@ -137,7 +138,7 @@ public class LauncherPreviewRenderer extends ContextWrapper
                new ConcurrentLinkedQueue<>();

        public PreviewContext(Context base, InvariantDeviceProfile idp) {
            super(base, UserCache.INSTANCE, InstallSessionHelper.INSTANCE,
            super(base, UserCache.INSTANCE, InstallSessionHelper.INSTANCE, LauncherPrefs.INSTANCE,
                    LauncherAppState.INSTANCE, InvariantDeviceProfile.INSTANCE,
                    CustomWidgetManager.INSTANCE, PluginManagerWrapper.INSTANCE,
                    WindowManagerProxy.INSTANCE, DisplayController.INSTANCE);