Fix a stupid NPE

Okay so this is really not a behavior change as it converts an
NPE into an illegal argument exception, but still, that's what
should happen (and that's what the upcoming test actually tests
for).

Test: upcoming NetworkAgentTest
Bug: 139268426
Change-Id: I0d9b8cb8f8dcb587b9430b486b863efb9e9e77ef
Merged-In: I3e17211c03bc74426bf5e2e414ec322d73b0060b
(cherry picked from commit 827d7ceea1e83cca9ba3f6189e20b6780c0194ed, aosp/1277595)
1 file changed
tree: 28f6c1ae4b26de3a4b6ce77c5a15291185453537
  1. core/
  2. services/
  3. tests/