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

Commit 7d71f866 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9424627 from 80e6ca39 to tm-qpr2-release

Change-Id: I0c5c109edda1bf22896010a362d03049dcfbf3c9
parents cc96c32c 80e6ca39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1096,7 +1096,7 @@ public class WallpaperManager {
    }

    /**
     * Like {@link #getFastDrawable(int)}, but the returned Drawable has a number
     * Like {@link #getDrawable(int)}, but the returned Drawable has a number
     * of limitations to reduce its overhead as much as possible. It will
     * never scale the wallpaper (only centering it if the requested bounds
     * do match the bitmap bounds, which should not be typical), doesn't
+0 −6
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.app.ActivityThread;
import android.compat.annotation.ChangeId;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.BatteryState;
import android.hardware.SensorManager;
import android.hardware.lights.Light;
@@ -1910,11 +1909,6 @@ public final class InputManager {
     */
    @RequiresPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
    public void setStylusEverUsed(@NonNull Context context, boolean stylusEverUsed) {
        if (context.checkCallingPermission(Manifest.permission.WRITE_SECURE_SETTINGS)
                != PackageManager.PERMISSION_GRANTED) {
            throw new SecurityException("You need WRITE_SECURE_SETTINGS permission "
                + "to set stylus ever used.");
        }
        Settings.Global.putInt(context.getContentResolver(),
                Settings.Global.STYLUS_EVER_USED, stylusEverUsed ? 1 : 0);
    }
+2 −2
Original line number Diff line number Diff line
@@ -40,8 +40,8 @@ public final class Tile implements Parcelable {

    /**
     * An unavailable state indicates that for some reason this tile is not currently
     * available to the user for some reason, and will have no click action.  The tile's
     * icon will be tinted differently to reflect this state.
     * available to the user, and will have no click action.  The tile's icon will be
     * tinted differently to reflect this state.
     */
    public static final int STATE_UNAVAILABLE = 0;

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ interface IWallpaperEngine {
    @UnsupportedAppUsage
    oneway void destroy();
    oneway void setZoomOut(float scale);
    oneway void scalePreview(in Rect positionInWindow);
    oneway void resizePreview(in Rect positionInWindow);
    oneway void removeLocalColorsAreas(in List<RectF> regions);
    oneway void addLocalColorsAreas(in List<RectF> regions);
    SurfaceControl mirrorSurfaceControl();
+9 −16
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ public abstract class WallpaperService extends Service {
    private static final int MSG_TOUCH_EVENT = 10040;
    private static final int MSG_REQUEST_WALLPAPER_COLORS = 10050;
    private static final int MSG_ZOOM = 10100;
    private static final int MSG_SCALE_PREVIEW = 10110;
    private static final int MSG_RESIZE_PREVIEW = 10110;
    private static final int MSG_REPORT_SHOWN = 10150;
    private static final int MSG_UPDATE_DIMMING = 10200;
    private static final List<Float> PROHIBITED_STEPS = Arrays.asList(0f, Float.POSITIVE_INFINITY,
@@ -323,7 +323,7 @@ public abstract class WallpaperService extends Service {

            @Override
            public void setFixedSize(int width, int height) {
                if (!mFixedSizeAllowed) {
                if (!mFixedSizeAllowed && !mIWallpaperEngine.mIsPreview) {
                    // Regular apps can't do this.  It can only work for
                    // certain designs of window animations, so you can't
                    // rely on it.
@@ -1372,16 +1372,9 @@ public abstract class WallpaperService extends Service {
            }
        }

        private void scalePreview(Rect position) {
            if (isPreview() && mPreviewSurfacePosition == null && position != null
                    || mPreviewSurfacePosition != null
                    && !mPreviewSurfacePosition.equals(position)) {
                mPreviewSurfacePosition = position;
                if (mSurfaceControl.isValid()) {
                    reposition();
                } else {
                    updateSurface(false, false, false);
                }
        private void resizePreview(Rect position) {
            if (position != null) {
                mSurfaceHolder.setFixedSize(position.width(), position.height());
            }
        }

@@ -2295,8 +2288,8 @@ public abstract class WallpaperService extends Service {
            mCaller.sendMessage(msg);
        }

        public void scalePreview(Rect position) {
            Message msg = mCaller.obtainMessageO(MSG_SCALE_PREVIEW, position);
        public void resizePreview(Rect position) {
            Message msg = mCaller.obtainMessageO(MSG_RESIZE_PREVIEW, position);
            mCaller.sendMessage(msg);
        }

@@ -2383,8 +2376,8 @@ public abstract class WallpaperService extends Service {
                case MSG_UPDATE_DIMMING:
                    mEngine.updateWallpaperDimming(Float.intBitsToFloat(message.arg1));
                    break;
                case MSG_SCALE_PREVIEW:
                    mEngine.scalePreview((Rect) message.obj);
                case MSG_RESIZE_PREVIEW:
                    mEngine.resizePreview((Rect) message.obj);
                    break;
                case MSG_VISIBILITY_CHANGED:
                    if (DEBUG) Log.v(TAG, "Visibility change in " + mEngine
Loading