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

Commit 81c92c8d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make wallpaper default frame rate configurable" into main

parents 74217e5c 1a37d86d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ import android.window.ActivityWindowInfo;
import android.window.ClientWindowFrames;
import android.window.ScreenCapture;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.HandlerCaller;
@@ -1283,8 +1284,14 @@ public abstract class WallpaperService extends Service {
                                    .build();
                            SurfaceControl.Transaction transaction =
                                    new SurfaceControl.Transaction();
                            final int frameRateCompat = getResources().getInteger(
                                    R.integer.config_wallpaperFrameRateCompatibility);
                            if (DEBUG) {
                                Log.d(TAG, "Set frame rate compatibility value for Wallpaper: "
                                        + frameRateCompat);
                            }
                            transaction.setDefaultFrameRateCompatibility(mBbqSurfaceControl,
                                Surface.FRAME_RATE_COMPATIBILITY_MIN).apply();
                                    frameRateCompat).apply();
                        }
                        // Propagate transform hint from WM, so we can use the right hint for the
                        // first frame.
+4 −0
Original line number Diff line number Diff line
@@ -6990,4 +6990,8 @@

    <!-- Whether desktop mode is supported on the current device  -->
    <bool name="config_isDesktopModeSupported">false</bool>

    <!-- Frame rate compatibility value for Wallpaper
         FRAME_RATE_COMPATIBILITY_MIN (102) is used by default for lower power consumption -->
    <integer name="config_wallpaperFrameRateCompatibility">102</integer>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -5394,4 +5394,7 @@

  <!-- Whether desktop mode is supported on the current device  -->
  <java-symbol type="bool" name="config_isDesktopModeSupported" />

  <!-- Frame rate compatibility value for Wallpaper -->
  <java-symbol type="integer" name="config_wallpaperFrameRateCompatibility" />
</resources>