Correct isLegacy metric data
The isLegacy field of Nsd metrics should indicate whether the data was collected from the old backend or not. However, it is currently only dependent on the ENABLE_PLATFORM_MDNS_BACKEND compat change value, which is incorrect. This is because the NsdService always uses the new backend since Android U, regardless of the compat change value. Therefore, the isLegacy data should be obtained from each transaction. Bug: 287546772 Bug: 299880473 Test: atest FrameworksNetTestCases NsdManagerTest Change-Id: I156abd656b90578d710696a69ccf7dfca97a2c9c
Showing
- service-t/src/com/android/metrics/NetworkNsdReportedMetrics.java 43 additions, 41 deletions...-t/src/com/android/metrics/NetworkNsdReportedMetrics.java
- service-t/src/com/android/server/NsdService.java 112 additions, 90 deletionsservice-t/src/com/android/server/NsdService.java
- tests/unit/java/com/android/metrics/NetworkNsdReportedMetricsTest.kt 26 additions, 25 deletions...java/com/android/metrics/NetworkNsdReportedMetricsTest.kt
- tests/unit/java/com/android/server/NsdServiceTest.java 41 additions, 31 deletionstests/unit/java/com/android/server/NsdServiceTest.java
This diff is collapsed.
Please register or sign in to comment