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

Commit 40052423 authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by Automerger Merge Worker
Browse files

Merge "Add check for WallpaperEngine compatibility" into rvc-qpr-dev am: 21d93d42

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

Change-Id: Ic5e089aa4b89c985d173fe3fb85900a5e65a33ae
parents ff5bde97 21d93d42
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,17 @@ public class WallpaperEngineCompat {

    private static final String TAG = "WallpaperEngineCompat";

    /**
     * Returns true if {@link IWallpaperEngine#scalePreview(Rect)} is available.
     */
    public static boolean supportsScalePreview() {
        try {
            return IWallpaperEngine.class.getMethod("scalePreview", Rect.class) != null;
        } catch (NoSuchMethodException | SecurityException e) {
            return false;
        }
    }

    private final IWallpaperEngine mWrappedEngine;

    public WallpaperEngineCompat(IWallpaperEngine wrappedEngine) {