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

Commit 52134aa0 authored by Chris Li's avatar Chris Li Committed by Automerger Merge Worker
Browse files

Merge "Fix non-visual Context in ImageWallpaper" into sc-dev am: 6e2b80c0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14483697

Change-Id: I686a95ec1a3508ecedd5a90f3c780f5cd59ecf15
parents 32ea769d 6e2b80c0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.graphics.Matrix.MSCALE_Y;
import static android.graphics.Matrix.MSKEW_X;
import static android.graphics.Matrix.MSKEW_Y;
import static android.view.View.SYSTEM_UI_FLAG_VISIBLE;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;

import android.annotation.FloatRange;
import android.annotation.NonNull;
@@ -1218,7 +1219,9 @@ public abstract class WallpaperService extends Service {
            mIWallpaperEngine.mDisplayManager.registerDisplayListener(mDisplayListener,
                    mCaller.getHandler());
            mDisplay = mIWallpaperEngine.mDisplay;
            mDisplayContext = createDisplayContext(mDisplay);
            // Use window context of TYPE_WALLPAPER so client can access UI resources correctly.
            mDisplayContext = createDisplayContext(mDisplay)
                    .createWindowContext(TYPE_WALLPAPER, null /* options */);
            mDisplayState = mDisplay.getState();

            if (DEBUG) Log.v(TAG, "onCreate(): " + this);