com.android.ide.common.build
Class SplitOutputMatcher

java.lang.Object
  extended by com.android.ide.common.build.SplitOutputMatcher

public class SplitOutputMatcher
extends java.lang.Object

Helper class to help with installation of multi-output variants.


Constructor Summary
SplitOutputMatcher()
           
 
Method Summary
static java.util.List<com.android.build.OutputFile> computeBestOutput(java.util.List<? extends com.android.build.VariantOutput> outputs, java.util.Set<java.lang.String> variantAbiFilters, int deviceDensity, java.util.List<java.lang.String> deviceAbis)
          Determines and return the list of APKs to use based on given device density and abis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitOutputMatcher

public SplitOutputMatcher()
Method Detail

computeBestOutput

@NonNull
public static java.util.List<com.android.build.OutputFile> computeBestOutput(@NonNull
                                                                                     java.util.List<? extends com.android.build.VariantOutput> outputs,
                                                                                     @Nullable
                                                                                     java.util.Set<java.lang.String> variantAbiFilters,
                                                                                     int deviceDensity,
                                                                                     @NonNull
                                                                                     java.util.List<java.lang.String> deviceAbis)
Determines and return the list of APKs to use based on given device density and abis. This uses the same logic as the store, using two passes: First, find all the compatible outputs. Then take the one with the highest versionCode.

Parameters:
outputs - the outputs to choose from.
variantAbiFilters - a list of abi filters applied to the variant. This is used in place of the outputs, if there is a single output with no abi filters. If the list is null, then the variant does not restrict ABI packaging.
deviceDensity - the density of the device.
deviceAbis - a list of ABIs supported by the device.
Returns:
the list of APKs to install or null if none are compatible.