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

Commit 0c376a3f authored by Sundong Ahn's avatar Sundong Ahn Committed by Automerger Merge Worker
Browse files

Merge "Reland "Change to using sysprop for services.core.unboosted"" into rvc-dev am: 15ab8e10

Change-Id: Ic8fa686332d6b9efaceba4c9a685de79ed7d2152
parents 10053369 15ab8e10
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ java_library_static {
        "dnsresolver_aidl_interface-java",
        "netd_aidl_interfaces-platform-java",
        "overlayable_policy_aidl-java",
        "SurfaceFlingerProperties",
    ],
}

+17 −0
Original line number Diff line number Diff line
@@ -196,6 +196,7 @@ import android.provider.DeviceConfig;
import android.provider.Settings;
import android.service.vr.IVrManager;
import android.service.vr.IVrStateCallbacks;
import android.sysprop.SurfaceFlingerProperties;
import android.text.format.DateUtils;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -305,7 +306,9 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;

@@ -4692,6 +4695,11 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    private static boolean queryWideColorGamutSupport() {
        boolean defaultValue = false;
        Optional<Boolean> hasWideColorProp = SurfaceFlingerProperties.has_wide_color_display();
        if (hasWideColorProp.isPresent()) {
            return hasWideColorProp.get();
        }
        try {
            ISurfaceFlingerConfigs surfaceFlinger = ISurfaceFlingerConfigs.getService();
            OptionalBool hasWideColor = surfaceFlinger.hasWideColorDisplay();
@@ -4700,11 +4708,18 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        } catch (RemoteException e) {
            // Ignore, we're in big trouble if we can't talk to SurfaceFlinger's config store
        } catch (NoSuchElementException e) {
            return defaultValue;
        }
        return false;
    }

    private static boolean queryHdrSupport() {
        boolean defaultValue = false;
        Optional<Boolean> hasHdrProp = SurfaceFlingerProperties.has_HDR_display();
        if (hasHdrProp.isPresent()) {
            return hasHdrProp.get();
        }
        try {
            ISurfaceFlingerConfigs surfaceFlinger = ISurfaceFlingerConfigs.getService();
            OptionalBool hasHdr = surfaceFlinger.hasHDRDisplay();
@@ -4713,6 +4728,8 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        } catch (RemoteException e) {
            // Ignore, we're in big trouble if we can't talk to SurfaceFlinger's config store
        } catch (NoSuchElementException e) {
            return defaultValue;
        }
        return false;
    }