Updater: Allow specifying a new device name
* To allow transitions from e.g. variant->unified build * Example process, using klteusc->klte as the example: - Set ro.updater.next_device to klte in klteusc's tree - Wait for build to roll out with ro.updater.next_device - Pull klteusc from build roster Change-Id: I3c70d54de3f9e036cd8700edc4ee0b11093740d2
This commit is contained in:
@@ -34,6 +34,7 @@ public final class Constants {
|
||||
public static final String PROP_BUILD_VERSION = "ro.cm.build.version";
|
||||
public static final String PROP_BUILD_VERSION_INCREMENTAL = "ro.build.version.incremental";
|
||||
public static final String PROP_DEVICE = "ro.cm.device";
|
||||
public static final String PROP_NEXT_DEVICE = "ro.updater.next_device";
|
||||
public static final String PROP_RELEASE_TYPE = "ro.cm.releasetype";
|
||||
public static final String PROP_UPDATER_URI = "cm.updater.uri";
|
||||
|
||||
|
@@ -149,7 +149,8 @@ public class Utils {
|
||||
serverUrl = context.getString(R.string.conf_update_server_url_def);
|
||||
}
|
||||
String incrementalVersion = SystemProperties.get(Constants.PROP_BUILD_VERSION_INCREMENTAL);
|
||||
String device = SystemProperties.get(Constants.PROP_DEVICE);
|
||||
String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE,
|
||||
SystemProperties.get(Constants.PROP_DEVICE));
|
||||
String type = SystemProperties.get(Constants.PROP_RELEASE_TYPE).toLowerCase(Locale.ROOT);
|
||||
return serverUrl + "/v1/" + device + "/" + type + "/" + incrementalVersion;
|
||||
}
|
||||
|
Reference in New Issue
Block a user