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

Commit a65e3d64 authored by Jackeagle's avatar Jackeagle
Browse files

Merge remote-tracking branch 'origin/v3.7-a16' into a16

parents 63fef59d c9e280f4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -13,6 +13,18 @@ include:
    ref: master
    file: '/gitlab-ci/.gitlab-ci-import-updates-from-upstream.yml'

auto_merge_main:
  extends: .auto-merge-main
  variables:
    BRANCH_NAME_REGEX: /^v[0-9](\.[0-9]*){1,2}$/
    TARGET_BRANCH: main

upstream_main:
  extends: .update-from-upstream
  variables:
    UPSTREAM_BRANCH: lineage-23.2
    LOCAL_BRANCH: main

before_script:
  - export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64
  - export GRADLE_USER_HOME=$(pwd)/.gradle
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ public class UpdateImporter {
            case Build.VERSION_CODES.TIRAMISU -> "13";
            case Build.VERSION_CODES.UPSIDE_DOWN_CAKE -> "14";
            case Build.VERSION_CODES.VANILLA_ICE_CREAM -> "15";
            case Build.VERSION_CODES.BAKLAVA -> "16";
            case 36 -> "16"; // Build.VERSION_CODES.BAKLAVA
            default -> Build.VERSION.RELEASE;
        };
    }
+4 −0
Original line number Diff line number Diff line
@@ -26,6 +26,10 @@ public final class BuildInfoUtils {
        return SystemProperties.getLong(Constants.PROP_BUILD_DATE, 0);
    }

    public static String getBuildId() {
        return SystemProperties.get(Constants.PROP_BUILD_ID);
    }

    public static String getBuildVersion() {
        return SystemProperties.get(Constants.PROP_BUILD_VERSION);
    }
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public final class Constants {
    public static final String PROP_AB_DEVICE = "ro.build.ab_update";
    public static final String PROP_ALLOW_MAJOR_UPGRADES = "lineage.updater.allow_major_upgrades";
    public static final String PROP_BUILD_DATE = "ro.build.date.utc";
    public static final String PROP_BUILD_ID = "ro.build.id";
    public static final String PROP_BUILD_VERSION = "ro.lineage.build.version";
    public static final String PROP_BUILD_DISPLAY_VERSION = "ro.lineage.display.version";
    public static final String PROP_BUILD_VERSION_INCREMENTAL = "ro.build.version.incremental";
+20 −1
Original line number Diff line number Diff line
@@ -307,7 +307,22 @@ public class Utils {

    public static String getChangelogURL(Context context) {
        String buildVersion = SystemProperties.get(Constants.PROP_BUILD_VERSION);
        return context.getString(R.string.e_menu_changelog_url, buildVersion, Build.VERSION.RELEASE);
        return context.getString(R.string.e_menu_changelog_url, buildVersion, getChangeLogVersion());
    }

    private static String getChangeLogVersion() {
        if (Build.VERSION.SDK_INT == 36) { // Build.VERSION_CODES.BAKLAVA
            String buildId = BuildInfoUtils.getBuildId().toLowerCase();
            if (buildId.startsWith("bp4a")) {
                return "a16.2";
            } else if (buildId.startsWith("bp3a")) {
                return "a16.1";
            } else {
                return "a16"; // first release
            }
        }

        return "a" + Build.VERSION.RELEASE;
    }

    public static void triggerUpdate(Context context, String downloadId) {
@@ -581,6 +596,10 @@ public class Utils {

    public static void updateSystemUpdaterService(Context context, int status, String version) {
        final SystemUpdateManager updateManager = context.getSystemService(SystemUpdateManager.class);
        if (updateManager == null) {
            Log.w(TAG, "SystemUpdateManager not available on this device");
            return;
        }

        final Bundle oldInfo = updateManager.retrieveSystemUpdateInfo();
        final int oldStatus = oldInfo.getInt(SystemUpdateManager.KEY_STATUS);
Loading