From add9d4668ae3ec9116823bd518f3c12f75a42970 Mon Sep 17 00:00:00 2001 From: Rebecca Silberstein Date: Wed, 5 Apr 2017 10:01:12 -0700 Subject: WifiServiceImpl: fix failing test Fix failing unit test due to a change in the implementation of registerContentObserver. This method is final so our mock was not being called. The implementation change uses a static method, ultimately the source of the failure. Bug: 36919372 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I15d680fdf1211c1171708a3305bdcdcf4b916961 --- service/java/com/android/server/wifi/WifiServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 03a88bc4e..f915a6d4f 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -1477,8 +1477,7 @@ public class WifiServiceImpl extends IWifiManager.Stub { mWifiController.sendMessage(CMD_SCAN_ALWAYS_MODE_CHANGED); } }; - - mContext.getContentResolver().registerContentObserver( + mFrameworkFacade.registerContentObserver(mContext, Settings.Global.getUriFor(Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE), false, contentObserver); } -- cgit v1.2.3