diff options
author | Roshan Pius <rpius@google.com> | 2019-04-26 08:29:55 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2019-04-26 08:38:34 -0700 |
commit | 96031c2d3095fe14578e4c07eadf5151c07ebddc (patch) | |
tree | 5d14bdc749e670d2e2899d19504d0f543e35743b /tests | |
parent | 08135433b40efd21abab4e929d365b2cc0de1e86 (diff) |
ScanRequestProxy: Log package name in worksource
Helps differentiate scan initiating apps better in bugreport.
Bug: 123404912
Test: atest com.android.server.wifi
Test: Manual scan log inspection in wifiscanner dumpsys
Change-Id: I74a3bbea40c09346c795d0787407cd57b3af5786
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java b/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java index a19640ff6..985789858 100644 --- a/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java @@ -173,7 +173,8 @@ public class ScanRequestProxyTest { mInOrder.verify(mWifiScanner).registerScanListener(any()); mInOrder.verify(mWifiScanner).startScan(any(), any(), any()); - assertTrue(mWorkSourceArgumentCaptor.getValue().equals(new WorkSource(TEST_UID))); + assertTrue(mWorkSourceArgumentCaptor.getValue().equals( + new WorkSource(TEST_UID, TEST_PACKAGE_NAME_1))); validateScanSettings(mScanSettingsArgumentCaptor.getValue(), false); verify(mWifiMetrics).incrementExternalAppOneshotScanRequestsCount(); @@ -189,7 +190,8 @@ public class ScanRequestProxyTest { mInOrder.verify(mWifiScanner).registerScanListener(any()); mInOrder.verify(mWifiScanner).startScan(any(), any(), any()); - assertTrue(mWorkSourceArgumentCaptor.getValue().equals(new WorkSource(TEST_UID))); + assertTrue(mWorkSourceArgumentCaptor.getValue().equals( + new WorkSource(TEST_UID, TEST_PACKAGE_NAME_1))); validateScanSettings(mScanSettingsArgumentCaptor.getValue(), false, true); } @@ -203,7 +205,8 @@ public class ScanRequestProxyTest { mInOrder.verify(mWifiScanner).registerScanListener(any()); mInOrder.verify(mWifiScanner).startScan(any(), any(), any()); - assertTrue(mWorkSourceArgumentCaptor.getValue().equals(new WorkSource(TEST_UID))); + assertTrue(mWorkSourceArgumentCaptor.getValue().equals( + new WorkSource(TEST_UID, TEST_PACKAGE_NAME_1))); validateScanSettings(mScanSettingsArgumentCaptor.getValue(), false, true); } @@ -221,7 +224,8 @@ public class ScanRequestProxyTest { mInOrder.verify(mWifiConfigManager, never()).retrieveHiddenNetworkList(); mInOrder.verify(mWifiScanner).startScan(any(), any(), any()); - assertTrue(mWorkSourceArgumentCaptor.getValue().equals(new WorkSource(TEST_UID))); + assertTrue(mWorkSourceArgumentCaptor.getValue().equals( + new WorkSource(TEST_UID, TEST_PACKAGE_NAME_1))); validateScanSettings(mScanSettingsArgumentCaptor.getValue(), false); verify(mWifiMetrics).incrementExternalAppOneshotScanRequestsCount(); @@ -241,7 +245,8 @@ public class ScanRequestProxyTest { mInOrder.verify(mWifiConfigManager).retrieveHiddenNetworkList(); mInOrder.verify(mWifiScanner).startScan(any(), any(), any()); - assertTrue(mWorkSourceArgumentCaptor.getValue().equals(new WorkSource(TEST_UID))); + assertTrue(mWorkSourceArgumentCaptor.getValue().equals( + new WorkSource(TEST_UID, TEST_PACKAGE_NAME_1))); validateScanSettings(mScanSettingsArgumentCaptor.getValue(), true); verify(mWifiMetrics).incrementExternalAppOneshotScanRequestsCount(); |