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

Commit fe3581e7 authored by Galia Peycheva's avatar Galia Peycheva Committed by Automerger Merge Worker
Browse files

Merge "Remove occurances of disable blurs sysprop" into sc-dev am: e5c0addd

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

Change-Id: I5c47055d5e4e70902eba5910b8d672747adf86f1
parents 8b13f4eb e5c0addd
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -16,22 +16,18 @@

package com.android.systemui.shared.system;

import static android.view.CrossWindowBlurListeners.CROSS_WINDOW_BLUR_SUPPORTED;

import android.app.ActivityManager;
import android.os.SystemProperties;

public abstract class BlurUtils {

    private static boolean mBlurSupportedSysProp = SystemProperties
            .getBoolean("ro.surface_flinger.supports_background_blur", false);
    private static boolean mBlurDisabledSysProp = SystemProperties
            .getBoolean("persist.sys.sf.disable_blurs", false);

    /**
     * If this device can render blurs.
     *
     * @return {@code true} when supported.
     */
    public static boolean supportsBlursOnWindows() {
        return mBlurSupportedSysProp && !mBlurDisabledSysProp && ActivityManager.isHighEndGfx();
        return CROSS_WINDOW_BLUR_SUPPORTED && ActivityManager.isHighEndGfx();
    }
}
+4 −9
Original line number Diff line number Diff line
@@ -16,9 +16,10 @@

package com.android.systemui.statusbar

import android.view.CrossWindowBlurListeners.CROSS_WINDOW_BLUR_SUPPORTED

import android.app.ActivityManager
import android.content.res.Resources
import android.os.SystemProperties
import android.util.IndentingPrintWriter
import android.util.MathUtils
import android.view.SurfaceControl
@@ -40,10 +41,6 @@ open class BlurUtils @Inject constructor(
) : Dumpable {
    val minBlurRadius = resources.getDimensionPixelSize(R.dimen.min_window_blur_radius)
    val maxBlurRadius = resources.getDimensionPixelSize(R.dimen.max_window_blur_radius)
    private val blurSupportedSysProp = SystemProperties
            .getBoolean("ro.surface_flinger.supports_background_blur", false)
    private val blurDisabledSysProp = SystemProperties
            .getBoolean("persist.sys.sf.disable_blurs", false)

    init {
        dumpManager.registerDumpable(javaClass.name, this)
@@ -100,7 +97,7 @@ open class BlurUtils @Inject constructor(
     * @return {@code true} when supported.
     */
    open fun supportsBlursOnWindows(): Boolean {
        return blurSupportedSysProp && !blurDisabledSysProp && ActivityManager.isHighEndGfx()
        return CROSS_WINDOW_BLUR_SUPPORTED && ActivityManager.isHighEndGfx()
    }

    override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) {
@@ -109,8 +106,6 @@ open class BlurUtils @Inject constructor(
            it.increaseIndent()
            it.println("minBlurRadius: $minBlurRadius")
            it.println("maxBlurRadius: $maxBlurRadius")
            it.println("blurSupportedSysProp: $blurSupportedSysProp")
            it.println("blurDisabledSysProp: $blurDisabledSysProp")
            it.println("supportsBlursOnWindows: ${supportsBlursOnWindows()}")
        }
    }