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

Commit cbfb9f15 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Rename driver build time manifest flag." into rvc-dev-plus-aosp am:...

Merge "Rename driver build time manifest flag." into rvc-dev-plus-aosp am: f2502dcd am: 5d8f1326

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

Change-Id: I6605c265fe95c3a59473be8e8d7772a7d0df7b52
parents 4351648b 5d8f1326
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ public class GraphicsEnvironment {
    private static final String PROPERTY_GFX_DRIVER_PRERELEASE = "ro.gfx.driver.1";
    private static final String PROPERTY_GFX_DRIVER_PRERELEASE = "ro.gfx.driver.1";
    private static final String PROPERTY_GFX_DRIVER_BUILD_TIME = "ro.gfx.driver_build_time";
    private static final String PROPERTY_GFX_DRIVER_BUILD_TIME = "ro.gfx.driver_build_time";
    private static final String METADATA_DRIVER_BUILD_TIME =
    private static final String METADATA_DRIVER_BUILD_TIME =
            "com.android.graphics.updatabledriver.build_time";
            "com.android.graphics.driver.build_time";
    private static final String METADATA_DEVELOPER_DRIVER_ENABLE =
    private static final String METADATA_DEVELOPER_DRIVER_ENABLE =
            "com.android.graphics.developerdriver.enable";
            "com.android.graphics.developerdriver.enable";
    private static final String METADATA_INJECT_LAYERS_ENABLE =
    private static final String METADATA_INJECT_LAYERS_ENABLE =
@@ -878,9 +878,10 @@ public class GraphicsEnvironment {
            throw new NullPointerException("apk's meta-data cannot be null");
            throw new NullPointerException("apk's meta-data cannot be null");
        }
        }


        final String driverBuildTime = driverAppInfo.metaData.getString(METADATA_DRIVER_BUILD_TIME);
        String driverBuildTime = driverAppInfo.metaData.getString(METADATA_DRIVER_BUILD_TIME);
        if (driverBuildTime == null || driverBuildTime.isEmpty()) {
        if (driverBuildTime == null || driverBuildTime.length() <= 1) {
            Log.v(TAG, "com.android.graphics.updatabledriver.build_time is not set");
            Log.v(TAG, "com.android.graphics.driver.build_time is not set");
            driverBuildTime = "L0";
        }
        }
        // driver_build_time in the meta-data is in "L<Unix epoch timestamp>" format. e.g. L123456.
        // driver_build_time in the meta-data is in "L<Unix epoch timestamp>" format. e.g. L123456.
        // Long.parseLong will throw if the meta-data "driver_build_time" is not set properly.
        // Long.parseLong will throw if the meta-data "driver_build_time" is not set properly.