Merge "Revert submission"

This commit is contained in:
Kevin Lau Fang
2019-11-14 20:31:09 +00:00
committed by Android (Google) Code Review
8 changed files with 6 additions and 14 deletions

View File

@@ -1802,7 +1802,7 @@ public class StatsCompanionService extends IStatsCompanionService.Stub {
e.writeString(Build.BRAND);
e.writeString(Build.PRODUCT);
e.writeString(Build.DEVICE);
e.writeString(Build.VERSION.RELEASE_OR_CODENAME);
e.writeString(Build.VERSION.RELEASE);
e.writeString(Build.ID);
e.writeString(Build.VERSION.INCREMENTAL);
e.writeString(Build.TYPE);

View File

@@ -34393,7 +34393,6 @@ package android.os {
field public static final String INCREMENTAL;
field public static final int PREVIEW_SDK_INT;
field public static final String RELEASE;
field @NonNull public static final String RELEASE_OR_CODENAME;
field @Deprecated public static final String SDK;
field public static final int SDK_INT;
field public static final String SECURITY_PATCH;

View File

@@ -239,13 +239,6 @@ public class Build {
*/
public static final String RELEASE = getString("ro.build.version.release");
/**
* The version string we show to the user; may be {@link #RELEASE} or
* {@link #CODENAME} if not a final release build.
*/
@NonNull public static final String RELEASE_OR_CODENAME = getString(
"ro.build.version.release_or_codename");
/**
* The base OS build the product is based on.
*/

View File

@@ -277,7 +277,7 @@ public class RuntimeInit {
result.append(System.getProperty("java.vm.version")); // such as 1.1.0
result.append(" (Linux; U; Android ");
String version = Build.VERSION.RELEASE_OR_CODENAME; // "1.0" or "3.4b5"
String version = Build.VERSION.RELEASE; // "1.0" or "3.4b5"
result.append(version.length() > 0 ? version : "1.0");
// add the model for the release build

View File

@@ -60,7 +60,7 @@ public class BuildTest extends TestCase {
assertNotEmpty("BRAND", Build.BRAND);
assertNotEmpty("MODEL", Build.MODEL);
assertNotEmpty("VERSION.INCREMENTAL", Build.VERSION.INCREMENTAL);
assertNotEmpty("VERSION.RELEASE", Build.VERSION.RELEASE_OR_CODENAME);
assertNotEmpty("VERSION.RELEASE", Build.VERSION.RELEASE);
assertNotEmpty("TYPE", Build.TYPE);
Assert.assertNotNull("TAGS", Build.TAGS); // TAGS is allowed to be empty.
assertNotEmpty("FINGERPRINT", Build.FINGERPRINT);

View File

@@ -169,7 +169,7 @@ public class QSFooterImpl extends FrameLayout implements QSFooter,
if (DevelopmentSettingsEnabler.isDevelopmentSettingsEnabled(mContext)) {
v.setText(mContext.getString(
com.android.internal.R.string.bugreport_status,
Build.VERSION.RELEASE_OR_CODENAME,
Build.VERSION.RELEASE,
Build.ID));
v.setVisibility(View.VISIBLE);
} else {

View File

@@ -158,7 +158,7 @@ public class DemoModeFragment extends PreferenceFragment implements OnPreference
String demoTime = "1010"; // 10:10, a classic choice of horologists
try {
String[] versionParts = android.os.Build.VERSION.RELEASE_OR_CODENAME.split("\\.");
String[] versionParts = android.os.Build.VERSION.RELEASE.split("\\.");
int majorVersion = Integer.valueOf(versionParts[0]);
demoTime = String.format("%02d00", majorVersion % 24);
} catch (IllegalArgumentException ex) {

View File

@@ -403,7 +403,7 @@ class LegacyGlobalActions implements DialogInterface.OnDismissListener, DialogIn
public String getStatus() {
return mContext.getString(
com.android.internal.R.string.bugreport_status,
Build.VERSION.RELEASE_OR_CODENAME,
Build.VERSION.RELEASE,
Build.ID);
}
}