LOHS: Use system identity for foreground check.

Previously, LOHS would fail in isForeground() if the user app lacks
android.permission.PACKAGE_USAGE_STATS permission, which it shouldn't
need to use LOHS.

With this change, the CTS test that triggered this still doesn't pass on
emulator, but it gets one step further past the permission check.

Bug: 143120756
Bug: 142977313
Test: cts-tradefed run cts-dev -l DEBUG --module CtsNetTestCases --test android.net.wifi.cts.WifiManagerTest#testStartLocalOnlyHotspotSuccess
Change-Id: I576f28c9edcaa5944549100ad86ca2412cce2f54
1 file changed
tree: 99c7e01462e3dfbebd3c950a14f476a6176ae3c1
  1. service/
  2. PREUPLOAD.cfg