Fix wrong request_count in connectivityStateSample and add tests
This CL updates CSTest to use mocked appOpsManager to bypass checkPackage enforcement so that test can file network request as SYSTEM_UID Bug: 314627716 Test: atest ConnectivitySampleMetricsTest Change-Id: I0a5f3b1bf2c343644e6f5e2a4ec1b0460e2645c4
This commit is contained in:
parent
60414671ec
commit
e08de4d322
1 changed files with 90 additions and 5 deletions
|
|
@ -2607,7 +2607,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||
// Not the system, so it's an app requesting on its own behalf.
|
||||
type = RequestType.RT_APP.getNumber();
|
||||
}
|
||||
countPerType.put(type, countPerType.get(type, 0));
|
||||
countPerType.put(type, countPerType.get(type, 0) + 1);
|
||||
}
|
||||
for (int i = countPerType.size() - 1; i >= 0; --i) {
|
||||
final RequestCountForType.Builder r = RequestCountForType.newBuilder();
|
||||
|
|
|
|||
Loading…
Reference in a new issue