diff options
author | Ningyuan Wang <nywang@google.com> | 2016-09-22 11:38:43 -0700 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2016-09-30 10:31:36 -0700 |
commit | 435236f48f94a8373fa71251a3223e642f446e77 (patch) | |
tree | ac1059dea5ff3aaff5a2d8b7cfefc0b7c5598c68 /tests | |
parent | 22f57da33e6b132a0e7e4bd6d986f74b53d19527 (diff) |
Add wificond to RttService
Wificond is a new wifi daemon handling the communicaton between
java framework and lower level implementation, such as HAL,
wpa_supplicant, and NL80211.
This adds wificond binder objects to RttService, allowing all the
rtt request to go through wificond instead of WifiNative in the future.
Bug: 30633278
Test: compile, manual tests, unit tests
Change-Id: Ic8b910f24d1a269579d79efcf7a4bd0a11be70a7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/RttServiceTest.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/RttServiceTest.java b/tests/wifitests/src/com/android/server/wifi/RttServiceTest.java index 157164ab1..093182120 100644 --- a/tests/wifitests/src/com/android/server/wifi/RttServiceTest.java +++ b/tests/wifitests/src/com/android/server/wifi/RttServiceTest.java @@ -30,6 +30,7 @@ import static org.mockito.Mockito.when; import android.content.BroadcastReceiver; import android.content.Context; import android.content.IntentFilter; +import android.net.wifi.IWificond; import android.net.wifi.RttManager; import android.net.wifi.RttManager.ParcelableRttParams; import android.net.wifi.RttManager.ResponderConfig; @@ -64,6 +65,10 @@ public class RttServiceTest { @Mock WifiNative mWifiNative; TestLooper mLooper; + @Mock + WifiInjector mWifiInjector; + @Mock + IWificond mWificond; RttService.RttServiceImpl mRttServiceImpl; ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor = ArgumentCaptor @@ -74,7 +79,9 @@ public class RttServiceTest { MockitoAnnotations.initMocks(this); TestUtil.installWlanWifiNative(mWifiNative); mLooper = new TestLooper(); - mRttServiceImpl = new RttService.RttServiceImpl(mContext, mLooper.getLooper()); + when(mWifiInjector.makeWificond()).thenReturn(mWificond); + mRttServiceImpl = new RttService.RttServiceImpl(mContext, + mLooper.getLooper(), mWifiInjector); mRttServiceImpl.startService(); } |