summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-10-18 06:29:14 -0700
committerRoshan Pius <rpius@google.com>2019-10-18 07:25:41 -0700
commita62a611a831f30b4d44392a0ac8bf2c0ef5a8e7c (patch)
treedbe74fa948c2434d648d25f635751a6f8b11c60e /tests
parent82236e070922d76b7d41f038ed076b2aeb2364dc (diff)
WifiStack: Copy over runWithScissors method
Handler.runWithScissors is a simple @hide utility in Handler that should never become part of the formal Android API surface. Copy over the method to wifi. Bug: 142809066 Test: atest com.android.server.wifi.util Change-Id: I675121bb5b4e65e0a0a3db0b9ebee7277817d7c6
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiThreadRunnerTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiThreadRunnerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiThreadRunnerTest.java
index 7a051e2a8..59f2ed817 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiThreadRunnerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiThreadRunnerTest.java
@@ -85,7 +85,7 @@ public class WifiThreadRunnerTest {
@Test
public void callFailure_returnValueOnTimeout() {
- doReturn(false).when(mHandler).runWithScissors(any(), anyLong());
+ doReturn(false).when(mHandler).post(any());
Integer result = mWifiThreadRunner.call(mSupplier, VALUE_ON_TIMEOUT);
@@ -110,7 +110,7 @@ public class WifiThreadRunnerTest {
@Test
public void runFailure() {
- doReturn(false).when(mHandler).runWithScissors(any(), anyLong());
+ doReturn(false).when(mHandler).post(any());
boolean runSuccess = mWifiThreadRunner.run(mRunnable);