aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar ahumesky <ahumesky@google.com>2017-09-12 02:42:56 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-09-12 14:07:21 +0200
commitb0fd49b198a0227549a6fd113ea00a96197c80dc (patch)
treee1aa8b6fb6a0542af4ac96a998e819eb8d7ce2e2 /src/main/java/com
parent0fc750b71a9e52bc599261f13bad11daaacdd3ec (diff)
Allow mobileInstallResourceApks to be null.
RELNOTES: None. PiperOrigin-RevId: 168312474
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
index bcf734040b..9f02f511c9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
@@ -404,7 +404,7 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
NativeLibs nativeLibs,
ApplicationManifest applicationManifest,
ResourceApk resourceApk,
- MobileInstallResourceApks mobileInstallResourceApks,
+ @Nullable MobileInstallResourceApks mobileInstallResourceApks,
ResourceApk instantRunResourceApk,
boolean shrinkResources,
JavaTargetAttributes resourceClasses,
@@ -633,20 +633,22 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
builder.addOutputGroup(OutputGroupProvider.HIDDEN_TOP_LEVEL, oneVersionEnforcementArtifact);
}
- AndroidBinaryMobileInstall.addMobileInstall(
- ruleContext,
- builder,
- dexingOutput,
- javaSemantics,
- nativeLibs,
- resourceApk,
- mobileInstallResourceApks,
- resourceExtractor,
- nativeLibsZips,
- signingKey,
- dataDeps,
- additionalMergedManifests,
- applicationManifest);
+ if (mobileInstallResourceApks != null) {
+ AndroidBinaryMobileInstall.addMobileInstall(
+ ruleContext,
+ builder,
+ dexingOutput,
+ javaSemantics,
+ nativeLibs,
+ resourceApk,
+ mobileInstallResourceApks,
+ resourceExtractor,
+ nativeLibsZips,
+ signingKey,
+ dataDeps,
+ additionalMergedManifests,
+ applicationManifest);
+ }
return builder
.setFilesToBuild(filesToBuild)