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

Commit f937e3f8 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch 'security_patch' into 'v1-q'

Add Build.VERSION.SECURITY_PATCH_EOS

See merge request e/os/android_frameworks_base!107
parents 1ba34712 86b5524e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -255,6 +255,13 @@ public class Build {
        public static final String SECURITY_PATCH = SystemProperties.get(
                "ro.build.version.security_patch", "");

        /**
         * The user-visible security patch level when the device overrides the security patch with
         * PLATFORM_SECURITY_PATCH_OVERRIDE.
         */
        public static final String SECURITY_PATCH_EOS = SystemProperties.get(
                "ro.eos.version.security_patch", "");

        /**
         * The user-visible SDK version of the framework in its raw String
         * representation; use {@link #SDK_INT} instead.
+4 −0
Original line number Diff line number Diff line
@@ -154,9 +154,13 @@ public class DeviceInfoUtils {
    }

    public static String getSecurityPatch() {
        String eosPatch = Build.VERSION.SECURITY_PATCH_EOS;
        String patch = Build.VERSION.SECURITY_PATCH;
        if (!"".equals(patch)) {
            try {
                if (!"".equals(eosPatch)) {
                    patch = eosPatch;
                }
                SimpleDateFormat template = new SimpleDateFormat("yyyy-MM-dd");
                Date patchDate = template.parse(patch);
                String format = DateFormat.getBestDateTimePattern(Locale.getDefault(), "dMMMMyyyy");