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

Commit 030906ef 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:...

Merge "Improve compatibility of WallpaperCompat" into rvc-d1-dev am: 1d390491 am: 17c9b650 am: 6b829e7b

Change-Id: Ic526eb3638bf4a665f1371addb6f5d7cef3e605a
parents f7851d58 6b829e7b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.systemui.shared.system;
package com.android.systemui.shared.system;


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


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


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


/**
/**
@@ -42,6 +43,9 @@ public class WallpaperManagerCompat {
     */
     */
    public static float getWallpaperZoomOutMaxScale(Context context) {
    public static float getWallpaperZoomOutMaxScale(Context context) {
        return context.getResources()
        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