diff options
-rw-r--r-- | work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java | 3 | ||||
-rw-r--r-- | work/workmanager/src/main/java/androidx/work/ArrayCreatingInputMerger.java | 31 |
2 files changed, 22 insertions, 12 deletions
diff --git a/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java b/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java index cb5e59be3c3..7cc25a8361d 100644 --- a/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java +++ b/work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java @@ -55,6 +55,7 @@ import android.os.Build; import android.provider.MediaStore; import android.support.annotation.NonNull; import android.support.test.InstrumentationRegistry; +import android.support.test.filters.LargeTest; import android.support.test.filters.SdkSuppress; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; @@ -1128,7 +1129,7 @@ public class WorkManagerImplTest { } @Test - @SmallTest + @LargeTest public void testCancelWorkByName_ignoresFinishedWork() { final String testName = "myname"; diff --git a/work/workmanager/src/main/java/androidx/work/ArrayCreatingInputMerger.java b/work/workmanager/src/main/java/androidx/work/ArrayCreatingInputMerger.java index 7a89e10b81e..76c51b30451 100644 --- a/work/workmanager/src/main/java/androidx/work/ArrayCreatingInputMerger.java +++ b/work/workmanager/src/main/java/androidx/work/ArrayCreatingInputMerger.java @@ -26,17 +26,26 @@ import java.util.Map; /** * An {@link InputMerger} that attempts to merge the various inputs. For each input, we look at * each key: - * - * - If this is the first time we encountered the key - * - If it's an array, put it in the output - * - If it's a primitive, turn it into a size 1 array and put it in the output - * - Else - * - If the value type matches the old value type - * - If they are arrays, concatenate them - * - If they are primitives, turn them into a size 2 array - * - Else if one is an array and the other is a primitive - * - Make a longer array and concatenate them - * - Else throw an {@link IllegalArgumentException} + * <p><ul> + * <li>If this is the first time we encountered the key</li> + * <ul> + * <li>If it's an array, put it in the output</li> + * <li>If it's a primitive, turn it into a size 1 array and put it in the output</li> + * </ul> + * <li>Else</li> + * <ul> + * <li>If the value type matches the old value type</li> + * <ul> + * <li>If they are arrays, concatenate them</li> + * <li>If they are primitives, turn them into a size 2 array</li> + * </ul> + * <li>Else if one is an array and the other is a primitive</li> + * <ul> + * <li>Make a longer array and concatenate them</li> + * </ul> + * <li>Else throw an {@link IllegalArgumentException}</li> + * </ul> + * </ul> */ public final class ArrayCreatingInputMerger extends InputMerger { |