Loading .gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -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 Loading app/src/main/java/org/lineageos/updater/UpdateImporter.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; }; } Loading app/src/main/java/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading app/src/main/java/org/lineageos/updater/misc/Constants.java +1 −0 Original line number Diff line number Diff line Loading @@ -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"; Loading app/src/main/java/org/lineageos/updater/misc/Utils.java +20 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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 Loading
.gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
app/src/main/java/org/lineageos/updater/UpdateImporter.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; }; } Loading
app/src/main/java/org/lineageos/updater/misc/BuildInfoUtils.java +4 −0 Original line number Diff line number Diff line Loading @@ -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); } Loading
app/src/main/java/org/lineageos/updater/misc/Constants.java +1 −0 Original line number Diff line number Diff line Loading @@ -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"; Loading
app/src/main/java/org/lineageos/updater/misc/Utils.java +20 −1 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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