diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2018-05-03 02:34:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-03 02:34:54 +0000 |
commit | 86214b64708c84dbf1c5aead33f2e4206eb83dd9 (patch) | |
tree | 58c0aa31db3e747362ba0d545ac547b116369aa7 /java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java | |
parent | cccd332af6185505101df03ebee11923d7ee5fd4 (diff) | |
parent | 2f528d252c9b1cf02ef4fc9757b9b90c7862bca9 (diff) |
Merge "Add application generation for root component generator."
Diffstat (limited to 'java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java')
-rw-r--r-- | java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java b/java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java index 4c4e6ee8d..cb312083f 100644 --- a/java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java +++ b/java/com/android/dialer/rootcomponentgenerator/RootComponentGeneratingStep.java @@ -72,8 +72,7 @@ final class RootComponentGeneratingStep implements ProcessingStep { // defer root components to the next round in case where the current build target contains // elements annotated with @InstallIn. Annotation processor cannot detect metadata files // generated in the same round and the metadata is accessible in the next round. - if (elementsByAnnotation.containsKey(InstallIn.class) - || elementsByAnnotation.containsKey(IncludeInDialerRoot.class)) { + if (shouldDeferRootComponent(elementsByAnnotation)) { return elementsByAnnotation.get(DialerRootComponent.class); } else { generateRootComponent(MoreElements.asType(element)); @@ -82,6 +81,12 @@ final class RootComponentGeneratingStep implements ProcessingStep { return Collections.emptySet(); } + private boolean shouldDeferRootComponent( + SetMultimap<Class<? extends Annotation>, Element> elementsByAnnotation) { + return elementsByAnnotation.containsKey(InstallIn.class) + || elementsByAnnotation.containsKey(IncludeInDialerRoot.class); + } + /** * Generates a root component. * |