commit | 32df169be18f0e9adb019dd8987d3df1c4b494b2 | [log] [tgz] |
---|---|---|
author | Guang Zhu <guangzhu@google.com> | Mon Mar 07 15:15:17 2016 -0800 |
committer | Guang Zhu <guangzhu@google.com> | Mon Mar 07 15:15:17 2016 -0800 |
tree | 78782432c9587d956b4cc795c1ee4f59feee6822 | |
parent | ac1465eafe4a51973b86e3784a0a10ed3d126e66 [diff] |
Use fallback build id if jar version is null Bug: 27530700 Change-Id: Idc8c7f22a4f261b810d87ab128e64c6d8fef5933
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java index 3b1ca25..f38517b 100644 --- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java +++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
@@ -37,8 +37,11 @@ @Override public IBuildInfo getBuild() { // Create a blank BuildInfo which will get populated later. - IBuildInfo ctsBuild = new BuildInfo( - Package.getPackage(PACKAGE_NAME).getImplementationVersion(), "cts", "cts"); + String version = Package.getPackage(PACKAGE_NAME).getImplementationVersion(); + if (version == null) { + version = IBuildInfo.UNKNOWN_BUILD_ID; + } + IBuildInfo ctsBuild = new BuildInfo(version, "cts", "cts"); if (mBranch != null) { ctsBuild.setBuildBranch(mBranch); }