diff options
author | Etan Cohen <etancohen@google.com> | 2017-10-31 13:05:18 -0700 |
---|---|---|
committer | Etan Cohen <etancohen@google.com> | 2017-10-31 13:05:18 -0700 |
commit | 0664b38863856e8f933174f15ac89d85ba8e9428 (patch) | |
tree | 6c7b8d2fdd96dcaab74f42a05be86d3846b21d1d /tests/wifitests/src/com/android/server/wifi/rtt | |
parent | 3cb8e8ed905ad968f1d474221d3a7b46340619be (diff) | |
download | android_frameworks_opt_net_wifi-0664b38863856e8f933174f15ac89d85ba8e9428.tar.gz android_frameworks_opt_net_wifi-0664b38863856e8f933174f15ac89d85ba8e9428.tar.bz2 android_frameworks_opt_net_wifi-0664b38863856e8f933174f15ac89d85ba8e9428.zip |
[RTT2] Move native initialization to local thread
Native initialization can block for a "long" period of time. It
therefore should not run on the main thread of the system service (which
will delay system startup). CL moves it off to the local thread of the
RTT service.
Bug: 68661723
Test: unit test & integration tests
Change-Id: I6e51ca080c362eec48f7810b2e013d9106376368
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/rtt')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java index 66d93827e..bfeb068f4 100644 --- a/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java @@ -165,9 +165,11 @@ public class RttServiceImplTest { when(mockContext.getSystemService(PowerManager.class)).thenReturn(mMockPowerManager); mDut.start(mMockLooper.getLooper(), mockAwareManagerBinder, mockNative, mockPermissionUtil); + mMockLooper.dispatchAll(); ArgumentCaptor<BroadcastReceiver> bcastRxCaptor = ArgumentCaptor.forClass( BroadcastReceiver.class); verify(mockContext).registerReceiver(bcastRxCaptor.capture(), any(IntentFilter.class)); + verify(mockNative).start(); mPowerBcastReceiver = bcastRxCaptor.getValue(); assertTrue(mDut.isAvailable()); |