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

Commit 17c9b650 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Improve compatibility of WallpaperCompat" into rvc-d1-dev am: 1d390491

Change-Id: I00480011b2628c57a58d36d01da82b416112eefa
parents 70052b1e 1d390491
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.systemui.shared.system;

import android.graphics.Rect;
import android.os.RemoteException;
import android.service.wallpaper.IWallpaperEngine;
import android.util.Log;

@@ -39,7 +38,7 @@ public class WallpaperEngineCompat {
    public void scalePreview(Rect scaleToRect) {
        try {
            mWrappedEngine.scalePreview(scaleToRect);
        } catch (RemoteException e) {
        } catch (Exception e) {
            Log.i(TAG, "Couldn't call scalePreview method on WallpaperEngine", e);
        }
    }
+5 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.shared.system;

import android.app.WallpaperManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.IBinder;

/**
@@ -42,6 +43,9 @@ public class WallpaperManagerCompat {
     */
    public static float getWallpaperZoomOutMaxScale(Context context) {
        return context.getResources()
                .getFloat(com.android.internal.R.dimen.config_wallpaperMaxScale);
                .getFloat(Resources.getSystem().getIdentifier(
                        /* name= */ "config_wallpaperMaxScale",
                        /* defType= */ "dimen",
                        /* defPackage= */ "android"));
    }
}
 No newline at end of file