| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.service.autofill; |
| 18 |
|
| 19 |
import android.annotation.Nullable; |
| 20 |
import android.view.autofill.AutofillId; |
| 21 |
|
| 22 |
import com.android.internal.util.Preconditions; |
| 23 |
|
| 24 |
|
| 25 |
final class AutofillServiceHelper { |
| 26 |
|
| 27 |
static AutofillId[] assertValid(@Nullable AutofillId[] ids) { |
| 28 |
Preconditions.checkArgument(ids != null && ids.length > 0, "must have at least one id"); |
| 29 |
|
| 30 |
for (int i = 0; i < ids.length; ++i) { |
| 31 |
if (ids[i] == null) { |
| 32 |
throw new IllegalArgumentException("ids[" + i + "] must not be null"); |
| 33 |
} |
| 34 |
} |
| 35 |
return ids; |
| 36 |
} |
| 37 |
|
| 38 |
private AutofillServiceHelper() { |
| 39 |
throw new UnsupportedOperationException("contains static members only"); |
| 40 |
} |
| 41 |
} |