Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32b947ea authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Throw exceptions expected by CTS.

Bug: 111855029
Test: atest android.content.cts.ContentValuesTest
Change-Id: If05d9d0f0960bf890af742fc9c13926bbc5eb4b6
parent db0c85b1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -21,9 +21,12 @@ import android.os.Parcelable;
import android.util.ArrayMap;
import android.util.Log;

import com.android.internal.util.Preconditions;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

/**
@@ -55,6 +58,7 @@ public final class ContentValues implements Parcelable {
     * @param size the initial size of the set of values
     */
    public ContentValues(int size) {
        Preconditions.checkArgumentNonnegative(size);
        mMap = new ArrayMap<>(size);
    }

@@ -64,6 +68,7 @@ public final class ContentValues implements Parcelable {
     * @param from the values to copy
     */
    public ContentValues(ContentValues from) {
        Objects.requireNonNull(from);
        mMap = new ArrayMap<>(from.mMap);
    }