Improve getConnectionOwnerUid tests.

Currently, the tests only check whether the method throws a
SecurityException or not. Also check the return value of the
call, by mocking out InetDiagMessage.getConnectionOwnerUid.

This is required to test an upcoming change that will never
throw SecurityException but always return INVALID_UID if the
caller lacks permissions.

Bug: 173331190
Test: test-only change
Change-Id: I63f42a2f098fcf8796c9b4525a3a7b8320c0a139
2 files changed
tree: 5360b5edecba37b2f487cf77553ecc2af13d10f6
  1. core/
  2. framework/
  3. service/
  4. services/
  5. tests/
  6. OWNERS