release-request-ccd04736-6e66-4825-a227-ecd69d8b5337-for-git_oc-mr1-release-4163697 snap-temp-L79500000080559163

Change-Id: I38ad8412f2071c89ef3c954185c8749c02d9a089
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 8692412..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    android-support-annotations \
-    guava \
-    jsr305 \
-
-# Don't build anything, the needed system APIs have been removed.
-#LOCAL_SRC_FILES := $(call all-java-files-under, src)
-#LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := NetworkRecommendation
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_SDK_VERSION := system_current
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-# Set to false to allow iteration via adb install rather than having to
-# continaully reflash a test device.
-LOCAL_DEX_PREOPT := false
-
-include $(BUILD_PACKAGE)
-
-# This finds and builds the test apk as well, so a single make does both.
-#include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
deleted file mode 100644
index 3c61f98..0000000
--- a/AndroidManifest.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          android:versionCode="1"
-          android:versionName="1.0.0"
-          package="com.android.networkrecommendation">
-
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.REQUEST_NETWORK_SCORES"/>
-    <uses-permission android:name="android.permission.SCORE_NETWORKS"/>
-    <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
-    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
-
-    <application android:name=".NetworkRecommendationApp"
-                 android:allowBackup="false"
-                 android:directBootAware="true">
-
-        <!-- Only the platform can bind to this service -->
-        <service android:name=".NetworkRecommendationService"
-                 android:permission="android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE">
-            <meta-data android:name="android.net.scoring.recommendation_service_label"
-                       android:value="@string/network_recommendation_service_label"/>
-            <meta-data android:name="android.net.wifi.notification_channel_id_network_available"
-                       android:value="com.android.networkrecommendation.Notifications.WifiMessageGroup.NetworkAvailableChannel" />
-            <intent-filter>
-                <action android:name="android.net.action.RECOMMEND_NETWORKS" />
-            </intent-filter>
-        </service>
-    </application>
-</manifest>
diff --git a/OWNERS b/OWNERS
deleted file mode 100644
index b1bc658..0000000
--- a/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-ashaikh@google.com
-jjoslin@google.com
-jlapenna@google.com
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
deleted file mode 100644
index c0da365..0000000
--- a/PREUPLOAD.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-[Hook Scripts]
-google_java_format = true
-
-[Builtin Hooks]
-commit_msg_bug_field = true
-commit_msg_changeid_field = true
-commit_msg_test_field = true
diff --git a/README b/README
deleted file mode 100644
index 3aa3662..0000000
--- a/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Network Recommentation Service App
-==========================
-
-This app works as part of com.android.net to score networks for the platform.
-
-Provides a simple network recommendation service for use with the
-RecommendedNetworkEvaluator (platform/frameworks/opt/net/wifi).
diff --git a/proguard.flags b/proguard.flags
deleted file mode 100644
index 2d236f7..0000000
--- a/proguard.flags
+++ /dev/null
@@ -1 +0,0 @@
--keep class com.android.networkrecommendation.NetworkRecommendationService* { *; }
diff --git a/res/drawable/ic_signal_wifi_badged_0_bars.xml b/res/drawable/ic_signal_wifi_badged_0_bars.xml
deleted file mode 100644
index e458378..0000000
--- a/res/drawable/ic_signal_wifi_badged_0_bars.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-377 308.5c0 -2.5 2 -4.5 4.5 -4.5l3.5 0 0.79999 -1c-0.29999 -0.29999 -3.70001 -3 -8.79999 -3 -5.09998 0 -8.5 2.79999 -8.79999 3l8.79999 11 0 0 0 0 1.60001 -2c-0.9 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF"
-            android:fillAlpha="0.3" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_1_bar.xml b/res/drawable/ic_signal_wifi_badged_1_bar.xml
deleted file mode 100644
index 1fc239e..0000000
--- a/res/drawable/ic_signal_wifi_badged_1_bar.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-377 308.5c0 -2.5 2 -4.5 4.5 -4.5l3.5 0 0.79999 -1c-0.29999 -0.29999 -3.70001 -3 -8.79999 -3 -5.09998 0 -8.5 2.79999 -8.79999 3l8.79999 11 0 0 0 0 1.60001 -2c-0.9 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF"
-            android:fillAlpha="0.3" />
-        <path
-            android:pathData="M-377 308.5c0 -0.20001 0 -0.29999 0.10001 -0.5 0 0 0 0 -0.10001 0 -2.10001 0 -3.60001 1.20001 -3.79999 1.29999L-377 314l1.60001 -2.10001c-0.9 -0.79998 -1.60001 -2 -1.60001 -3.39999z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_2_bars.xml b/res/drawable/ic_signal_wifi_badged_2_bars.xml
deleted file mode 100644
index d388365..0000000
--- a/res/drawable/ic_signal_wifi_badged_2_bars.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-377 308.5c0 -2.5 2 -4.5 4.5 -4.5l3.5 0 0.79999 -1c-0.29999 -0.29999 -3.70001 -3 -8.79999 -3 -5.09998 0 -8.5 2.79999 -8.79999 3l8.79999 11 0 0 0 0 1.60001 -2c-0.9 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF"
-            android:fillAlpha="0.3" />
-        <path
-            android:pathData="M-377 308.5c0 -0.89999 0.29999 -1.70001 0.70001 -2.5 -0.20001 0 -0.5 0 -0.70001 0 -2.79999 0 -4.79999 1.60001 -5 1.79999l5 6.20001 0 0 0 0 1.60001 -2c-1 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_3_bars.xml b/res/drawable/ic_signal_wifi_badged_3_bars.xml
deleted file mode 100644
index c64cb72..0000000
--- a/res/drawable/ic_signal_wifi_badged_3_bars.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-377 308.5c0 -2.5 2 -4.5 4.5 -4.5l3.5 0 0.79999 -1c-0.29999 -0.29999 -3.70001 -3 -8.79999 -3 -5.09998 0 -8.5 2.79999 -8.79999 3l8.79999 11 0 0 0 0 1.60001 -2c-0.9 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF"
-            android:fillAlpha="0.3" />
-        <path
-            android:pathData="M-375.39999 311.89999c-1 -0.79998 -1.60001 -2.1 -1.60001 -3.39999 0 -1.79999 1.10001 -3.39999 2.70001 -4.10001C-375.09998 304.19998 -376 304 -377 304c-3.60001 0 -6 1.89999 -6.29999 2.20001L-377 314l0 0 0 0"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_4_bars.xml b/res/drawable/ic_signal_wifi_badged_4_bars.xml
deleted file mode 100644
index de56b4c..0000000
--- a/res/drawable/ic_signal_wifi_badged_4_bars.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-377 308.5c0 -2.5 2 -4.5 4.5 -4.5l3.5 0 0.79999 -1c-0.29999 -0.29999 -3.70001 -3 -8.79999 -3 -5.09998 0 -8.5 2.79999 -8.79999 3l8.79999 11 0 0 0 0 1.60001 -2c-0.9 -0.89999 -1.60001 -2.10001 -1.60001 -3.5z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_4k.xml b/res/drawable/ic_signal_wifi_badged_4k.xml
deleted file mode 100644
index 2a94891..0000000
--- a/res/drawable/ic_signal_wifi_badged_4k.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-373.04999 308.79999l0.5 0 0 0.89999 -0.5 0 0 1.20001 -1.1 0 0 -1.20001 -1.9 0 -0.1 -0.70001 1.89999 -3.70001 1.10001 0 0 3.50003 0.1 0zm-1.89999 0l0.89999 0 0 -1.9 0 0 -0.89999 1.9z"
-            android:fillColor="#FFFFFF" />
-        <path
-            android:pathData="M-370.44998 308.70001l-0.5 0.60001 0 1.70001 -1.10001 0 0 -5.70001 1.10001 0 0 2.5 0.39999 -0.60001 1.10001 -1.89999 1.39999 0 -1.6 2.5 1.70001 3.20001 -1.29999 0 -1.20001 -2.30002z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_hd.xml b/res/drawable/ic_signal_wifi_badged_hd.xml
deleted file mode 100644
index d8cf77b..0000000
--- a/res/drawable/ic_signal_wifi_badged_hd.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-371.79999 311l-1.1 0 0 -2.29999 -0.79999 0 0 2.29999 -1.10001 0 0 -5.70001 1.10001 0 0 2.39999 0.79999 0 0 -2.39999 1.1 0 0 5.70001z"
-            android:fillColor="#FFFFFF" />
-        <path
-            android:pathData="M-371.33557 310.98651l0 -5.68701 1.39068 0c0.27848 0 0.53336 0.0532 0.76465 0.16016 0.2313 0.10693 0.42954 0.2622 0.59568 0.46679 0.16519 0.20459 0.29357 0.45557 0.38421 0.75391 0.0906 0.29834 0.13593 0.63867 0.13593 1.02148l0 0.88672c0 0.38281 -0.0453 0.72363 -0.13593 1.021 -0.0906 0.29785 -0.21902 0.5498 -0.38421 0.7539 -0.16614 0.20411 -0.36628 0.35938 -0.59946 0.46485 -0.23316 0.10547 -0.49182 0.1582 -0.77786 0.1582l-1.37369 0zm1.06879 -4.76904l0 3.85107 0.26333 0c0.15491 0 0.28452 -0.0283 0.38971 -0.084 0.10516 -0.0557 0.19077 -0.14356 0.25681 -0.26367 0.066 -0.12012 0.11331 -0.27198 0.14184 -0.4585 0.0285 -0.18652 0.0424 -0.41113 0.0424 -0.67383l0 -0.89453c0 -0.26562 -0.0138 -0.49219 -0.0424 -0.67969 -0.0285 -0.1875 -0.0758 -0.33984 -0.14102 -0.45703 -0.0644 -0.11719 -0.1492 -0.20312 -0.25275 -0.25781 -0.10437 -0.0547 -0.23071 -0.082 -0.37991 -0.082l-0.27801 0z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_ld.xml b/res/drawable/ic_signal_wifi_badged_ld.xml
deleted file mode 100644
index 41576d7..0000000
--- a/res/drawable/ic_signal_wifi_badged_ld.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-371.33557 310.98651l0 -5.68701 1.39068 0c0.27848 0 0.53336 0.0532 0.76465 0.16016 0.2313 0.10693 0.42954 0.2622 0.59568 0.46679 0.16519 0.20459 0.29357 0.45557 0.38421 0.75391 0.0906 0.29834 0.13593 0.63867 0.13593 1.02148l0 0.88672c0 0.38281 -0.0453 0.72363 -0.13593 1.021 -0.0906 0.29785 -0.21902 0.5498 -0.38421 0.7539 -0.16614 0.20411 -0.36628 0.35938 -0.59946 0.46485 -0.23316 0.10547 -0.49182 0.1582 -0.77786 0.1582l-1.37369 0zm1.06879 -4.76904l0 3.85107 0.26333 0c0.15491 0 0.28452 -0.0283 0.38971 -0.084 0.10516 -0.0557 0.19077 -0.14356 0.25681 -0.26367 0.066 -0.12012 0.11331 -0.27198 0.14184 -0.4585 0.0285 -0.18652 0.0424 -0.41113 0.0424 -0.67383l0 -0.89453c0 -0.26562 -0.0138 -0.49219 -0.0424 -0.67969 -0.0285 -0.1875 -0.0758 -0.33984 -0.14102 -0.45703 -0.0644 -0.11719 -0.1492 -0.20312 -0.25275 -0.25781 -0.10437 -0.0547 -0.23071 -0.082 -0.37991 -0.082l-0.27801 0z"
-            android:fillColor="#FFFFFF" />
-        <path
-            android:pathData="M-373.13333 310.13333l1.33334 0 0 0.86667 -2.46667 0 0 -5.66666 1.13333 0 0 4.79999z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_badged_sd.xml b/res/drawable/ic_signal_wifi_badged_sd.xml
deleted file mode 100644
index 72658b1..0000000
--- a/res/drawable/ic_signal_wifi_badged_sd.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<vector xmlns:api24="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:viewportWidth="18"
-    android:viewportHeight="18"
-    android:width="18dp"
-    android:height="18dp">
-    <group
-        android:translateX="386"
-        android:translateY="-298">
-        <path
-            android:pathData="M-371.33557 310.98651l0 -5.68701 1.39068 0c0.27848 0 0.53336 0.0532 0.76465 0.16016 0.2313 0.10693 0.42954 0.2622 0.59568 0.46679 0.16519 0.20459 0.29357 0.45557 0.38421 0.75391 0.0906 0.29834 0.13593 0.63867 0.13593 1.02148l0 0.88672c0 0.38281 -0.0453 0.72363 -0.13593 1.021 -0.0906 0.29785 -0.21902 0.5498 -0.38421 0.7539 -0.16614 0.20411 -0.36628 0.35938 -0.59946 0.46485 -0.23316 0.10547 -0.49182 0.1582 -0.77786 0.1582l-1.37369 0zm1.06879 -4.76904l0 3.85107 0.26333 0c0.15491 0 0.28452 -0.0283 0.38971 -0.084 0.10516 -0.0557 0.19077 -0.14356 0.25681 -0.26367 0.066 -0.12012 0.11331 -0.27198 0.14184 -0.4585 0.0285 -0.18652 0.0424 -0.41113 0.0424 -0.67383l0 -0.89453c0 -0.26562 -0.0138 -0.49219 -0.0424 -0.67969 -0.0285 -0.1875 -0.0758 -0.33984 -0.14102 -0.45703 -0.0644 -0.11719 -0.1492 -0.20312 -0.25275 -0.25781 -0.10437 -0.0547 -0.23071 -0.082 -0.37991 -0.082l-0.27801 0z"
-            android:fillColor="#FFFFFF" />
-        <path
-            android:pathData="M-372.87598 309.47461c0 -0.10645 -0.01 -0.20117 -0.0303 -0.28223 -0.0205 -0.0811 -0.0576 -0.15527 -0.11035 -0.22265 -0.0537 -0.0674 -0.12598 -0.12891 -0.21777 -0.18457 -0.0908 -0.0566 -0.20704 -0.11231 -0.34668 -0.16797 -0.24903 -0.0889 -0.47657 -0.18457 -0.68165 -0.28614 -0.20605 -0.10156 -0.38281 -0.2207 -0.53027 -0.35839 -0.14746 -0.13721 -0.26172 -0.29639 -0.34277 -0.47803 -0.0811 -0.18164 -0.12207 -0.39697 -0.12207 -0.646 0 -0.23144 0.042 -0.4414 0.12793 -0.63086 0.085 -0.18945 0.20312 -0.35205 0.35644 -0.48779 0.15235 -0.13623 0.33496 -0.2417 0.54883 -0.31641 0.21289 -0.0752 0.44824 -0.1123 0.70508 -0.1123 0.2666 0 0.50683 0.0425 0.71973 0.12744 0.21386 0.0854 0.39648 0.2041 0.54687 0.35645 0.15137 0.15234 0.26758 0.333 0.34766 0.54101 0.0791 0.2085 0.11914 0.43604 0.11914 0.68262l-1.07422 0c0 -0.11963 -0.0127 -0.22998 -0.0381 -0.33154 -0.0254 -0.10205 -0.0654 -0.18897 -0.12011 -0.26123 -0.0547 -0.0723 -0.125 -0.12891 -0.20997 -0.16993 -0.085 -0.0405 -0.1875 -0.0605 -0.30664 -0.0605 -0.11132 0 -0.208 0.0171 -0.29004 0.0513 -0.0811 0.0342 -0.14843 0.0815 -0.20117 0.14111 -0.0537 0.0596 -0.0928 0.13037 -0.11816 0.21143 -0.0254 0.0815 -0.0381 0.16894 -0.0381 0.26318 0 0.0937 0.0166 0.17725 0.0508 0.24951 0.0342 0.0723 0.0869 0.14014 0.15625 0.20361 0.0703 0.064 0.16016 0.125 0.26856 0.18311 0.10937 0.0586 0.23926 0.11963 0.38965 0.1831 0.24316 0.084 0.46093 0.17823 0.65136 0.2837 0.19043 0.10498 0.35059 0.22998 0.48047 0.37158 0.12891 0.14258 0.22754 0.30762 0.29493 0.49316 0.0674 0.1875 0.10156 0.40235 0.10156 0.64649 0 0.24121 -0.04 0.458 -0.12012 0.64843 -0.0801 0.19043 -0.19434 0.35059 -0.3418 0.48145 -0.14746 0.13086 -0.32617 0.23144 -0.53711 0.30176 -0.21093 0.0693 -0.44726 0.10449 -0.70898 0.10449 -0.23633 0 -0.46777 -0.0361 -0.69531 -0.1084 -0.22754 -0.0723 -0.43067 -0.18359 -0.61035 -0.33203 -0.17872 -0.14844 -0.32325 -0.33691 -0.43262 -0.56543 -0.10938 -0.22852 -0.16309 -0.49805 -0.16309 -0.80859l1.07813 0c0 0.17089 0.0166 0.31445 0.0498 0.43261 0.0332 0.11817 0.084 0.21485 0.15235 0.29004 0.0684 0.0752 0.15429 0.12891 0.25683 0.16211 0.10352 0.0332 0.22461 0.0488 0.36426 0.0488 0.11719 0 0.21582 -0.0156 0.2959 -0.0488 0.0801 -0.0332 0.14355 -0.0781 0.19238 -0.13574 0.0478 -0.0566 0.082 -0.125 0.10254 -0.2041 0.0205 -0.0781 0.0303 -0.16504 0.0303 -0.25879z"
-            android:fillColor="#FFFFFF" />
-    </group>
-</vector>
diff --git a/res/drawable/ic_signal_wifi_no_network.xml b/res/drawable/ic_signal_wifi_no_network.xml
deleted file mode 100644
index 75375a3..0000000
--- a/res/drawable/ic_signal_wifi_no_network.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-Copyright (C) 2017 The Android Open Source Project
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="18.41dp"
-        android:height="18.41dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
-<path
-    android:pathData="M13.8,12.2l5.7,0.0L23.6,7.0C23.2,6.7 18.7,3.0 12.0,3.0C5.3,3.0 0.8,6.7 0.4,7.0L12.0,21.5l0.0,0.0l0.0,0.0l1.8,-2.2L13.8,12.2z"
-    android:fillColor="#FFFFFF"
-    android:fillAlpha="0.3"/>
-<path
-    android:pathData="M21.9,15.4l-1.1,-1.2 -1.9,1.900001 -1.9,-1.900001 -1.1,1.2 1.9,1.9 -1.9,1.800001 1.1,1.199999 1.9,-1.9 1.9,1.9 1.1,-1.199999 -1.799999,-1.800001z"
-    android:fillColor="#FFFFFF"/>
-</vector>
-
diff --git a/res/drawable/ic_signal_wifi_statusbar_not_connected.xml b/res/drawable/ic_signal_wifi_statusbar_not_connected.xml
deleted file mode 100644
index d74c31b..0000000
--- a/res/drawable/ic_signal_wifi_statusbar_not_connected.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2017 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="26dp"
-    android:height="24dp"
-    android:viewportWidth="26"
-    android:viewportHeight="24">
-
-    <path android:pathData="M0 0h26v24H0z" />
-    <path android:fillColor="#FFFFFF"
-          android:fillAlpha=".3"
-          android:pathData="M21 8.5c.85 0 1.64 .23 2.34 .62 l2.24-2.79C25.1 5.96 20.26 2 13 2S.9 5.96 .42 6.32l12.57 15.66 .01 .02 .01 -.01 4.21-5.24c-.76-.87-1.22-2-1.22-3.25 0-2.76 2.24-5 5-5z" />
-    <path android:fillColor="#FFFFFF"
-          android:pathData="M21 10c-1.93 0-3.5 1.57-3.5 3.5h1.75c0-.97 .78 -1.75 1.75-1.75s1.75 .78 1.75 1.75c0 .48-.2 .92 -.51 1.24l-1.09 1.1c-.63 .63 -1.02 1.51-1.02 2.47v.44h1.75c0-1.31 .39 -1.84 1.03-2.47l.78-.8c.5-.5 .82 -1.2 .82 -1.97C24.5 11.57 22.93 10 21 10zm-.95 11.95h1.9v-1.9h-1.9v1.9z" />
-</vector>
-
diff --git a/res/drawable/ic_wifi_signal_4.xml b/res/drawable/ic_wifi_signal_4.xml
deleted file mode 100644
index aca4551..0000000
--- a/res/drawable/ic_wifi_signal_4.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-    Copyright (C) 2015 The Android Open Source Project
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="26dp"
-    android:height="24dp"
-    android:viewportWidth="26"
-    android:viewportHeight="24">
-    <path
-        android:fillColor="#FFFFFF"
-        android:pathData="M13.0,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.4,6.5L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/>
-</vector>
diff --git a/res/drawable/stat_notify_wifi_in_range.xml b/res/drawable/stat_notify_wifi_in_range.xml
deleted file mode 100644
index c2af105..0000000
--- a/res/drawable/stat_notify_wifi_in_range.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-Copyright (C) 2017 The Android Open Source Project
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="26.0dp"
-        android:height="24.0dp"
-        android:viewportWidth="26.0"
-        android:viewportHeight="24.0">
-    <path
-        android:fillColor="#4DFFFFFF"
-        android:pathData="M19.1,14l-3.4,0l0,-1.5c0,-1.8 0.8,-2.8 1.5,-3.4C18.1,8.3 19.200001,8 20.6,8c1.2,0 2.3,0.3 3.1,0.8l1.9,-2.3C25.1,6.1 20.299999,2.1 13,2.1S0.9,6.1 0.4,6.5L13,22l0,0l0,0l0,0l0,0l6.5,-8.1L19.1,14z"/>
-    <path
-        android:fillColor="#FFFFFFFF"
-        android:pathData="M19.5,17.799999c0,-0.8 0.1,-1.3 0.2,-1.6c0.2,-0.3 0.5,-0.7 1.1,-1.2c0.4,-0.4 0.7,-0.8 1,-1.1s0.4,-0.8 0.4,-1.2c0,-0.5 -0.1,-0.9 -0.4,-1.2c-0.3,-0.3 -0.7,-0.4 -1.2,-0.4c-0.4,0 -0.8,0.1 -1.1,0.3c-0.3,0.2 -0.4,0.6 -0.4,1.1l-1.9,0c0,-1 0.3,-1.7 1,-2.2c0.6,-0.5 1.5,-0.8 2.5,-0.8c1.1,0 2,0.3 2.6,0.8c0.6,0.5 0.9,1.3 0.9,2.3c0,0.7 -0.2,1.3 -0.6,1.8c-0.4,0.6 -0.9,1.1 -1.5,1.6c-0.3,0.3 -0.5,0.5 -0.6,0.7c-0.1,0.2 -0.1,0.6 -0.1,1L19.5,17.700001zM21.4,21l-1.9,0l0,-1.8l1.9,0L21.4,21z"/>
-</vector>
diff --git a/res/values/colors.xml b/res/values/colors.xml
deleted file mode 100644
index 8700e92..0000000
--- a/res/values/colors.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-    <!-- googBlue from material design -->
-    <color name="color_tint">#4285F4</color>
-</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
deleted file mode 100644
index 4167ebd..0000000
--- a/res/values/config.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<resources>
-    <!-- Taken from frameworks/base/core/res/res/values/config.xml config_wifi_framework_* -->
-    <integer translatable="false" name="config_netrec_5GHz_preference_boost_factor">40</integer>
-    <integer translatable="false" name="config_netrec_RSSI_SCORE_OFFSET">85</integer>
-    <integer translatable="false" name="config_netrec_RSSI_SCORE_SLOPE">4</integer>
-    <integer translatable="false" name="config_netrec_SAME_BSSID_AWARD">24</integer>
-    <integer translatable="false" name="config_netrec_LAST_SELECTION_AWARD">480</integer>
-    <integer translatable="false" name="config_netrec_PASSPOINT_SECURITY_AWARD">40</integer>
-    <integer translatable="false" name="config_netrec_SECURITY_AWARD">80</integer>
-    <integer translatable="false" name="config_netrec_wifi_score_low_rssi_threshold_5GHz">-70</integer>
-    <integer translatable="false" name="config_netrec_wifi_score_low_rssi_threshold_24GHz">-73</integer>
-    <integer translatable="false" name="config_netrec_wifi_score_good_rssi_threshold_24GHz">-60</integer>
-    <integer translatable="false" name="config_netrec_score_good_rssi_threshold">-60</integer>
-    <integer translatable="false" name="config_netrec_current_network_boost">16</integer>
-</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
deleted file mode 100644
index e208b4c..0000000
--- a/res/values/strings.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- The service label for network recommendation service. [CHAR LIMIT=40] -->
-    <string name="network_recommendation_service_label">System default</string>
-
-    <!-- Notification title when there is a high quality open wireless network nearby.-->
-    <string name="wifi_available_title">Connect to open Wi\u2011Fi network</string>
-    <!-- Notification title when the system is connecting to a high quality open network. -->
-    <string name="wifi_available_title_connecting">Connecting to open Wi\u2011Fi network</string>
-    <!-- Notification title when the system has connected to the high quality open network. -->
-    <string name="wifi_available_title_connected">Connected to Wi\u2011Fi network</string>
-    <!-- Notification title when the system failed to connect to the high quality open network. -->
-    <string name="wifi_available_title_failed">Couldn\u0027t connect to Wi\u2011Fi network</string>
-    <!-- Notification content informing the user that tapping on this notification will open the wifi picker. -->
-    <string name="wifi_available_content_failed">Tap to see all networks</string>
-
-    <!-- Notification action name for connecting to the network specified in the notification body. -->
-    <string name="wifi_available_action_connect">Connect</string>
-    <!-- Notification action name for opening the wifi picker, showing the user all the nearby networks. -->
-    <string name="wifi_available_action_all_networks">All Networks</string>
-
-    <!-- A notification is shown when Wi-Fi Wakeup enables Wi-Fi. -->
-    <string name="wifi_wakeup_enabled_notification_title">Wi\u2011Fi turned on automatically</string>
-    <string name="wifi_wakeup_enabled_notification_context">You\u0027re near a saved network: %1$s</string>
-
-    <!-- Text used to indicate that a connection attempt is ongoing [CHAR LIMIT=20] -->
-    <string name="common_connecting">Connecting&#8230;</string>
-
-    <!-- Name of the notification channel group of our Wi-Fi messages -->
-    <string name="notification_channel_group_name">Wi\u2011Fi messages</string>
-    <!-- Name of the notification channel for a notification shown when there is a high quality open wireless network nearby. -->
-    <string name="notification_channel_wakeup_name">Wi\u2011Fi turned on</string>
-    <!-- Name of the notification channel for a notification shown when Wi-Fi Wakeup enables Wi-Fi.. -->
-    <string name="notification_channel_network_available">Network available</string>
-</resources>
diff --git a/src/com/android/networkrecommendation/Constants.java b/src/com/android/networkrecommendation/Constants.java
deleted file mode 100644
index d680f9f..0000000
--- a/src/com/android/networkrecommendation/Constants.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation;
-
-/**
- * Created by jlapenna on 2/14/17.
- */
-public final class Constants {
-
-    public static final String TAG = "NetRec";
-
-    private Constants() {}
-}
diff --git a/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java b/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java
deleted file mode 100644
index 2f8afa8..0000000
--- a/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.networkrecommendation;
-
-import android.content.Context;
-import android.net.NetworkKey;
-import android.net.NetworkRecommendationProvider;
-import android.net.NetworkScoreManager;
-import android.net.RecommendationRequest;
-import android.net.RecommendationResult;
-import android.net.RssiCurve;
-import android.net.ScoredNetwork;
-import android.net.WifiKey;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.os.Bundle;
-import android.support.annotation.VisibleForTesting;
-import android.text.TextUtils;
-import android.util.ArrayMap;
-
-import com.android.networkrecommendation.util.Blog;
-import com.android.networkrecommendation.util.SsidUtil;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executor;
-
-import javax.annotation.concurrent.GuardedBy;
-
-/**
- * In memory, debuggable network recommendation provider.
- *
- * <p>This example evaluates networks in a scan and picks the "least bad" network, returning a
- * result to the RecommendedNetworkEvaluator, regardless of configuration point.
- *
- * <p>This recommender is not yet recommended for non-development devices.
- *
- * <p>To debug:
- * $ adb shell dumpsys activity service NetworkRecommendationService
- *
- * <p>Clear stored scores:
- * $ adb shell dumpsys activity service NetworkRecommendationService clear
- *
- * <p>Score a network:
- * $ adb shell dumpsys activity service NetworkRecommendationService addScore $SCORE
- *
- * <p>SCORE: "Quoted SSID",bssid|$RSSI_CURVE|metered|captivePortal|BADGE
- *
- * <p>RSSI_CURVE: bucketWidth,score,score,score,score,...
- *
- * <p>curve, metered and captive portal are optional, as expressed by an empty value.
- *
- * <p>BADGE: NONE, SD, HD, 4K
- *
- * <p>All commands should be executed on one line, no spaces between each line of the command..
- * <p>Eg, A high quality, paid network with captive portal:
- * $ adb shell dumpsys activity service NetworkRecommendationService addScore \
- * '\"Metered\",aa:bb:cc:dd:ee:ff\|
- * 10,-128,-128,-128,-128,-128,-128,-128,-128,27,27,27,27,27,-128\|1\|1'
- *
- * <p>Eg, A high quality, unmetered network with captive portal:
- * $ adb shell dumpsys activity service NetworkRecommendationService addScore \
- * '\"Captive\",aa:bb:cc:dd:ee:ff\|
- * 10,-128,-128,-128,-128,-128,-128,-128,-128,28,28,28,28,28,-128\|0\|1'
- *
- * <p>Eg, A high quality, unmetered network with any bssid:
- * $ adb shell dumpsys activity service NetworkRecommendationService addScore \
- * '\"AnySsid\",00:00:00:00:00:00\|
- * 10,-128,-128,-128,-128,-128,-128,-128,-128,29,29,29,29,29,-128\|0\|0'
- */
-@VisibleForTesting
-public class DefaultNetworkRecommendationProvider
-        extends NetworkRecommendationProvider implements SynchronousNetworkRecommendationProvider {
-    static final String TAG = "DefaultNetRecProvider";
-
-    private static final String WILDCARD_MAC = "00:00:00:00:00:00";
-
-    /**
-     * The lowest RSSI value at which a fixed score should apply.
-     * Only used for development / testing purpose.
-     */
-    @VisibleForTesting
-    static final int CONSTANT_CURVE_START = -150;
-
-    @VisibleForTesting
-    static final RssiCurve BADGE_CURVE_SD =
-            new RssiCurve(
-                    CONSTANT_CURVE_START,
-                    10 /* bucketWidth */,
-                    new byte[] {0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
-                    0 /* defaultActiveNetworkBoost */);
-
-    @VisibleForTesting
-    static final RssiCurve BADGE_CURVE_HD =
-            new RssiCurve(
-                    CONSTANT_CURVE_START,
-                    10 /* bucketWidth */,
-                    new byte[] {0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20},
-                    0 /* defaultActiveNetworkBoost */);
-
-    @VisibleForTesting
-    static final RssiCurve BADGE_CURVE_4K =
-            new RssiCurve(
-                    CONSTANT_CURVE_START,
-                    10 /* bucketWidth */,
-                    new byte[] {0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30},
-                    0 /* defaultActiveNetworkBoost */);
-
-    private final NetworkScoreManager mScoreManager;
-    private final ScoreStorage mStorage;
-
-    private final Object mStatsLock = new Object();
-    @GuardedBy("mStatsLock")
-    private int mRecommendationCounter = 0;
-    @GuardedBy("mStatsLock")
-    private WifiConfiguration mLastRecommended = null;
-    @GuardedBy("mStatsLock")
-    private int mScoreCounter = 0;
-
-
-    public DefaultNetworkRecommendationProvider(Context context, Executor executor,
-            NetworkScoreManager scoreManager, ScoreStorage storage) {
-        super(context, executor);
-        mScoreManager = scoreManager;
-        mStorage = storage;
-    }
-
-    /**
-     * Recommend the wireless network with the highest RSSI and run
-     * {@link ResultCallback#onResult(RecommendationResult)}.
-     */
-    @Override
-    public void onRequestRecommendation(RecommendationRequest request,
-            ResultCallback callback) {
-        callback.onResult(requestRecommendation(request));
-    }
-
-    @Override
-    /** Recommend the wireless network with the highest RSSI. */
-    public RecommendationResult requestRecommendation(RecommendationRequest request) {
-        ScanResult recommendedScanResult = null;
-        int recommendedScore = Integer.MIN_VALUE;
-
-        ScanResult[] results = request.getScanResults();
-        if (results != null) {
-            for (int i = 0; i < results.length; i++) {
-                final ScanResult scanResult = results[i];
-                Blog.v(TAG, "Scan: " + scanResult + " " + i);
-
-                // We only want to recommend open networks. This check is taken from
-                // places like WifiNotificationController and will be extracted to ScanResult in
-                // a future CL.
-                if (!"[ESS]".equals(scanResult.capabilities)) {
-                    Blog.v(TAG, "Discarding closed network: " + scanResult);
-                    continue;
-                }
-
-                final NetworkKey networkKey = new NetworkKey(
-                        new WifiKey(SsidUtil.quoteSsid(scanResult.SSID),
-                                scanResult.BSSID));
-                Blog.v(TAG, "Evaluating network: " + networkKey);
-
-                // We will only score networks we know about.
-                final ScoredNetwork network = mStorage.get(networkKey);
-                if (network == null) {
-                    Blog.v(TAG, "Discarding unscored network: " + scanResult);
-                    continue;
-                }
-
-                final int score = network.rssiCurve.lookupScore(scanResult.level);
-                Blog.v(TAG, "Scored " + scanResult + ": " + score);
-                if (score > recommendedScore) {
-                    recommendedScanResult = scanResult;
-                    recommendedScore = score;
-                    Blog.v(TAG, "New recommended network: " + scanResult);
-                    continue;
-                }
-            }
-        } else {
-            Blog.w(TAG, "Received null scan results in request.");
-        }
-
-        // If we ended up without a recommendation, recommend the provided configuration
-        // instead. If we wanted the platform to avoid this network, too, we could send back an
-        // empty recommendation.
-        RecommendationResult recommendationResult;
-        if (recommendedScanResult == null) {
-            if (request.getDefaultWifiConfig() != null) {
-                recommendationResult = RecommendationResult
-                        .createConnectRecommendation(request.getDefaultWifiConfig());
-            } else {
-                recommendationResult = RecommendationResult.createDoNotConnectRecommendation();
-            }
-        } else {
-            // Build a configuration based on the scan.
-            WifiConfiguration recommendedConfig = new WifiConfiguration();
-            recommendedConfig.SSID = SsidUtil.quoteSsid(recommendedScanResult.SSID);
-            recommendedConfig.BSSID = recommendedScanResult.BSSID;
-            recommendedConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-            recommendationResult = RecommendationResult
-                    .createConnectRecommendation(recommendedConfig);
-        }
-        synchronized (mStatsLock) {
-            mLastRecommended = recommendationResult.getWifiConfiguration();
-            mRecommendationCounter++;
-            Blog.d(TAG, "Recommending network: " + configToString(mLastRecommended));
-        }
-        return recommendationResult;
-    }
-
-    /** Score networks based on a few properties ... */
-    @Override
-    public void onRequestScores(NetworkKey[] networks) {
-        synchronized (mStatsLock) {
-            mScoreCounter++;
-        }
-        List<ScoredNetwork> scoredNetworks = new ArrayList<>();
-        for (int i = 0; i < networks.length; i++) {
-            NetworkKey key = networks[i];
-
-            // Score a network if we know about it.
-            ScoredNetwork scoredNetwork = mStorage.get(key);
-            if (scoredNetwork != null) {
-                scoredNetworks.add(scoredNetwork);
-                continue;
-            }
-
-            // We only want to score wifi networks at the moment.
-            if (key.type != NetworkKey.TYPE_WIFI) {
-                scoredNetworks.add(new ScoredNetwork(key, null, false /* meteredHint */));
-                continue;
-            }
-
-            // We don't know about this network, even though its a wifi network. Inject
-            // an empty score to satisfy the cache.
-            scoredNetworks.add(new ScoredNetwork(key, null, false /* meteredHint */));
-            continue;
-        }
-        if (scoredNetworks.isEmpty()) {
-            return;
-        }
-
-        Blog.d(TAG, "Scored networks: " + scoredNetworks);
-        safelyUpdateScores(scoredNetworks.toArray(new ScoredNetwork[scoredNetworks.size()]));
-    }
-
-    void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-        for (int i = 0; i < args.length; i++) {
-            if ("clear".equals(args[i])) {
-                i++;
-                clearScoresForTest();
-                writer.println("Clearing store");
-                return;
-            } else if ("addScore".equals(args[i])) {
-                i++;
-                ScoredNetwork scoredNetwork = parseScore(args[i]);
-                addScoreForTest(scoredNetwork);
-                writer.println("Added: " + scoredNetwork);
-                return;
-            } else {
-                writer.println("Unrecognized command: " + args[i]);
-            }
-        }
-        mStorage.dump(fd, writer, args);
-        synchronized (mStatsLock) {
-            writer.println("Recommendation requests: " + mRecommendationCounter);
-            writer.println("Last Recommended: " + configToString(mLastRecommended));
-            writer.println("Score requests: " + mScoreCounter);
-        }
-    }
-
-    @VisibleForTesting
-    void addScoreForTest(ScoredNetwork scoredNetwork) {
-        mStorage.addScore(scoredNetwork);
-        if (!WILDCARD_MAC.equals(scoredNetwork.networkKey.wifiKey.bssid)) {
-            safelyUpdateScores(new ScoredNetwork[]{scoredNetwork});
-        }
-    }
-
-    @VisibleForTesting
-    void clearScoresForTest() {
-        mStorage.clear();
-        safelyClearScores();
-    }
-
-    private void safelyUpdateScores(ScoredNetwork[] networkScores) {
-        // Depending on races, etc, we might be alive when not the active scorer. Safely catch
-        // and ignore security exceptions
-        try {
-            mScoreManager.updateScores(networkScores);
-        } catch (SecurityException e) {
-            Blog.w(TAG, "Tried to update scores when not the active scorer.");
-        }
-    }
-
-    private void safelyClearScores() {
-        // Depending on races, etc, we might be alive when not the active scorer. Safely catch
-        // and ignore security exceptions
-        try {
-            mScoreManager.clearScores();
-        } catch (SecurityException e) {
-            Blog.w(TAG, "Tried to update scores when not the active scorer.");
-        }
-    }
-
-    private static ScoredNetwork parseScore(String score) {
-        String[] splitScore = score.split("\\|");
-        String[] splitWifiKey = splitScore[0].split(",");
-        NetworkKey networkKey = new NetworkKey(new WifiKey(splitWifiKey[0], splitWifiKey[1]));
-
-        String[] splitRssiCurve = splitScore[1].split(",");
-        int bucketWidth = Integer.parseInt(splitRssiCurve[0]);
-        byte[] rssiBuckets = new byte[splitRssiCurve.length - 1];
-        for (int i = 1; i < splitRssiCurve.length; i++) {
-            rssiBuckets[i - 1] = Integer.valueOf(splitRssiCurve[i]).byteValue();
-        }
-
-        boolean meteredHint = "1".equals(splitScore[2]);
-        Bundle attributes = new Bundle();
-        if (!TextUtils.isEmpty(splitScore[3])) {
-            attributes.putBoolean(
-                    ScoredNetwork.ATTRIBUTES_KEY_HAS_CAPTIVE_PORTAL, "1".equals(splitScore[3]));
-        }
-        if (splitScore.length > 4) {
-            String badge = splitScore[4].toUpperCase();
-            if ("SD".equals(badge)) {
-                attributes.putParcelable(
-                        ScoredNetwork.ATTRIBUTES_KEY_BADGING_CURVE, BADGE_CURVE_SD);
-            } else if ("HD".equals(badge)) {
-                attributes.putParcelable(
-                        ScoredNetwork.ATTRIBUTES_KEY_BADGING_CURVE, BADGE_CURVE_HD);
-            } else if ("4K".equals(badge)) {
-                attributes.putParcelable(
-                        ScoredNetwork.ATTRIBUTES_KEY_BADGING_CURVE, BADGE_CURVE_4K);
-            }
-        }
-        RssiCurve rssiCurve = new RssiCurve(CONSTANT_CURVE_START, bucketWidth, rssiBuckets, 0);
-        return new ScoredNetwork(networkKey, rssiCurve, meteredHint, attributes);
-    }
-
-    /** Print a shorter config string, for dumpsys. */
-    private static String configToString(WifiConfiguration config) {
-        if (config == null) {
-            return null;
-        }
-        StringBuilder sb = new StringBuilder()
-                .append("ID=").append(config.networkId)
-                .append(",SSID=").append(config.SSID)
-                .append(",useExternalScores=").append(config.useExternalScores)
-                .append(",meteredHint=").append(config.meteredHint);
-        return sb.toString();
-    }
-
-    /** Stores scores about networks. Initial implementation is in-memory-only. */
-    @VisibleForTesting
-    static class ScoreStorage {
-
-        @GuardedBy("mScores")
-        private final ArrayMap<NetworkKey, ScoredNetwork> mScores = new ArrayMap<>();
-
-        /**
-         * Store a score in storage.
-         *
-         * @param scoredNetwork the network to score.
-         *     If {@code scoredNetwork.networkKey.wifiKey.bssid} is "00:00:00:00:00:00", treat this
-         *     score as applying to any bssid with the provided ssid.
-         */
-        public void addScore(ScoredNetwork scoredNetwork) {
-            Blog.d(TAG, "addScore: " + scoredNetwork);
-            synchronized (mScores) {
-                mScores.put(scoredNetwork.networkKey, scoredNetwork);
-            }
-        }
-
-        public ScoredNetwork get(NetworkKey key) {
-            synchronized (mScores) {
-                // Try to find a score for the requested bssid.
-                ScoredNetwork scoredNetwork = mScores.get(key);
-                if (scoredNetwork != null) {
-                    return scoredNetwork;
-                }
-                // Try to find a score for a wildcard ssid.
-                NetworkKey wildcardKey = new NetworkKey(
-                        new WifiKey(key.wifiKey.ssid, WILDCARD_MAC));
-                scoredNetwork = mScores.get(wildcardKey);
-                if (scoredNetwork != null) {
-                    // If the fetched score was a wildcard score, construct a synthetic score
-                    // for the requested bssid and return it.
-                    return new ScoredNetwork(
-                            key, scoredNetwork.rssiCurve, scoredNetwork.meteredHint,
-                            scoredNetwork.attributes);
-                }
-                return null;
-            }
-        }
-
-        public void clear() {
-            synchronized (mScores) {
-                mScores.clear();
-            }
-        }
-
-        public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-            synchronized (mScores) {
-                for (ScoredNetwork score : mScores.values()) {
-                    writer.println(score);
-                }
-            }
-        }
-    }
-
-    @Override
-    public ScoredNetwork getCachedScoredNetwork(NetworkKey networkKey) {
-        return mStorage.get(networkKey);
-    }
-}
diff --git a/src/com/android/networkrecommendation/Example.java b/src/com/android/networkrecommendation/Example.java
deleted file mode 100644
index a85a112..0000000
--- a/src/com/android/networkrecommendation/Example.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.android.networkrecommendation;
-
-import android.net.RecommendationRequest;
-
-import java.lang.reflect.Method;
-
-public class Example {
-
-    public Example() {}
-
-    public void buildRecommendationRequest() {
-        new RecommendationRequest.Builder().build();
-    }
-
-    @SuppressWarnings("unchecked")
-    public RecommendationRequest reflectRecommendationRequest() {
-        try {
-            Class builder = RecommendationRequest.class.getClasses()[0];
-            Object builderObj = builder.getConstructor().newInstance();
-            Method build = builder.getDeclaredMethod("build");
-            return (RecommendationRequest) build.invoke(builderObj);
-        } catch (Exception e) {
-            throw new RuntimeException("Noooo", e);
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/NetworkRecommendationApp.java b/src/com/android/networkrecommendation/NetworkRecommendationApp.java
deleted file mode 100644
index c63c875..0000000
--- a/src/com/android/networkrecommendation/NetworkRecommendationApp.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.android.networkrecommendation;
-
-import android.app.Application;
-
-import com.android.networkrecommendation.config.PreferenceFile;
-
-/**
- * Initialize app-wide state.
- */
-public class NetworkRecommendationApp extends Application {
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        PreferenceFile.init(this);
-    }
-}
diff --git a/src/com/android/networkrecommendation/NetworkRecommendationService.java b/src/com/android/networkrecommendation/NetworkRecommendationService.java
deleted file mode 100644
index d4923d0..0000000
--- a/src/com/android/networkrecommendation/NetworkRecommendationService.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.networkrecommendation;
-
-import android.app.NotificationManager;
-import android.app.Service;
-import android.content.ContentResolver;
-import android.content.Intent;
-import android.content.res.Resources;
-import android.net.NetworkScoreManager;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.PowerManager;
-import android.os.UserManager;
-
-import com.android.networkrecommendation.notify.WifiNotificationController;
-import com.android.networkrecommendation.notify.WifiNotificationHelper;
-import com.android.networkrecommendation.util.NotificationChannelUtil;
-import com.android.networkrecommendation.wakeup.WifiWakeupController;
-import com.android.networkrecommendation.wakeup.WifiWakeupHelper;
-import com.android.networkrecommendation.wakeup.WifiWakeupNetworkSelector;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
-/**
- * Provides network recommendations for the platform.
- */
-public class NetworkRecommendationService extends Service {
-
-    private HandlerThread mProviderHandlerThread;
-    private Handler mProviderHandler;
-    private HandlerThread mControllerHandlerThread;
-    private Handler mControllerHandler;
-    private DefaultNetworkRecommendationProvider mProvider;
-    private WifiNotificationController mWifiNotificationController;
-    private WifiWakeupController mWifiWakeupController;
-
-    @Override
-    public void onCreate() {
-        mProviderHandlerThread = new HandlerThread("RecommendationProvider");
-        mProviderHandlerThread.start();
-        mProviderHandler = new Handler(mProviderHandlerThread.getLooper());
-        NetworkScoreManager networkScoreManager = getSystemService(NetworkScoreManager.class);
-        mProvider = new DefaultNetworkRecommendationProvider(this, mProviderHandler::post,
-                networkScoreManager, new DefaultNetworkRecommendationProvider.ScoreStorage());
-
-        mControllerHandlerThread = new HandlerThread("RecommendationProvider");
-        mControllerHandlerThread.start();
-        mControllerHandler = new Handler(mControllerHandlerThread.getLooper());
-        NotificationManager notificationManager = getSystemService(NotificationManager.class);
-        NotificationChannelUtil.configureNotificationChannels(notificationManager, this);
-
-        WifiManager wifiManager = getSystemService(WifiManager.class);
-        PowerManager powerManager = getSystemService(PowerManager.class);
-        UserManager userManager = getSystemService(UserManager.class);
-        Resources resources = getResources();
-        ContentResolver contentResolver = getContentResolver();
-        mWifiNotificationController = new WifiNotificationController(
-                this, contentResolver, mControllerHandler, mProvider,
-                wifiManager, notificationManager, userManager, new WifiNotificationHelper(this));
-        WifiWakeupNetworkSelector wifiWakeupNetworkSelector =
-                new WifiWakeupNetworkSelector(resources, mProvider);
-        WifiWakeupHelper wifiWakeupHelper = new WifiWakeupHelper(this, resources, mControllerHandler,
-                notificationManager, wifiManager);
-        mWifiWakeupController =
-                new WifiWakeupController(this, getContentResolver(), mControllerHandler, wifiManager,
-                        powerManager, userManager, wifiWakeupNetworkSelector, wifiWakeupHelper);
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        mWifiWakeupController.start();
-        mWifiNotificationController.start();
-        return mProvider.getBinder();
-    }
-
-    @Override
-    public boolean onUnbind(Intent intent) {
-        mWifiWakeupController.stop();
-        mWifiNotificationController.stop();
-        return super.onUnbind(intent);
-    }
-
-    @Override
-    public void onDestroy() {
-        mProviderHandlerThread.quit();
-        super.onDestroy();
-    }
-
-    @Override
-    protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-        mProvider.dump(fd, writer, args);
-        mWifiNotificationController.dump(fd, writer, args);
-        mWifiWakeupController.dump(fd, writer, args);
-    }
-}
diff --git a/src/com/android/networkrecommendation/SynchronousNetworkRecommendationProvider.java b/src/com/android/networkrecommendation/SynchronousNetworkRecommendationProvider.java
deleted file mode 100644
index b2ff12c..0000000
--- a/src/com/android/networkrecommendation/SynchronousNetworkRecommendationProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.networkrecommendation;
-
-import android.net.NetworkKey;
-import android.net.RecommendationRequest;
-import android.net.RecommendationResult;
-import android.net.ScoredNetwork;
-
-/**
- * Provider to return {@link ScoredNetwork} from cached scores in NetworkRecommendationProvider.
- */
-public interface SynchronousNetworkRecommendationProvider {
-
-    /** Returns a {@link ScoredNetwork} if present in the cache. Otherwise, return null. */
-    ScoredNetwork getCachedScoredNetwork(NetworkKey networkKey);
-
-    /** Returns a {@link RecommendationResult} using the internal NetworkRecommendationProvider. */
-    RecommendationResult requestRecommendation(RecommendationRequest request);
-}
diff --git a/src/com/android/networkrecommendation/config/Csv.java b/src/com/android/networkrecommendation/config/Csv.java
deleted file mode 100644
index 35b6182..0000000
--- a/src/com/android/networkrecommendation/config/Csv.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.networkrecommendation.config;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * Utilities for parsing and serializing Comma-Separated Value data.
- * See http://en.wikipedia.org/wiki/Comma-separated_values and
- * http://tools.ietf.org/html/rfc4180 for details of the format.
- */
-public class Csv {
-    /** Field delimiter.  The C in CSV. */
-    public static final String COMMA = ",";
-
-    /** Record delimiter.  "Proper" CSV uses CR-LF, but that would be annoying. */
-    public static final String NEWLINE = "\n";
-
-    /**
-     * Appends a single value to an output string.  If the value
-     * contains quotes, commas, newlines, or leading or trailing whitespace,
-     * the value will be written in quotes (with internal quotes doubled).
-     * Newlines are converted to standard CR-LF form.  This function does not
-     * write field delimiters -- append {@link COMMA} yourself between values.
-     *
-     * @param value to write, quoted as necessary; must be non-null.
-     * @param output to append (possibly quoted) value to
-     * @throws java.io.IOException if writing to 'output' fails
-     */
-    public static void writeValue(String value, Appendable output) throws IOException {
-        int len = value.length();
-        if (len == 0) return;
-
-        char first = value.charAt(0);
-        char last = value.charAt(len - 1);
-        if (first != ' ' && first != '\t' && last != ' ' && last != '\t' &&
-                value.indexOf('"') < 0 && value.indexOf(',') < 0 &&
-                value.indexOf('\r') < 0 && value.indexOf('\n') < 0) {
-            // No quoting needed.
-            output.append(value);
-            return;
-        }
-
-        output.append('"').append(value.replace("\"", "\"\"")).append('"');
-    }
-
-    /**
-     * Parse a record of comma separated values from an input file.
-     * May read multiple physical lines if values contain embedded newlines.
-     *
-     * @param reader to read one or more physical lines from
-     * @param out array to append unquoted CSV values to
-     * @return true if values were read, false on EOF
-     * @throws java.io.IOException if reading from 'reader' fails
-     */
-    public static boolean parseLine(BufferedReader reader, List<String> out) throws IOException {
-        String text = reader.readLine();
-        if (text == null) return false;
-
-        int pos = 0;
-        do {
-            StringBuilder buf = new StringBuilder();
-            int comma;
-            for (;;) {
-                comma = text.indexOf(',', pos);
-                int quote = text.indexOf('"', pos);
-                if (quote == -1 || (comma != -1 && comma < quote)) break;
-
-                if (pos > 0 && text.charAt(pos - 1) == '"') buf.append('"');
-                buf.append(text, pos, quote);
-                while ((quote = text.indexOf('"', (pos = quote + 1))) == -1) {
-                    buf.append(text, pos, text.length()).append('\n');
-                    text = reader.readLine();
-                    if (text == null) {
-                        out.add(buf.toString());
-                        return true;
-                    }
-                    quote = -1;
-                }
-
-                buf.append(text, pos, quote);
-                pos = quote + 1;
-            }
-
-            buf.append(text, pos, comma == -1 ? text.length() : comma);
-            out.add(buf.toString());
-            pos = comma + 1;
-        } while (pos > 0);
-        return true;
-    }
-
-    private Csv() {}  // Do not instantiate
-}
diff --git a/src/com/android/networkrecommendation/config/Flag.java b/src/com/android/networkrecommendation/config/Flag.java
deleted file mode 100644
index 953fb1e..0000000
--- a/src/com/android/networkrecommendation/config/Flag.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.config;
-
-/**
- * Simple configuration parameters for application behavior.
- * @param <T> A type for a flag value.
- */
-public class Flag<T> {
-
-    private final T mDefaultValue;
-    private T mOverride;
-
-    public Flag(T defaultValue) {
-        mDefaultValue = defaultValue;
-        mOverride = null;
-    }
-
-    /** Get the currently set flag value. */
-    public T get() {
-        return mOverride != null ? mOverride : mDefaultValue;
-    }
-
-    /** Force a value for testing. */
-    public void override(T value) {
-        mOverride = value;
-    }
-
-    /** Ensure flag state is initialized for tests. */
-    public static void initForTest() {
-    }
-}
diff --git a/src/com/android/networkrecommendation/config/G.java b/src/com/android/networkrecommendation/config/G.java
deleted file mode 100644
index b256f25..0000000
--- a/src/com/android/networkrecommendation/config/G.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.config;
-
-/** Application behavior parameters. */
-public final class G {
-
-    /**
-     * Configurations related to general behaviors of the netrec module, not tied to a specific
-     * feature.
-     */
-    public interface Netrec {
-        Flag<Boolean> enableSensitiveLogging = new Flag(false);
-        Flag<String> wideAreaNetworks = new Flag("xfinitywifi,XFINITY");
-    }
-
-    private G() {}
-}
diff --git a/src/com/android/networkrecommendation/config/PreferenceFile.java b/src/com/android/networkrecommendation/config/PreferenceFile.java
deleted file mode 100644
index 9066a6a..0000000
--- a/src/com/android/networkrecommendation/config/PreferenceFile.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.config;
-
-import android.annotation.SuppressLint;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
-import android.os.Build;
-
-import java.util.Collection;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Utility class for retrieving and storing key/value pairs in a SharedPreferences file.
- *
- * Typical usage:
- *
- * In your application's onCreate();
- * PreferenceFile.init(this);
- *
- * In common preferences declaration area:
- * private static final PreferenceFile sFile = new PreferenceFile("my_prefs");
- * public static final SharedPreference<String> pageUrl = sFile.value("page_url", "http://blah");
- *
- * At usage time:
- * String pageUrl = Preferences.pageUrl.get();
- * Preferences.pageUrl.put("http://www.newurl.com/");
- */
-public class PreferenceFile {
-    private static final String TAG = "PreferenceFile";
-
-    private static Context sContext;
-
-    public static void init(Context context) {
-        sContext = context;
-    }
-
-    private final String mName;
-    private final int mMode;
-
-    @SuppressWarnings("deprecation")
-    public PreferenceFile(String name) {
-        this(name, Context.MODE_PRIVATE);
-    }
-
-    /**
-     * @deprecated any mode other than MODE_PRIVATE is a bad idea. If you need multi-process
-     * support, see if {@link MultiProcessPreferenceFile} is suitable.
-     */
-    @Deprecated
-    public PreferenceFile(String name, int mode) {
-        mName = name;
-        mMode = mode;
-    }
-
-    /**
-     * Returns a text dump of all preferences in this file; for debugging.
-     */
-    public String dump() {
-        SharedPreferences sp = open();
-        Map<String, ?> allPrefs = sp.getAll();
-        String format = "%" + longestString(allPrefs.keySet()) + "s = %s\n";
-        StringBuilder s = new StringBuilder();
-        for (String key : allPrefs.keySet()) {
-            s.append(String.format(Locale.US, format, key, allPrefs.get(key)));
-        }
-        return s.toString();
-    }
-
-    /** Return a SharedPreferences for this file. */
-    public SharedPreferences open() {
-        return sContext.getSharedPreferences(mName, mMode);
-    }
-
-    public void remove(SharedPreference<?>... preferences) {
-        SharedPreferences.Editor editor = open().edit();
-        for (SharedPreference<?> preference : preferences) {
-            editor.remove(preference.getKey());
-        }
-        commit(editor);
-    }
-
-    /** Synchronously clear all SharedPreferences in this file. */
-    public void clear() {
-        open().edit().clear().commit();
-    }
-
-
-    /**
-     * If on API >= 9, use the asynchronous
-     * {@link Editor#apply()} method. Otherwise, use the
-     * synchronous {@link Editor#commit()} method. <br />
-     * <br />
-     * If commit() is used, the result will be returned. If apply() is used, it
-     * will always return true.
-     *
-     * @param editor The editor to save
-     * @return the result of commit() on API &lt; 9 and true on API >= 9.
-     */
-    @SuppressLint("NewApi")
-    public static boolean commit(Editor editor) {
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD) {
-            return editor.commit();
-        }
-        editor.apply();
-        return true;
-    }
-
-    /** Define a new Long value shared pref key. */
-    public SharedPreference<Long> longValue(final String key, final Long defaultValue) {
-        return new SharedPreference<Long>(this, key) {
-            @Override
-            protected Long read(SharedPreferences sp) {
-                if (sp.contains(key)) {
-                    return sp.getLong(key, 0L);
-                }
-                return defaultValue;
-            }
-
-            @Override
-            protected void write(Editor editor, Long value) {
-                if (value == null) {
-                    throw new IllegalArgumentException("null cannot be written for Long");
-                }
-                editor.putLong(key, value);
-            }
-        };
-    }
-
-    /** Define a new String value shared pref key. */
-    public SharedPreference<String> stringValue(final String key, final String defaultValue) {
-        return new SharedPreference<String>(this, key) {
-            @Override
-            protected String read(SharedPreferences sp) {
-                if (sp.contains(key)) {
-                    return sp.getString(key, null);
-                }
-                return defaultValue;
-            }
-
-            @Override
-            protected void write(Editor editor, String value) {
-                if (value == null) {
-                    throw new IllegalArgumentException("null cannot be written for String");
-                }
-                editor.putString(key, value);
-            }
-        };
-    }
-
-    /** Define a new Boolean value shared pref key. */
-    public SharedPreference<Boolean> booleanValue(final String key, final Boolean defaultValue) {
-        return new SharedPreference<Boolean>(this, key) {
-            @Override
-            protected Boolean read(SharedPreferences sp) {
-                if (sp.contains(key)) {
-                    return sp.getBoolean(key, false);
-                }
-                return defaultValue;
-            }
-
-            @Override
-            protected void write(Editor editor, Boolean value) {
-                if (value == null) {
-                    throw new IllegalArgumentException("null cannot be written for Boolean");
-                }
-                editor.putBoolean(key, value);
-            }
-        };
-    }
-
-    /** Define a new Integer value shared pref key. */
-    public SharedPreference<Integer> intValue(final String key, final Integer defaultValue) {
-        return new SharedPreference<Integer>(this, key) {
-            @Override
-            protected Integer read(SharedPreferences sp) {
-                if (sp.contains(key)) {
-                    return sp.getInt(key, 0);
-                }
-                return defaultValue;
-            }
-
-            @Override
-            protected void write(Editor editor, Integer value) {
-                if (value == null) {
-                    throw new IllegalArgumentException("null cannot be written for Integer");
-                }
-                editor.putInt(key, value);
-            }
-        };
-    }
-
-    /** Define a new Set<String> value shared pref key. */
-    public SharedPreference<Set<String>> stringSetValue(final String key,
-            final Set<String> defaultValue) {
-        return new SharedPreference<Set<String>>(this, key) {
-            @Override
-            protected Set<String> read(SharedPreferences sp) {
-                if (sp.contains(key)) {
-                    return sp.getStringSet(key, null);
-                }
-                return defaultValue;
-            }
-
-            @Override
-            protected void write(Editor editor, Set<String> value) {
-                if (value == null) {
-                    throw new IllegalArgumentException("null cannot be written for Set<String>");
-                }
-                editor.putStringSet(key, value);
-            }
-        };
-    }
-
-    /**
-     * A class representing a key/value pair in a given {@link PreferenceFile}.
-     */
-    public static abstract class SharedPreference<T> {
-        PreferenceFile mFile;
-        final String mKey;
-
-        protected SharedPreference(PreferenceFile file, String key) {
-            mFile = file;
-            mKey = key;
-        }
-
-        /** Read the value stored for this pref, or the default value if none is stored. */
-        public final T get() {
-            return read(mFile.open());
-        }
-
-        /** Get the representation in string of the value for this pref. */
-        public String getValueString() {
-            T value = get();
-            if (value == null) {
-                return null;
-            }
-            return value.toString();
-        }
-
-        /** Return this pref's key. */
-        public final String getKey() {
-            return mKey;
-        }
-
-        /** Return true if this key is defined in its file. */
-        public final boolean exists() {
-            return mFile.open().contains(mKey);
-        }
-
-        /** Write a new value for this pref to its file. */
-        public final void put(T value) {
-            SharedPreferences sp = mFile.open();
-            Editor editor = sp.edit();
-            write(editor, value);
-            commit(editor);
-        }
-
-        /** Removes this pref from its file. */
-        public final void remove() {
-            commit(mFile.open().edit().remove(mKey));
-        }
-
-        /** Override the PreferenceFile used by this preference (for testing). */
-        public final void override(PreferenceFile file) {
-            mFile = file;
-        }
-
-        protected abstract T read(SharedPreferences sp);
-        protected abstract void write(Editor editor, T value);
-    }
-
-    /**
-     * Returns the length of the longest string in the provided Collection.
-     */
-    private static int longestString(Collection<String> strings) {
-        int longest = 0;
-        for (String s : strings) {
-            longest = Math.max(longest, s.length());
-        }
-        return longest;
-    }
-}
diff --git a/src/com/android/networkrecommendation/config/Preferences.java b/src/com/android/networkrecommendation/config/Preferences.java
deleted file mode 100644
index a9e6fb0..0000000
--- a/src/com/android/networkrecommendation/config/Preferences.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.config;
-
-import com.android.networkrecommendation.config.PreferenceFile.SharedPreference;
-import java.util.Collections;
-import java.util.Set;
-
-/** The NetRec preferences file. */
-public final class Preferences {
-    private Preferences() {}
-
-    private static final PreferenceFile sPrefs =
-            new PreferenceFile("com.android.networkrecommendation");
-
-    /**
-     * {@link ScoreNetworksChimeraBroadcastReceiver} sets this to true when the scorer is enabled.
-     * {@link com.android.networkrecommendation.scoring.service.FutureRefreshRequestor} checks for
-     * this value and triggers a quick score refresh if this is set.
-     */
-    public static final SharedPreference<Boolean> justEnabled =
-            sPrefs.booleanValue("justEnabled", false);
-
-    /**
-     * The next time, in ms since system boot, that a rapid (i.e. outside the usual refresh window)
-     * will be allowed to make a network request.
-     */
-    public static final SharedPreference<Long> nextRapidRefreshAllowed =
-            sPrefs.longValue("nextRapidRefreshAllowedMillis", 0L);
-
-    /**
-     * The set of saved ssid hashes in previous scan result list when the user disabled Wi-Fi. Saved
-     * to preferences when {@link com.android.networkrecommendation.wakeup.WifiWakeupController}
-     * stops.
-     */
-    public static final SharedPreference<Set<String>> savedSsidsOnDisable =
-            sPrefs.stringSetValue("savedSsidsOnDisable", Collections.emptySet());
-
-    /**
-     * The set of saved ssid hashes that were previously shown as Wi-Fi Enabled notifications
-     * through {@link com.android.networkrecommendation.wakeup.WifiWakeupController}.
-     */
-    public static final SharedPreference<Set<String>> ssidsForWakeupShown =
-            sPrefs.stringSetValue("ssidsForWakeupShown", Collections.emptySet());
-
-    /** Key for {@link com.android.networkrecommendation.storage.Encrypter} on pre-MNC devices. */
-    public static final SharedPreference<String> encrypterKey =
-            sPrefs.stringValue("encrypterKey", null);
-
-    /**
-     * How long we should wait before requesting another network. Used by {@link
-     * PersistentNetworkRequest} to support GCS/WFA.
-     */
-    public static final SharedPreference<Integer> nextNetworkRequestDelayMs =
-            sPrefs.intValue("nextNetworkRequestDelayMs", 0);
-
-    /**
-     * Hash of the SSID that last satisfied the network request in {@link PersistentNetworkRequest}.
-     */
-    public static final SharedPreference<String> lastSsidHash =
-            sPrefs.stringValue("lastSsidHash", "");
-}
diff --git a/src/com/android/networkrecommendation/config/WideAreaNetworks.java b/src/com/android/networkrecommendation/config/WideAreaNetworks.java
deleted file mode 100644
index 1a33559..0000000
--- a/src/com/android/networkrecommendation/config/WideAreaNetworks.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.config;
-
-import static com.android.networkrecommendation.Constants.TAG;
-
-import android.support.annotation.VisibleForTesting;
-import com.android.networkrecommendation.config.G.Netrec;
-import com.android.networkrecommendation.util.Blog;
-import com.google.common.collect.ImmutableSet;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-/** Provides a list of known wide area networks. */
-public class WideAreaNetworks {
-    private WideAreaNetworks() {}
-
-    private static ImmutableSet<String> sWideAreaNetworks;
-
-    /** Initialize the list of wide area networks from the phenotype flag. */
-    public static void init() {
-        sWideAreaNetworks = parseFlag();
-    }
-
-    /**
-     * @param ssid canonical SSID for a network (with quotes removed)
-     * @return {@code true} if {@code ssid} is in the set of wide area networks.
-     */
-    public static boolean contains(String ssid) {
-        if (sWideAreaNetworks == null) {
-            init();
-        }
-        return sWideAreaNetworks.contains(ssid);
-    }
-
-    @VisibleForTesting
-    static ImmutableSet<String> parseFlag() {
-        List<String> parts = new ArrayList<>();
-        BufferedReader reader = new BufferedReader(new StringReader(Netrec.wideAreaNetworks.get()));
-        try {
-            Csv.parseLine(reader, parts);
-        } catch (IOException ex) {
-            Blog.e(TAG, ex, "Error parsing flag");
-        }
-        return ImmutableSet.copyOf(parts);
-    }
-}
diff --git a/src/com/android/networkrecommendation/notify/WifiNotificationController.java b/src/com/android/networkrecommendation/notify/WifiNotificationController.java
deleted file mode 100644
index c134b47..0000000
--- a/src/com/android/networkrecommendation/notify/WifiNotificationController.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.notify;
-
-import static com.android.networkrecommendation.Constants.TAG;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.ContentObserver;
-import android.net.NetworkInfo;
-import android.net.NetworkScoreManager;
-import android.net.RecommendationRequest;
-import android.net.RecommendationResult;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.UserManager;
-import android.provider.Settings;
-import android.support.annotation.IntDef;
-import android.support.annotation.Nullable;
-import com.android.networkrecommendation.R;
-import com.android.networkrecommendation.SynchronousNetworkRecommendationProvider;
-import com.android.networkrecommendation.util.Blog;
-import com.android.networkrecommendation.util.RoboCompatUtil;
-import com.android.networkrecommendation.util.ScanResultUtil;
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/** Takes care of handling the "open wi-fi network available" notification */
-public class WifiNotificationController {
-    /** The unique ID of the Notification given to the NotificationManager. */
-    private static final int NOTIFICATION_ID = R.string.wifi_available_title;
-
-    /** When a notification is shown, we wait this amount before possibly showing it again. */
-    private final long mNotificationRepeatDelayMs;
-
-    /** Whether the user has set the setting to show the 'available networks' notification. */
-    private boolean mNotificationEnabled;
-
-    /** Whether the user has {@link UserManager#DISALLOW_CONFIG_WIFI} restriction. */
-    private boolean mWifiConfigRestricted;
-
-    /** Observes the user setting to keep {@link #mNotificationEnabled} in sync. */
-    private final NotificationEnabledSettingObserver mNotificationEnabledSettingObserver;
-
-    /**
-     * The {@link System#currentTimeMillis()} must be at least this value for us to show the
-     * notification again.
-     */
-    private long mNotificationRepeatTime;
-
-    /** These are all of the possible states for the open networks available notification. */
-    @IntDef({
-        State.NO_RECOMMENDATION,
-        State.SHOWING_RECOMMENDATION_NOTIFICATION,
-        State.CONNECTING_IN_NOTIFICATION,
-        State.CONNECTING_IN_WIFI_PICKER,
-        State.CONNECTED,
-        State.CONNECT_FAILED
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface State {
-        int NO_RECOMMENDATION = 0;
-        int SHOWING_RECOMMENDATION_NOTIFICATION = 1;
-        int CONNECTING_IN_NOTIFICATION = 2;
-        int CONNECTING_IN_WIFI_PICKER = 3;
-        int CONNECTED = 4;
-        int CONNECT_FAILED = 5;
-    }
-
-    /**
-     * The {@link System#currentTimeMillis()} must be at least this value to log that open networks
-     * are available.
-     */
-    private long mOpenNetworksLoggingRepeatTime;
-
-    /** Current state of the notification. */
-    @State private int mState = State.NO_RECOMMENDATION;
-
-    /**
-     * The number of continuous scans that must occur before consider the supplicant in a scanning
-     * state. This allows supplicant to associate with remembered networks that are in the scan
-     * results.
-     */
-    private static final int NUM_SCANS_BEFORE_ACTUALLY_SCANNING = 3;
-
-    /**
-     * The number of scans since the last network state change. When this exceeds {@link
-     * #NUM_SCANS_BEFORE_ACTUALLY_SCANNING}, we consider the supplicant to actually be scanning.
-     * When the network state changes to something other than scanning, we reset this to 0.
-     */
-    private int mNumScansSinceNetworkStateChange;
-
-    /** Time in milliseconds to display the Connecting notification. */
-    private static final int TIME_TO_SHOW_CONNECTING_MILLIS = 10000;
-
-    /** Time in milliseconds to display the Connected notification. */
-    private static final int TIME_TO_SHOW_CONNECTED_MILLIS = 5000;
-
-    /** Time in milliseconds to display the Failed To Connect notification. */
-    private static final int TIME_TO_SHOW_FAILED_MILLIS = 5000;
-
-    /** Try to connect to the recommended WifiConfiguration and also open the wifi picker. */
-    static final String ACTION_CONNECT_TO_RECOMMENDED_NETWORK_AND_OPEN_SETTINGS =
-            "com.android.networkrecommendation.notify.CONNECT_TO_RECOMMENDED_NETWORK_AND_OPEN_SETTINGS";
-
-    /** Try to connect to the recommended WifiConfiguration. */
-    static final String ACTION_CONNECT_TO_RECOMMENDED_NETWORK =
-            "com.android.networkrecommendation.notify.CONNECT_TO_RECOMMENDED_NETWORK";
-
-    /** Open wifi picker to see all available networks. */
-    static final String ACTION_PICK_WIFI_NETWORK =
-            "com.android.networkrecommendation.notify.ACTION_PICK_WIFI_NETWORK";
-
-    /** Open wifi picker to see all networks after connect to the recommended network failed. */
-    static final String ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE =
-            "com.android.networkrecommendation.notify.ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE";
-
-    /** Handles behavior when notification is deleted. */
-    static final String ACTION_NOTIFICATION_DELETED =
-            "com.android.networkrecommendation.notify.NOTIFICATION_DELETED";
-
-    /** Network recommended by {@link NetworkScoreManager#requestRecommendation}. */
-    private WifiConfiguration mRecommendedNetwork;
-
-    /** Whether {@link WifiNotificationController} has been started. */
-    private final AtomicBoolean mStarted;
-
-    private static final String NOTIFICATION_TAG = "WifiNotification";
-
-    private final Context mContext;
-    private final Handler mHandler;
-    private final ContentResolver mContentResolver;
-    private final SynchronousNetworkRecommendationProvider mNetworkRecommendationProvider;
-    private final WifiManager mWifiManager;
-    private final NotificationManager mNotificationManager;
-    private final UserManager mUserManager;
-    private final WifiNotificationHelper mWifiNotificationHelper;
-    private NetworkInfo mNetworkInfo;
-    private NetworkInfo.DetailedState mDetailedState;
-    private volatile int mWifiState;
-
-    public WifiNotificationController(
-            Context context,
-            ContentResolver contentResolver,
-            Handler handler,
-            SynchronousNetworkRecommendationProvider networkRecommendationProvider,
-            WifiManager wifiManager,
-            NotificationManager notificationManager,
-            UserManager userManager,
-            WifiNotificationHelper helper) {
-        mContext = context;
-        mContentResolver = contentResolver;
-        mNetworkRecommendationProvider = networkRecommendationProvider;
-        mWifiManager = wifiManager;
-        mNotificationManager = notificationManager;
-        mUserManager = userManager;
-        mHandler = handler;
-        mWifiNotificationHelper = helper;
-        mStarted = new AtomicBoolean(false);
-
-        // Setting is in seconds
-        mNotificationRepeatDelayMs =
-                TimeUnit.SECONDS.toMillis(
-                        Settings.Global.getInt(
-                                contentResolver,
-                                Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
-                                900));
-        mNotificationEnabledSettingObserver = new NotificationEnabledSettingObserver(mHandler);
-    }
-
-    /** Starts {@link WifiNotificationController}. */
-    public void start() {
-        if (!mStarted.compareAndSet(false, true)) {
-            return;
-        }
-
-        mWifiState = mWifiManager.getWifiState();
-        mDetailedState = NetworkInfo.DetailedState.IDLE;
-
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
-        filter.addAction(RoboCompatUtil.ACTION_USER_RESTRICTIONS_CHANGED);
-        filter.addAction(ACTION_CONNECT_TO_RECOMMENDED_NETWORK_AND_OPEN_SETTINGS);
-        filter.addAction(ACTION_CONNECT_TO_RECOMMENDED_NETWORK);
-        filter.addAction(ACTION_NOTIFICATION_DELETED);
-        filter.addAction(ACTION_PICK_WIFI_NETWORK);
-        filter.addAction(ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE);
-
-        mContext.registerReceiver(
-                mBroadcastReceiver, filter, null /* broadcastPermission */, mHandler);
-        mNotificationEnabledSettingObserver.register();
-
-        handleUserRestrictionsChanged();
-    }
-
-    /** Stops {@link WifiNotificationController}. */
-    public void stop() {
-        if (!mStarted.compareAndSet(true, false)) {
-            return;
-        }
-        mContext.unregisterReceiver(mBroadcastReceiver);
-        mNotificationEnabledSettingObserver.unregister();
-    }
-
-    private final BroadcastReceiver mBroadcastReceiver =
-            new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    try {
-                        switch (intent.getAction()) {
-                            case WifiManager.WIFI_STATE_CHANGED_ACTION:
-                                mWifiState = mWifiManager.getWifiState();
-                                resetNotification();
-                                break;
-                            case WifiManager.NETWORK_STATE_CHANGED_ACTION:
-                                handleNetworkStateChange(intent);
-                                break;
-                            case WifiManager.SCAN_RESULTS_AVAILABLE_ACTION:
-                                checkAndSetNotification(mNetworkInfo);
-                                break;
-                            case RoboCompatUtil.ACTION_USER_RESTRICTIONS_CHANGED:
-                                handleUserRestrictionsChanged();
-                                break;
-                            case ACTION_CONNECT_TO_RECOMMENDED_NETWORK_AND_OPEN_SETTINGS:
-                                connectToRecommendedNetwork();
-                                openWifiPicker();
-                                updateOnConnecting(false /* showNotification*/);
-                                break;
-                            case ACTION_CONNECT_TO_RECOMMENDED_NETWORK:
-                                connectToRecommendedNetwork();
-                                updateOnConnecting(true /* showNotification*/);
-                                break;
-                            case ACTION_NOTIFICATION_DELETED:
-                                handleNotificationDeleted();
-                                break;
-                            case ACTION_PICK_WIFI_NETWORK:
-                                openWifiPicker();
-                                break;
-                            case ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE:
-                                openWifiPicker();
-                                break;
-                            default:
-                                Blog.e(
-                                        TAG,
-                                        "Unexpected broadcast. [action=%s]",
-                                        intent.getAction());
-                        }
-
-                    } catch (RuntimeException re) {
-                        // TODO(b/35044022) Remove try/catch after a couple of releases when we are confident
-                        // this is not going to throw.
-                        Blog.e(TAG, re, "RuntimeException in broadcast receiver.");
-                    }
-                }
-            };
-
-    private void handleNetworkStateChange(Intent intent) {
-        mNetworkInfo = intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO);
-        NetworkInfo.DetailedState detailedState = mNetworkInfo.getDetailedState();
-        if (detailedState != NetworkInfo.DetailedState.SCANNING
-                && detailedState != mDetailedState) {
-            mDetailedState = detailedState;
-            switch (mDetailedState) {
-                case CONNECTED:
-                    updateOnConnect();
-                    break;
-                case DISCONNECTED:
-                case CAPTIVE_PORTAL_CHECK:
-                    resetNotification();
-                    break;
-
-                    // TODO: figure out if these are failure cases when connecting
-                case IDLE:
-                case SCANNING:
-                case CONNECTING:
-                case DISCONNECTING:
-                case AUTHENTICATING:
-                case OBTAINING_IPADDR:
-                case SUSPENDED:
-                case FAILED:
-                case BLOCKED:
-                case VERIFYING_POOR_LINK:
-                    break;
-            }
-        }
-    }
-
-    private void handleUserRestrictionsChanged() {
-        mWifiConfigRestricted = mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI);
-        Blog.v(TAG, "handleUserRestrictionsChanged: %b", mWifiConfigRestricted);
-    }
-
-    private void checkAndSetNotification(NetworkInfo networkInfo) {
-        // TODO: unregister broadcast so we do not have to check here
-        // If we shouldn't place a notification on available networks, then
-        // don't bother doing any of the following
-        if (!mNotificationEnabled
-                || mWifiConfigRestricted
-                || mWifiState != WifiManager.WIFI_STATE_ENABLED
-                || mState > State.SHOWING_RECOMMENDATION_NOTIFICATION) {
-            return;
-        }
-
-        NetworkInfo.State state = NetworkInfo.State.DISCONNECTED;
-        if (networkInfo != null) {
-            state = networkInfo.getState();
-        }
-
-        if (state == NetworkInfo.State.DISCONNECTED || state == NetworkInfo.State.UNKNOWN) {
-            maybeLogOpenNetworksAvailable();
-            RecommendationResult result = getOpenNetworkRecommendation();
-            if (result != null && result.getWifiConfiguration() != null) {
-                mRecommendedNetwork = result.getWifiConfiguration();
-
-                if (++mNumScansSinceNetworkStateChange >= NUM_SCANS_BEFORE_ACTUALLY_SCANNING) {
-                    /*
-                     * We have scanned continuously at least
-                     * NUM_SCANS_BEFORE_NOTIFICATION times. The user
-                     * probably does not have a remembered network in range,
-                     * since otherwise supplicant would have tried to
-                     * associate and thus resetting this counter.
-                     */
-                    displayNotification();
-                }
-                return;
-            }
-        }
-
-        // No open networks in range, remove the notification
-        removeNotification();
-    }
-
-    private void maybeLogOpenNetworksAvailable() {
-        long now = System.currentTimeMillis();
-        if (now < mOpenNetworksLoggingRepeatTime) {
-            return;
-        }
-        mOpenNetworksLoggingRepeatTime = now + mNotificationRepeatDelayMs;
-    }
-
-    /**
-     * Uses {@link NetworkScoreManager} to choose a qualified network out of the list of {@link
-     * ScanResult}s.
-     *
-     * @return returns the best qualified open networks, if any.
-     */
-    @Nullable
-    private RecommendationResult getOpenNetworkRecommendation() {
-        List<ScanResult> scanResults = mWifiManager.getScanResults();
-        if (scanResults == null || scanResults.isEmpty()) {
-            return null;
-        }
-
-        ArrayList<ScanResult> openNetworks = new ArrayList<>();
-        List<WifiConfiguration> configuredNetworks = mWifiManager.getConfiguredNetworks();
-        for (ScanResult scanResult : scanResults) {
-            //A capability of [ESS] represents an open access point
-            //that is available for an STA to connect
-            //TODO: potentially handle this within NetworkRecommendationProvider instead.
-            if ("[ESS]".equals(scanResult.capabilities)) {
-                if (isSavedNetwork(scanResult, configuredNetworks)) {
-                    continue;
-                }
-                openNetworks.add(scanResult);
-            }
-        }
-
-        Blog.d(TAG, "Sending RecommendationRequest. [num_open_networks=%d]", openNetworks.size());
-        RecommendationRequest request =
-                new RecommendationRequest.Builder()
-                        .setScanResults(openNetworks.toArray(new ScanResult[openNetworks.size()]))
-                        .build();
-        return mNetworkRecommendationProvider.requestRecommendation(request);
-    }
-
-    /** Returns true if scanResult matches the list of saved networks */
-    private boolean isSavedNetwork(ScanResult scanResult, List<WifiConfiguration> savedNetworks) {
-        if (savedNetworks == null) {
-            return false;
-        }
-        for (int i = 0; i < savedNetworks.size(); i++) {
-            if (ScanResultUtil.doesScanResultMatchWithNetwork(scanResult, savedNetworks.get(i))) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /** Display's a notification that there are open Wi-Fi networks. */
-    private void displayNotification() {
-        // Since we use auto cancel on the notification, when the
-        // mNetworksAvailableNotificationShown is true, the notification may
-        // have actually been canceled.  However, when it is false we know
-        // for sure that it is not being shown (it will not be shown any other
-        // place than here)
-
-        // Not enough time has passed to show the notification again
-        if (mState == State.NO_RECOMMENDATION
-                && System.currentTimeMillis() < mNotificationRepeatTime) {
-            return;
-        }
-        Notification notification =
-                mWifiNotificationHelper.createMainNotification(mRecommendedNetwork);
-        mNotificationRepeatTime = System.currentTimeMillis() + mNotificationRepeatDelayMs;
-        postNotification(notification);
-        if (mState != State.SHOWING_RECOMMENDATION_NOTIFICATION) {
-            mState = State.SHOWING_RECOMMENDATION_NOTIFICATION;
-        }
-    }
-
-    /** Opens activity to allow the user to select a wifi network. */
-    private void openWifiPicker() {
-        // Close notification drawer before opening the picker.
-        mContext.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
-        mContext.startActivity(
-                new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK)
-                        .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
-        removeNotification();
-    }
-
-    /** Attempts to connect to recommended network the recommended network. */
-    private void connectToRecommendedNetwork() {
-        if (mRecommendedNetwork == null) {
-            return;
-        }
-        mRecommendedNetwork.BSSID = null;
-
-        // Attempts to connect to recommended network.
-        RoboCompatUtil.getInstance().connectToWifi(mWifiManager, mRecommendedNetwork);
-    }
-
-    private void updateOnConnecting(boolean showNotification) {
-        if (showNotification) {
-            // Update notification to connecting status.
-            Notification notification =
-                    mWifiNotificationHelper.createConnectingNotification(mRecommendedNetwork);
-            postNotification(notification);
-            mState = State.CONNECTING_IN_NOTIFICATION;
-        } else {
-            mState = State.CONNECTING_IN_WIFI_PICKER;
-        }
-        mHandler.postDelayed(
-                () -> {
-                    updateOnFailedToConnect();
-                },
-                TIME_TO_SHOW_CONNECTING_MILLIS);
-    }
-
-    /**
-     * When detailed state changes to CONNECTED, show connected notification or reset notification.
-     */
-    private void updateOnConnect() {
-        if (mState == State.CONNECTING_IN_NOTIFICATION) {
-            Notification notification =
-                    mWifiNotificationHelper.createConnectedNotification(mRecommendedNetwork);
-            postNotification(notification);
-            mState = State.CONNECTED;
-            mHandler.postDelayed(
-                    () -> {
-                        if (mState == State.CONNECTED) {
-                            removeNotification();
-                        }
-                    },
-                    TIME_TO_SHOW_CONNECTED_MILLIS);
-        } else if (mState == State.CONNECTING_IN_WIFI_PICKER) {
-            removeNotification();
-        }
-    }
-
-    /**
-     * Displays the Failed To Connect notification after the Connecting notification is shown for
-     * {@link #TIME_TO_SHOW_CONNECTING_MILLIS} duration.
-     */
-    private void updateOnFailedToConnect() {
-        if (mState == State.CONNECTING_IN_NOTIFICATION) {
-            Notification notification = mWifiNotificationHelper.createFailedToConnectNotification();
-            postNotification(notification);
-            mState = State.CONNECT_FAILED;
-            mHandler.postDelayed(
-                    () -> {
-                        if (mState == State.CONNECT_FAILED) {
-                            removeNotification();
-                        }
-                    },
-                    TIME_TO_SHOW_FAILED_MILLIS);
-        } else if (mState == State.CONNECTING_IN_WIFI_PICKER) {
-            removeNotification();
-        }
-    }
-
-    /** Handles behavior when notification is dismissed. */
-    private void handleNotificationDeleted() {
-        mState = State.NO_RECOMMENDATION;
-        mRecommendedNetwork = null;
-    }
-
-    private void postNotification(Notification notification) {
-        mNotificationManager.notify(NOTIFICATION_TAG, NOTIFICATION_ID, notification);
-    }
-
-    /**
-     * Clears variables related to tracking whether a notification has been shown recently and
-     * clears the current notification.
-     */
-    private void resetNotification() {
-        if (mState != State.NO_RECOMMENDATION) {
-            removeNotification();
-        }
-        mRecommendedNetwork = null;
-        mNotificationRepeatTime = 0;
-        mNumScansSinceNetworkStateChange = 0;
-        mOpenNetworksLoggingRepeatTime = 0;
-    }
-
-    private void removeNotification() {
-        mNotificationManager.cancel(NOTIFICATION_TAG, NOTIFICATION_ID);
-        mState = State.NO_RECOMMENDATION;
-        mRecommendedNetwork = null;
-    }
-
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("mNotificationEnabled " + mNotificationEnabled);
-        pw.println("mNotificationRepeatTime " + mNotificationRepeatTime);
-        pw.println("mState " + mState);
-        pw.println("mNumScansSinceNetworkStateChange " + mNumScansSinceNetworkStateChange);
-    }
-
-    private class NotificationEnabledSettingObserver extends ContentObserver {
-        NotificationEnabledSettingObserver(Handler handler) {
-            super(handler);
-        }
-
-        public void register() {
-            mContentResolver.registerContentObserver(
-                    Settings.Global.getUriFor(
-                            Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON),
-                    true,
-                    this);
-            mNotificationEnabled = getValue();
-        }
-
-        public void unregister() {
-            mContentResolver.unregisterContentObserver(this);
-        }
-
-        @Override
-        public void onChange(boolean selfChange) {
-            super.onChange(selfChange);
-
-            mNotificationEnabled = getValue();
-            resetNotification();
-        }
-
-        private boolean getValue() {
-            return Settings.Global.getInt(
-                            mContentResolver,
-                            Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
-                            0)
-                    == 1;
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/notify/WifiNotificationHelper.java b/src/com/android/networkrecommendation/notify/WifiNotificationHelper.java
deleted file mode 100644
index b19f25c..0000000
--- a/src/com/android/networkrecommendation/notify/WifiNotificationHelper.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.notify;
-
-import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
-import static com.android.networkrecommendation.util.NotificationChannelUtil.CHANNEL_ID_NETWORK_AVAILABLE;
-
-import android.app.Notification;
-import android.app.Notification.Action;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.net.wifi.WifiConfiguration;
-import android.os.Bundle;
-import com.android.networkrecommendation.R;
-import com.android.networkrecommendation.util.NotificationChannelUtil;
-
-/** Helper class that creates notifications for {@link WifiNotificationController}. */
-public class WifiNotificationHelper {
-    private final Context mContext;
-
-    public WifiNotificationHelper(Context context) {
-        mContext = context;
-    }
-
-    /**
-     * Creates the main open networks notification with two actions. "Options" link to the Wi-Fi
-     * picker activity, and "Connect" prompts {@link WifiNotificationController} to connect to the
-     * recommended network. Tapping on the content body connects to the recommended network and
-     * opens the wifi picker
-     */
-    public Notification createMainNotification(WifiConfiguration config) {
-        PendingIntent allNetworksIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(WifiNotificationController.ACTION_PICK_WIFI_NETWORK),
-                        FLAG_UPDATE_CURRENT);
-        Action allNetworksAction =
-                new Action.Builder(
-                                null /* icon */,
-                                mContext.getText(R.string.wifi_available_action_all_networks),
-                                allNetworksIntent)
-                        .build();
-        PendingIntent connectIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(
-                                WifiNotificationController.ACTION_CONNECT_TO_RECOMMENDED_NETWORK),
-                        FLAG_UPDATE_CURRENT);
-        Action connectAction =
-                new Action.Builder(
-                                null /* icon */,
-                                mContext.getText(R.string.wifi_available_action_connect),
-                                connectIntent)
-                        .build();
-        PendingIntent connectAndOpenPickerIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(
-                                WifiNotificationController
-                                        .ACTION_CONNECT_TO_RECOMMENDED_NETWORK_AND_OPEN_SETTINGS),
-                        FLAG_UPDATE_CURRENT);
-        return createNotificationBuilder(R.string.wifi_available_title, config.SSID)
-                .setContentIntent(connectAndOpenPickerIntent)
-                .addAction(connectAction)
-                .addAction(allNetworksAction)
-                .build();
-    }
-
-    /**
-     * Creates the notification that indicates the controller is attempting to connect to the
-     * recommended network.
-     */
-    public Notification createConnectingNotification(WifiConfiguration config) {
-        return createNotificationBuilder(R.string.wifi_available_title_connecting, config.SSID)
-                .setProgress(0 /* max */, 0 /* progress */, true /* indeterminate */)
-                .build();
-    }
-
-    /**
-     * Creates the notification that indicates the controller successfully connected to the
-     * recommended network.
-     */
-    public Notification createConnectedNotification(WifiConfiguration config) {
-        return createNotificationBuilder(R.string.wifi_available_title_connected, config.SSID)
-                .setAutoCancel(true)
-                .build();
-    }
-
-    /**
-     * Creates the notification that indicates the controller failed to connect to the recommended
-     * network. Tapping this notification opens the wifi picker.
-     */
-    public Notification createFailedToConnectNotification() {
-        PendingIntent openWifiPickerAfterFailure =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(
-                                WifiNotificationController
-                                        .ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE),
-                        FLAG_UPDATE_CURRENT);
-        return createNotificationBuilder(
-                        R.string.wifi_available_title_failed,
-                        mContext.getString(R.string.wifi_available_content_failed))
-                .setContentIntent(openWifiPickerAfterFailure)
-                .setAutoCancel(true)
-                .build();
-    }
-
-    private Notification.Builder createNotificationBuilder(int titleRid, String content) {
-        CharSequence title = mContext.getText(titleRid);
-        PendingIntent deleteIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(WifiNotificationController.ACTION_NOTIFICATION_DELETED),
-                        FLAG_UPDATE_CURRENT);
-        int smallIcon = R.drawable.ic_signal_wifi_statusbar_not_connected;
-        Notification.Builder builder =
-                new Notification.Builder(mContext)
-                        .setDeleteIntent(deleteIntent)
-                        .setSmallIcon(smallIcon)
-                        .setTicker(title)
-                        .setContentTitle(title)
-                        .setColor(mContext.getColor(R.color.color_tint))
-                        .setContentText(content)
-                        .setShowWhen(false)
-                        .setLocalOnly(true)
-                        .addExtras(getOverrideLabelExtras());
-        return NotificationChannelUtil.setChannel(builder, CHANNEL_ID_NETWORK_AVAILABLE);
-    }
-
-    private Bundle getOverrideLabelExtras() {
-        Bundle extras = new Bundle();
-        extras.putString(
-                Notification.EXTRA_SUBSTITUTE_APP_NAME,
-                mContext.getString(R.string.notification_channel_group_name));
-        return extras;
-    }
-}
diff --git a/src/com/android/networkrecommendation/scoring/util/HashUtil.java b/src/com/android/networkrecommendation/scoring/util/HashUtil.java
deleted file mode 100644
index 19fbd6a..0000000
--- a/src/com/android/networkrecommendation/scoring/util/HashUtil.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.scoring.util;
-
-import android.util.Base64;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-/** Hashcode and encoding utils. */
-public final class HashUtil {
-    private HashUtil() {}
-
-    /**
-     * Returns a base64-encoded secure hash (using the SHA-256 algorithm) of the provided input.
-     *
-     * @param input the bytes for which the secure hash should be computed.
-     * @return the hash
-     */
-    public static String secureHash(String input) {
-        return encodeBase64(getHash(input, "SHA-256"));
-    }
-
-    public static String encodeBase64(byte[] input) {
-        return Base64.encodeToString(input, Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP);
-    }
-
-    /** Retrieves the message digest instance for a given hash algorithm. */
-    public static MessageDigest getMessageDigest(String hashAlgorithm) {
-        try {
-            return MessageDigest.getInstance(hashAlgorithm);
-        } catch (NoSuchAlgorithmException e) {
-            return null;
-        }
-    }
-
-    /**
-     * @return hash of input using hashAlgorithm, or 0-length byte array if input is null, or null
-     *     if hashAlgorithm can't be loaded
-     */
-    public static byte[] getHash(String input, String hashAlgorithm) {
-        if (input != null) {
-            MessageDigest digest = getMessageDigest(hashAlgorithm);
-            if (digest == null) {
-                return null;
-            }
-            return digest.digest(input.getBytes());
-        }
-        return new byte[0];
-    }
-
-    /**
-     * Gets an SSID-specific hash which also ensures the SSID is in cannonical form (stripped of
-     * quotes).
-     */
-    public static String getSsidHash(String ssid) {
-        return secureHash(NetworkUtil.canonicalizeSsid(ssid));
-    }
-
-    /** Gets a single hash of over the combined SSID and BSSID. */
-    public static String getSsidBssidHash(String ssid, String bssid) {
-        String canonicalSsid = NetworkUtil.canonicalizeSsid(ssid);
-        return secureHash(canonicalSsid + bssid);
-    }
-
-    /** Return the first 8 bytes of the SHA-256 hash of the given ssid as a long value. */
-    public static long hashAsLong(String ssid) {
-        byte[] h = getHash(ssid, "SHA-256");
-        if (h == null || h.length < 8) {
-            return 0;
-        }
-        return (h[0] & 0xFFL) << 56
-                | (h[1] & 0xFFL) << 48
-                | (h[2] & 0xFFL) << 40
-                | (h[3] & 0xFFL) << 32
-                | (h[4] & 0xFFL) << 24
-                | (h[5] & 0xFFL) << 16
-                | (h[6] & 0xFFL) << 8
-                | (h[7] & 0xFFL);
-    }
-}
diff --git a/src/com/android/networkrecommendation/scoring/util/NetworkUtil.java b/src/com/android/networkrecommendation/scoring/util/NetworkUtil.java
deleted file mode 100644
index b27bbe6..0000000
--- a/src/com/android/networkrecommendation/scoring/util/NetworkUtil.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.scoring.util;
-
-import static android.net.wifi.WifiConfiguration.KeyMgmt.IEEE8021X;
-import static android.net.wifi.WifiConfiguration.KeyMgmt.WPA_EAP;
-import static android.net.wifi.WifiConfiguration.KeyMgmt.WPA_PSK;
-import static com.android.networkrecommendation.util.ScanResultUtil.isScanResultForOpenNetwork;
-
-import android.content.Context;
-import android.net.NetworkKey;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.text.TextUtils;
-import com.android.networkrecommendation.Constants;
-import com.android.networkrecommendation.util.Blog;
-import com.android.networkrecommendation.util.ScanResultUtil;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/** Network Utils. */
-public final class NetworkUtil {
-
-    private NetworkUtil() {
-        // do not instantiate
-    }
-
-    /**
-     * Canonicalize the given SSID returned by WifiInfo#getSSID().
-     *
-     * <p>This method should only be called once on a given SSID! If an SSID contains outer quotes,
-     * we will strip them twice and change the SSID to a different one.
-     *
-     * <p>The SSID should be returned surrounded by double quotation marks if it is valid UTF-8.
-     * This behavior was only implemented correctly after
-     * https://googleplex-android-review.googlesource.com/#/c/224602/ which went into JB-MR1.
-     *
-     * <p>This method does not account for non-UTF-8 SSIDs, which are returned as a string of hex
-     * digits from getSSID().
-     *
-     * <p>For more details, see: http://stackoverflow.com/questions/13563032
-     */
-    public static String canonicalizeSsid(String ssid) {
-        if (ssid == null) {
-            return null;
-        }
-        return removeQuotesIfNeeded(ssid);
-    }
-
-    /** Remove the leading quote and trailing quote. */
-    private static String removeQuotesIfNeeded(String text) {
-        if (text.length() > 1 && text.startsWith("\"") && text.endsWith("\"")) {
-            return text.substring(1, text.length() - 1);
-        }
-        return text;
-    }
-
-    /**
-     * @return a map from NetworkKey to true if that network is open, and false otherwise, for all
-     *     visible networks in the last set of Wi-Fi scan results.
-     */
-    public static Map<NetworkKey, Boolean> getOpenWifiNetworkKeys(Context context) {
-        WifiManager wifiMgr = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        List<ScanResult> scanResults = null;
-        if (Util.isScorerActive(context)) {
-            try {
-                scanResults = wifiMgr.getScanResults();
-            } catch (SecurityException e) {
-                Blog.w(Constants.TAG, e, "No permission to get scan results");
-                scanResults = null;
-            }
-        }
-        if (scanResults == null) {
-            return Collections.emptyMap();
-        }
-        Map<NetworkKey, Boolean> openKeys = new HashMap<>();
-        for (int i = 0; i < scanResults.size(); i++) {
-            ScanResult scanResult = scanResults.get(i);
-            NetworkKey networkKey = ScanResultUtil.createNetworkKey(scanResult);
-            if (networkKey != null) {
-                openKeys.put(networkKey, isScanResultForOpenNetwork(scanResult));
-            }
-        }
-        return openKeys;
-    }
-
-    /** Returns true if the given config is for an "open" network. */
-    public static boolean isOpenNetwork(@NonNull WifiConfiguration config) {
-        if (config.allowedKeyManagement.get(WPA_PSK) // covers WPA_PSK and WPA2_PSK
-                || config.allowedKeyManagement.get(WPA_EAP)
-                || config.allowedKeyManagement.get(IEEE8021X)
-                || (config.wepKeys != null && config.wepKeys[0] != null)) {
-            return false;
-        }
-        return true;
-    }
-
-    @NonNull
-    public static String getCurrentWifiSsid(Context context) {
-        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        WifiInfo wifiInfo = wifiManager.getConnectionInfo();
-        return wifiInfo == null ? "" : wifiInfo.getSSID();
-    }
-
-    /** Returns the config for the given SSID, or null if one cannot be found. */
-    @Nullable
-    public static WifiConfiguration getConfig(Context context, String ssid) {
-        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        List<WifiConfiguration> configs = wifiManager.getConfiguredNetworks();
-        if (configs == null) {
-            return null;
-        }
-
-        WifiConfiguration config;
-        for (int i = 0; i < configs.size(); i++) {
-            config = configs.get(i);
-            if (TextUtils.equals(ssid, config.SSID)) {
-                return config;
-            }
-        }
-        return null;
-    }
-}
diff --git a/src/com/android/networkrecommendation/scoring/util/Util.java b/src/com/android/networkrecommendation/scoring/util/Util.java
deleted file mode 100644
index 4a8c80b..0000000
--- a/src/com/android/networkrecommendation/scoring/util/Util.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.scoring.util;
-
-import static com.android.networkrecommendation.Constants.TAG;
-
-import android.content.Context;
-import android.net.NetworkScoreManager;
-import android.net.ScoredNetwork;
-import com.android.networkrecommendation.util.Blog;
-
-/** Utility methods for the scorer. */
-public final class Util {
-
-    /** @return true if GmsCore is the active network scorer. */
-    public static boolean isScorerActive(Context context) {
-        NetworkScoreManager scoreManager =
-                (NetworkScoreManager) context.getSystemService(Context.NETWORK_SCORE_SERVICE);
-        final String activeScorer = scoreManager.getActiveScorerPackage();
-        final String packageName = context.getPackageName();
-
-        return packageName.equals(activeScorer);
-    }
-
-    /** Clear scores in the platform if we're the active scorer. */
-    public static boolean safelyClearScores(Context context) {
-        try {
-            NetworkScoreManager scoreManager =
-                    (NetworkScoreManager) context.getSystemService(Context.NETWORK_SCORE_SERVICE);
-            scoreManager.clearScores();
-            return true;
-        } catch (SecurityException e) {
-            Blog.v(
-                    TAG,
-                    e,
-                    "SecurityException trying to clear scores, probably just an unavoidable race condition. "
-                            + "Ignoring.");
-            return false;
-        }
-    }
-
-    /** Update scores in the platform if we're the active scorer. */
-    public static boolean safelyUpdateScores(Context context, ScoredNetwork[] networkScores) {
-        try {
-            NetworkScoreManager scoreManager =
-                    (NetworkScoreManager) context.getSystemService(Context.NETWORK_SCORE_SERVICE);
-            scoreManager.updateScores(networkScores);
-            return true;
-        } catch (SecurityException e) {
-            Blog.v(
-                    TAG,
-                    e,
-                    "SecurityException trying to update scores, probably just an unavoidable race condition. "
-                            + "Ignoring.");
-            return false;
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/Blog.java b/src/com/android/networkrecommendation/util/Blog.java
deleted file mode 100644
index 47eff57..0000000
--- a/src/com/android/networkrecommendation/util/Blog.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import android.text.TextUtils;
-import android.util.Base64;
-import android.util.Log;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.IllegalFormatException;
-import java.util.Locale;
-
-/**
- * Wrapper for {@link Log} which adds the calling class/method to logged items.
- *
- * This works by traversing up the call stack and finding the first calling class whose name does
- * not end with "Log" (allowing clients to add another layer such as AppLog when a constant tag is
- * desired across the application).
- */
-public final class Blog {
-    private static final String TAG = "Blog";
-
-    private Blog() {}
-
-    public static void i(String tag, String format, Object... args) {
-        Log.i(tag, buildMessage(format, args));
-    }
-
-    public static void i(String tag, Throwable tr, String format, Object... args) {
-        Log.i(tag, buildMessage(format, args), tr);
-    }
-
-    public static void v(String tag, String format, Object... args) {
-        // Not guarded with Log.isLoggable - these calls should be stripped out by proguard for
-        // release builds.
-        Log.v(tag, buildMessage(format, args));
-    }
-
-    public static void v(String tag, Throwable tr, String format, Object... args) {
-        // Not guarded with Log.isLoggable - these calls should be stripped out by proguard for
-        // release builds.
-        Log.v(tag, buildMessage(format, args), tr);
-    }
-
-    public static void d(String tag, String format, Object... args) {
-        if (Log.isLoggable(tag, Log.DEBUG)) {
-            Log.d(tag, buildMessage(format, args));
-        }
-    }
-
-    public static void d(String tag, Throwable tr, String format, Object... args) {
-        if (Log.isLoggable(tag, Log.DEBUG)) {
-            Log.d(tag, buildMessage(format, args), tr);
-        }
-    }
-
-    public static void w(String tag, Throwable tr, String format, Object... args) {
-        Log.w(tag, buildMessage(format, args), tr);
-    }
-
-    public static void w(String tag, String format, Object... args) {
-        Log.w(tag, buildMessage(format, args));
-    }
-
-    public static void e(String tag, String format, Object... args) {
-        Log.e(tag, buildMessage(format, args));
-    }
-
-    public static void e(String tag, Throwable tr, String format, Object... args) {
-        Log.e(tag, buildMessage(format, args), tr);
-    }
-
-    public static void wtf(String tag, String format, Object... args) {
-        // Ensure we always log a stack trace when calling Log.wtf.
-        Log.wtf(tag, buildMessage(format, args), new WhatATerribleException());
-    }
-
-    public static void wtf(String tag, Throwable tr, String format, Object...args) {
-        Log.wtf(tag, buildMessage(format, args), new WhatATerribleException(tr));
-    }
-
-    /**
-     * Redact personally identifiable information for production users.
-     *
-     * If:
-     *     1) String is null
-     *     2) String is empty
-     *     3) enableSensitiveLogging param passed in is true
-     *   Return the String value of the input object.
-     * Else:
-     *   Return a SHA-1 hash of the String value of the input object.
-     */
-    public static String pii(Object pii, boolean enableSensitiveLogging) {
-        String val = String.valueOf(pii);
-        if (pii == null || TextUtils.isEmpty(val) || enableSensitiveLogging) {
-            return val;
-        }
-        return "[" + secureHash(val.getBytes()) + "]";
-    }
-
-    /**
-     * Returns a secure hash (using the SHA1 algorithm) of the provided input.
-     *
-     * @return the hash
-     * @param input the bytes for which the secure hash should be computed.
-     */
-    public static String secureHash(byte[] input) {
-        MessageDigest messageDigest;
-        try {
-            messageDigest = MessageDigest.getInstance("SHA-1");
-        } catch (NoSuchAlgorithmException e) {
-            return null;
-        }
-        messageDigest.update(input);
-        byte[] result = messageDigest.digest();
-        return Base64.encodeToString(
-                result, Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP);
-    }
-
-    /**
-     * Formats the caller's provided message and prepends useful info like
-     * calling thread ID and method name.
-     */
-    private static String buildMessage(String format, Object... args) {
-        String msg;
-        try {
-            msg = (args == null || args.length == 0) ? format
-                    : String.format(Locale.US, format, args);
-        } catch (IllegalFormatException ife) {
-            String formattedArgs = Arrays.toString(args);
-            wtf(TAG, ife, "msg: \"%s\" args: %s", format, formattedArgs);
-            msg = format + " " + formattedArgs;
-        }
-        StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();
-        String caller = "<unknown>";
-        // Walk up the stack looking for the first caller outside of Blog whose name doesn't end
-        // with "Log". It will be at least two frames up, so start there.
-        for (int i = 2; i < trace.length; i++) {
-            String callingClass = trace[i].getClassName();
-            if (!callingClass.equals(Blog.class.getName())
-                        && !callingClass.endsWith("Log")) {
-                callingClass = callingClass.substring(callingClass.lastIndexOf('.') + 1);
-                callingClass = callingClass.substring(callingClass.lastIndexOf('$') + 1);
-                caller = callingClass + "." + trace[i].getMethodName();
-                break;
-            }
-        }
-        return String.format(Locale.US, "[%d] %s: %s",
-                Thread.currentThread().getId(), caller, msg);
-    }
-
-    /** Named exception thrown when calling wtf(). */
-    public static class WhatATerribleException extends RuntimeException {
-        public WhatATerribleException() {
-            super();
-        }
-        public WhatATerribleException(Throwable t) {
-            super(t);
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/NotificationChannelUtil.java b/src/com/android/networkrecommendation/util/NotificationChannelUtil.java
deleted file mode 100644
index ebe5ff3..0000000
--- a/src/com/android/networkrecommendation/util/NotificationChannelUtil.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import android.app.Notification.Builder;
-import android.app.NotificationChannel;
-import android.app.NotificationChannelGroup;
-import android.app.NotificationManager;
-import android.content.Context;
-import com.android.networkrecommendation.R;
-
-/**
- * Util class for managing {@link android.app.NotificationChannel}s for our notifications.
- * TODO(netrec): b/36486429 Add tests for this class once relevant class constructors are supported
- * for Robolectric.
- */
-public class NotificationChannelUtil {
-
-    private static final String CHANNEL_GROUP_ID =
-            "com.android.networkrecommendation.Notifications.WifiMessageGroup";
-    public static final String CHANNEL_ID_NETWORK_AVAILABLE =
-            "com.android.networkrecommendation.Notifications.WifiMessageGroup.NetworkAvailableChannel";
-    public static final String CHANNEL_ID_WAKEUP =
-            "com.android.networkrecommendation.Notifications.WifiMessageGroup.WakeupChannel";
-
-    /** Configures the {@link android.app.NotificationChannel}s for our module. */
-    public static void configureNotificationChannels(
-            NotificationManager notificationManager, Context context) {
-        NotificationChannelGroup notificationChannelGroup =
-                new NotificationChannelGroup(
-                        CHANNEL_GROUP_ID,
-                        context.getString(R.string.notification_channel_group_name));
-        notificationManager.createNotificationChannelGroup(notificationChannelGroup);
-
-        NotificationChannel networkAvailableChannel =
-                new NotificationChannel(
-                        CHANNEL_ID_NETWORK_AVAILABLE,
-                        context.getString(R.string.notification_channel_network_available),
-                        NotificationManager.IMPORTANCE_LOW);
-        networkAvailableChannel.setGroup(CHANNEL_GROUP_ID);
-        notificationManager.createNotificationChannel(networkAvailableChannel);
-
-        NotificationChannel wakeupChannel =
-                new NotificationChannel(
-                        CHANNEL_ID_WAKEUP,
-                        context.getString(R.string.notification_channel_wakeup_name),
-                        NotificationManager.IMPORTANCE_LOW);
-        wakeupChannel.setGroup(CHANNEL_GROUP_ID);
-        notificationManager.createNotificationChannel(wakeupChannel);
-    }
-
-    /** Wraps Notification.Builder.setChannel. */
-    public static Builder setChannel(Builder notificationBuilder, String channelId) {
-        return notificationBuilder.setChannelId(channelId);
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/OCompatFactory.java b/src/com/android/networkrecommendation/util/OCompatFactory.java
deleted file mode 100644
index ef949cf..0000000
--- a/src/com/android/networkrecommendation/util/OCompatFactory.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import android.net.NetworkKey;
-import android.net.RssiCurve;
-import android.net.ScoredNetwork;
-import android.os.Bundle;
-
-/**
- * Encapsulates the constructors for O-only objects to make unit testing possible, since those APIs
- * are not supported by Robolectric yet. Once Robolectric supports O, we can remove this class.
- */
-public class OCompatFactory {
-
-    /** Create a ScoredNetwork with the provided parameters. */
-    public static ScoredNetwork createScoredNetworkOCompat(
-            NetworkKey networkToScore,
-            RssiCurve rssiCurve,
-            boolean meteredHint,
-            Bundle attributesBundle) {
-        return new ScoredNetwork(networkToScore, rssiCurve, meteredHint, attributesBundle);
-    }
-
-    /** Create an RssiCurve with the provided parameters. */
-    public static RssiCurve createRssiCurveOCompat(
-            int start, int bucketWidth, byte[] rssiBuckets, int activeNetworkRssiBoost) {
-        return new RssiCurve(start, bucketWidth, rssiBuckets, activeNetworkRssiBoost);
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/RoboCompatUtil.java b/src/com/android/networkrecommendation/util/RoboCompatUtil.java
deleted file mode 100644
index 7aa0d7b..0000000
--- a/src/com/android/networkrecommendation/util/RoboCompatUtil.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import android.content.res.Resources.Theme;
-import android.graphics.drawable.Drawable;
-import android.net.NetworkBadging;
-import android.net.RssiCurve;
-import android.net.ScoredNetwork;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.UserManager;
-import android.support.annotation.VisibleForTesting;
-
-/**
- * This class provides access to @SystemApi methods that were added in Android O and not yet
- * available in using the --config robo_experimental configuration when testing.
- */
-public class RoboCompatUtil {
-
-    /**
-     * {@link UserManager#ACTION_USER_RESTRICTIONS_CHANGED}. TODO: remove when string is available
-     * in experimental.
-     */
-    public static final String ACTION_USER_RESTRICTIONS_CHANGED =
-            "android.os.action.USER_RESTRICTIONS_CHANGED";
-
-    private static RoboCompatUtil mRoboCompatUtil;
-
-    private RoboCompatUtil() {}
-
-    /** Get a shared instance of this utility. */
-    public static synchronized RoboCompatUtil getInstance() {
-        if (mRoboCompatUtil == null) {
-            mRoboCompatUtil = new RoboCompatUtil();
-        }
-        return mRoboCompatUtil;
-    }
-
-    @VisibleForTesting
-    public static void setInstanceForTesting(RoboCompatUtil roboCompatUtil) {
-        mRoboCompatUtil = roboCompatUtil;
-    }
-
-    /** Wraps WifiManager.connect. */
-    public void connectToWifi(WifiManager wifiManager, WifiConfiguration wifiConfiguration) {
-        wifiManager.connect(wifiConfiguration, null /* actionListener */);
-    }
-
-    /** Wraps WifiConfiguration.hasNoInternetAccess. */
-    @SuppressWarnings("unchecked")
-    public boolean hasNoInternetAccess(WifiConfiguration wifiConfiguration) {
-        return wifiConfiguration.hasNoInternetAccess();
-    }
-
-    /** Wraps WifiConfiguration.isNoInternetAccessExpected. */
-    public boolean isNoInternetAccessExpected(WifiConfiguration wifiConfiguration) {
-        return wifiConfiguration.isNoInternetAccessExpected();
-    }
-
-    /** Wraps WifiConfiguration.useExternalScores. */
-    public boolean useExternalScores(WifiConfiguration wifiConfiguration) {
-        return wifiConfiguration.useExternalScores;
-    }
-
-    /** Wraps WifiConfiguration.isPasspoint. */
-    public boolean isPasspoint(WifiConfiguration wifiConfiguration) {
-        return wifiConfiguration.isPasspoint();
-    }
-
-    /** Wraps NetworkBadging.getWifiIcon. */
-    public Drawable getWifiIcon(int signalLevel, int badging, Theme theme) {
-        return NetworkBadging.getWifiIcon(signalLevel, badging, theme);
-    }
-
-    /** Wraps RssiCurve.activeNetworkRssiBoost. */
-    public int activeNetworkRssiBoost(RssiCurve curve) {
-        return curve.activeNetworkRssiBoost;
-    }
-
-    /** Wraps ScoredNetwork.attributes. */
-    public Bundle attributes(ScoredNetwork scoredNetwork) {
-        return scoredNetwork.attributes;
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/ScanResultUtil.java b/src/com/android/networkrecommendation/util/ScanResultUtil.java
deleted file mode 100644
index 4587e91..0000000
--- a/src/com/android/networkrecommendation/util/ScanResultUtil.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import static com.android.networkrecommendation.Constants.TAG;
-import static com.android.networkrecommendation.util.SsidUtil.quoteSsid;
-
-import android.net.NetworkKey;
-import android.net.WifiKey;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.support.annotation.Nullable;
-import android.text.TextUtils;
-import com.android.networkrecommendation.config.G;
-
-/**
- * Scan result utility for any {@link ScanResult} related operations. TODO(b/34125341): Delete this
- * class once exposed as a SystemApi
- */
-public class ScanResultUtil {
-
-    /**
-     * Helper method to check if the provided |scanResult| corresponds to a PSK network or not. This
-     * checks if the provided capabilities string contains PSK encryption type or not.
-     */
-    public static boolean isScanResultForPskNetwork(ScanResult scanResult) {
-        return scanResult.capabilities.contains("PSK");
-    }
-
-    /**
-     * Helper method to check if the provided |scanResult| corresponds to a EAP network or not. This
-     * checks if the provided capabilities string contains EAP encryption type or not.
-     */
-    public static boolean isScanResultForEapNetwork(ScanResult scanResult) {
-        return scanResult.capabilities.contains("EAP");
-    }
-
-    /**
-     * Helper method to check if the provided |scanResult| corresponds to a WEP network or not. This
-     * checks if the provided capabilities string contains WEP encryption type or not.
-     */
-    public static boolean isScanResultForWepNetwork(ScanResult scanResult) {
-        return scanResult.capabilities.contains("WEP");
-    }
-
-    /**
-     * Helper method to check if the provided |scanResult| corresponds to an open network or not.
-     * This checks if the provided capabilities string does not contain either of WEP, PSK or EAP
-     * encryption types or not.
-     */
-    public static boolean isScanResultForOpenNetwork(ScanResult scanResult) {
-        return !(isScanResultForWepNetwork(scanResult)
-                || isScanResultForPskNetwork(scanResult)
-                || isScanResultForEapNetwork(scanResult));
-    }
-
-    /** Create a {@link NetworkKey} from a ScanResult, properly quoting the SSID. */
-    @Nullable
-    public static final NetworkKey createNetworkKey(ScanResult scanResult) {
-        WifiKey wifiKey = createWifiKey(scanResult);
-        if (wifiKey == null) {
-            return null;
-        }
-        return new NetworkKey(wifiKey);
-    }
-
-    /**
-     * Helper method to quote the SSID in Scan result to use for comparing/filling SSID stored in
-     * WifiConfiguration object.
-     */
-    @Nullable
-    public static WifiKey createWifiKey(ScanResult result) {
-        if (result == null) {
-            Blog.e(TAG, "Couldn't create WifiKey, provided scan result is null.");
-            return null;
-        }
-        try {
-            return new WifiKey(quoteSsid(result.SSID), result.BSSID);
-        } catch (IllegalArgumentException | NullPointerException e) {
-            // Expect IllegalArgumentException only in Android O.
-            Blog.e(
-                    TAG,
-                    e,
-                    "Couldn't make a wifi key from %s/%s",
-                    Blog.pii(result.SSID, G.Netrec.enableSensitiveLogging.get()),
-                    Blog.pii(result.BSSID, G.Netrec.enableSensitiveLogging.get()));
-            return null;
-        }
-    }
-
-    /** @return {@code true} if the result is for a 2.4GHz network. */
-    public static boolean is24GHz(ScanResult result) {
-        return is24GHz(result.frequency);
-    }
-
-    /** @return {@code true} if the frequency is for a 2.4GHz network. */
-    public static boolean is24GHz(int freq) {
-        return freq > 2400 && freq < 2500;
-    }
-
-    /** @return {@code true} if the result is for a 5GHz network. */
-    public static boolean is5GHz(ScanResult result) {
-        return is5GHz(result.frequency);
-    }
-
-    /** @return {@code true} if the frequency is for a 5GHz network. */
-    public static boolean is5GHz(int freq) {
-        return freq > 4900 && freq < 5900;
-    }
-
-    /**
-     * Checks if the provided |scanResult| match with the provided |config|. Essentially checks if
-     * the network config and scan result have the same SSID and encryption type.
-     */
-    public static boolean doesScanResultMatchWithNetwork(
-            ScanResult scanResult, WifiConfiguration config) {
-        // Add the double quotes to the scan result SSID for comparison with the network configs.
-        String configSSID = quoteSsid(scanResult.SSID);
-        if (TextUtils.equals(config.SSID, configSSID)) {
-            if (ScanResultUtil.isScanResultForPskNetwork(scanResult)
-                    && WifiConfigurationUtil.isConfigForPskNetwork(config)) {
-                return true;
-            }
-            if (ScanResultUtil.isScanResultForEapNetwork(scanResult)
-                    && WifiConfigurationUtil.isConfigForEapNetwork(config)) {
-                return true;
-            }
-            if (ScanResultUtil.isScanResultForWepNetwork(scanResult)
-                    && WifiConfigurationUtil.isConfigForWepNetwork(config)) {
-                return true;
-            }
-            if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)
-                    && WifiConfigurationUtil.isConfigForOpenNetwork(config)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/com/android/networkrecommendation/util/SsidUtil.java b/src/com/android/networkrecommendation/util/SsidUtil.java
deleted file mode 100644
index b15ac5f..0000000
--- a/src/com/android/networkrecommendation/util/SsidUtil.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.util;
-
-import static com.android.networkrecommendation.Constants.TAG;
-
-import android.net.WifiKey;
-import android.support.annotation.Nullable;
-import android.text.TextUtils;
-import com.android.networkrecommendation.config.G;
-
-/** Utility methods for Wifi Network SSID and BSSID manipulation. */
-public final class SsidUtil {
-
-    // A special BSSID used to indicate a wildcard/ignore.
-    // The MAC address this refers to is reserved by IANA
-    // http://www.iana.org/assignments/ethernet-numbers/ethernet-numbers.xhtml
-    public static final String BSSID_IGNORE = "00:00:5E:00:00:00";
-
-    /** Quote an SSID if it hasn't already been quoted. */
-    @Nullable
-    public static String quoteSsid(@Nullable String ssid) {
-        if (ssid == null) {
-            return null;
-        }
-        if (isValidQuotedSsid(ssid)) {
-            return ssid;
-        }
-        return "\"" + ssid + "\"";
-    }
-
-    /** Strip initial and final quotations marks from an SSID. */
-    public static String unquoteSsid(@Nullable String ssid) {
-        if (ssid == null) {
-            return null;
-        }
-        return ssid.replaceAll("^\"", "").replaceAll("\"$", "");
-    }
-
-    /**
-     * Create a WifiKey for the given SSID/BSSID. Returns null if the key could not be created
-     * (ssid/bssid are not valid patterns).
-     */
-    @Nullable
-    public static WifiKey createWifiKey(String ssid, String bssid) {
-        try {
-            return new WifiKey(quoteSsid(ssid), bssid);
-        } catch (IllegalArgumentException | NullPointerException e) {
-            // Expect IllegalArgumentException only in Android O.
-            Blog.e(
-                    TAG,
-                    e,
-                    "Couldn't make a wifi key from %s/%s",
-                    Blog.pii(ssid, G.Netrec.enableSensitiveLogging.get()),
-                    Blog.pii(bssid, G.Netrec.enableSensitiveLogging.get()));
-            return null;
-        }
-    }
-
-    /**
-     * Returns true if the given string will be accepted as an SSID by WifiKey, especially meaning
-     * it is quoted.
-     */
-    public static boolean isValidQuotedSsid(@Nullable String ssid) {
-        return ssid != null && ssid.startsWith("\"") && ssid.endsWith("\"");
-    }
-
-    /** Thows IllegalArgumentException if the given string cannot be used for an SSID in WifiKey. */
-    public static void checkIsValidQuotedSsid(String ssid) {
-        if (!isValidQuotedSsid(ssid)) {
-            throw new IllegalArgumentException("SSID " + ssid + " expected to be quoted");
-        }
-    }
-
-    /**
-     * Returns true if the canonical version of two SSIDs (ignoring wrapping quotations) is equal.
-     */
-    public static boolean areEqual(@Nullable String ssid1, @Nullable String ssid2) {
-        String quotedSsid1 = quoteSsid(ssid1);
-        String quotedSsid2 = quoteSsid(ssid2);
-        return TextUtils.equals(quotedSsid1, quotedSsid2);
-    }
-
-    /**
-     * Returns a string version of the SSID for logging which is typically redacted.
-     *
-     * <p>The ID will only be returned verbatim if the enableSensitiveLogging flag is set.
-     */
-    public static String getRedactedId(String ssid) {
-        return Blog.pii(String.format("%s", ssid), G.Netrec.enableSensitiveLogging.get());
-    }
-
-    /**
-     * Returns a string version of the SSID/BSSID pair for logging which is typically redacted.
-     *
-     * <p>The IDs will only be returned verbatim if the enableSensitiveLogging flag is set.
-     */
-    public static String getRedactedId(String ssid, String bssid) {
-        return Blog.pii(String.format("%s/%s", ssid, bssid), G.Netrec.enableSensitiveLogging.get());
-    }
-
-    // Can't instantiate.
-    private SsidUtil() {}
-}
diff --git a/src/com/android/networkrecommendation/util/WifiConfigurationUtil.java b/src/com/android/networkrecommendation/util/WifiConfigurationUtil.java
deleted file mode 100644
index 3616cd7..0000000
--- a/src/com/android/networkrecommendation/util/WifiConfigurationUtil.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.networkrecommendation.util;
-
-import android.net.wifi.WifiConfiguration;
-
-/**
- * WifiConfiguration utility for any {@link WifiConfiguration} related operations..
- * TODO(b/34125341): Delete this class once exposed as a SystemApi
- */
-public class WifiConfigurationUtil {
-    /**
-     * Checks if the provided |wepKeys| array contains any non-null value;
-     */
-    public static boolean hasAnyValidWepKey(String[] wepKeys) {
-        for (int i = 0; i < wepKeys.length; i++) {
-            if (wepKeys[i] != null) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Helper method to check if the provided |config| corresponds to a PSK network or not.
-     */
-    public static boolean isConfigForPskNetwork(WifiConfiguration config) {
-        return config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_PSK);
-    }
-
-    /**
-     * Helper method to check if the provided |config| corresponds to a EAP network or not.
-     */
-    public static boolean isConfigForEapNetwork(WifiConfiguration config) {
-        return (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP)
-                || config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X));
-    }
-
-    /**
-     * Helper method to check if the provided |config| corresponds to a WEP network or not.
-     */
-    public static boolean isConfigForWepNetwork(WifiConfiguration config) {
-        return (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.NONE)
-                && hasAnyValidWepKey(config.wepKeys));
-    }
-
-    /**
-     * Helper method to check if the provided |config| corresponds to an open network or not.
-     */
-    public static boolean isConfigForOpenNetwork(WifiConfiguration config) {
-        return !(isConfigForWepNetwork(config) || isConfigForPskNetwork(config)
-                || isConfigForEapNetwork(config));
-    }
-
-    /** @return a ssid that can be shown to the user. */
-    public static String getPrintableSsid(WifiConfiguration config) {
-        if (config.SSID == null) return "";
-        final int length = config.SSID.length();
-        if (length > 2 && (config.SSID.charAt(0) == '"') && config.SSID.charAt(length - 1) == '"') {
-            return config.SSID.substring(1, length - 1);
-        }
-        return config.SSID;
-    }
-
-    /** Removes " from the ssid in a wifi configuration (to match against a ScanResult). */
-    public static String removeDoubleQuotes(WifiConfiguration config) {
-        if (config.SSID == null) return null;
-        final int length = config.SSID.length();
-        if ((length > 1) && (config.SSID.charAt(0) == '"')
-                && (config.SSID.charAt(length - 1) == '"')) {
-            return config.SSID.substring(1, length - 1);
-        }
-        return config.SSID;
-    }
-}
diff --git a/src/com/android/networkrecommendation/wakeup/WifiWakeupController.java b/src/com/android/networkrecommendation/wakeup/WifiWakeupController.java
deleted file mode 100644
index 4c9b4c1..0000000
--- a/src/com/android/networkrecommendation/wakeup/WifiWakeupController.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.wakeup;
-
-import static com.android.networkrecommendation.Constants.TAG;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.ContentObserver;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.os.UserManager;
-import android.provider.Settings;
-import android.support.annotation.VisibleForTesting;
-import android.text.TextUtils;
-import android.util.ArrayMap;
-import android.util.ArraySet;
-import com.android.networkrecommendation.config.G;
-import com.android.networkrecommendation.config.Preferences;
-import com.android.networkrecommendation.config.WideAreaNetworks;
-import com.android.networkrecommendation.scoring.util.HashUtil;
-import com.android.networkrecommendation.util.Blog;
-import com.android.networkrecommendation.util.RoboCompatUtil;
-import com.android.networkrecommendation.util.WifiConfigurationUtil;
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * Handles enabling Wi-Fi for the Wi-Fi Wakeup feature.
- *
- * <p>This class enables Wi-Fi when the user is near a network that would would autojoined if Wi-Fi
- * were enabled. When a user disables Wi-Fi, Wi-Fi Wakeup will not enable Wi-Fi until the user's
- * context has changed. For saved networks, this context change is defined by the user leaving the
- * range of the saved SSIDs that were in range when the user disabled Wi-Fi.
- *
- * @hide
- */
-public class WifiWakeupController {
-    /** Number of scans to ensure that a previously in range AP is now out of range. */
-    private static final int NUM_SCANS_TO_CONFIRM_AP_LOSS = 3;
-
-    private final Context mContext;
-    private final ContentResolver mContentResolver;
-    private final WifiManager mWifiManager;
-    private final PowerManager mPowerManager;
-    private final UserManager mUserManager;
-    private final WifiWakeupNetworkSelector mWifiWakeupNetworkSelector;
-    private final Handler mHandler;
-    private final WifiWakeupHelper mWifiWakeupHelper;
-    private final AtomicBoolean mStarted;
-    @VisibleForTesting final ContentObserver mContentObserver;
-
-    private final Map<String, WifiConfiguration> mSavedNetworks = new ArrayMap<>();
-    private final Set<String> mSavedSsidsInLastScan = new ArraySet<>();
-    private final Set<String> mSavedSsids = new ArraySet<>();
-    private final Map<String, Integer> mSavedSsidsOnDisable = new ArrayMap<>();
-    private final SavedNetworkCounts mSavedNetworkCounts = new SavedNetworkCounts();
-    private int mWifiState;
-    private int mWifiApState;
-    private boolean mWifiWakeupEnabled;
-    private boolean mAirplaneModeEnabled;
-    private boolean mAutopilotEnabledWifi;
-    private boolean mPowerSaverModeOn;
-    private boolean mWifiConfigRestricted;
-
-    public WifiWakeupController(
-            Context context,
-            ContentResolver contentResolver,
-            Handler handler,
-            WifiManager wifiManager,
-            PowerManager powerManager,
-            UserManager userManager,
-            WifiWakeupNetworkSelector wifiWakeupNetworkSelector,
-            WifiWakeupHelper wifiWakeupHelper) {
-        mContext = context;
-        mContentResolver = contentResolver;
-        mHandler = handler;
-        mWifiWakeupHelper = wifiWakeupHelper;
-        mStarted = new AtomicBoolean(false);
-        mWifiManager = wifiManager;
-        mPowerManager = powerManager;
-        mUserManager = userManager;
-        mWifiWakeupNetworkSelector = wifiWakeupNetworkSelector;
-        mContentObserver =
-                new ContentObserver(mHandler) {
-                    @Override
-                    public void onChange(boolean selfChange) {
-                        mWifiWakeupEnabled =
-                                Settings.Global.getInt(
-                                                mContentResolver,
-                                                Settings.Global.WIFI_WAKEUP_ENABLED,
-                                                0)
-                                        == 1;
-                        mAirplaneModeEnabled =
-                                Settings.Global.getInt(
-                                                mContentResolver,
-                                                Settings.Global.AIRPLANE_MODE_ON,
-                                                0)
-                                        == 1;
-                        Blog.d(
-                                TAG,
-                                "onChange: [mWifiWakeupEnabled=%b,mAirplaneModeEnabled=%b]",
-                                mWifiWakeupEnabled,
-                                mAirplaneModeEnabled);
-                    }
-                };
-    }
-
-    private final BroadcastReceiver mBroadcastReceiver =
-            new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    try {
-                        if (WifiManager.WIFI_AP_STATE_CHANGED_ACTION.equals(intent.getAction())) {
-                            handleWifiApStateChanged();
-                        } else if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(
-                                intent.getAction())) {
-                            handleWifiStateChanged(false);
-                        } else if (WifiManager.SCAN_RESULTS_AVAILABLE_ACTION.equals(
-                                intent.getAction())) {
-                            handleScanResultsAvailable();
-                        } else if (WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION.equals(
-                                intent.getAction())) {
-                            handleConfiguredNetworksChanged();
-                        } else if (PowerManager.ACTION_POWER_SAVE_MODE_CHANGED.equals(
-                                intent.getAction())) {
-                            handlePowerSaverModeChanged();
-                        } else if (RoboCompatUtil.ACTION_USER_RESTRICTIONS_CHANGED.equals(
-                                intent.getAction())) {
-                            handleUserRestrictionsChanged();
-                        }
-                    } catch (RuntimeException re) {
-                        // TODO(b/35044022) Remove try/catch after a couple of releases when we are confident
-                        // this is not going to throw.
-                        Blog.e(TAG, re, "RuntimeException in broadcast receiver.");
-                    }
-                }
-            };
-
-    /** Starts {@link WifiWakeupController}. */
-    public void start() {
-        if (!mStarted.compareAndSet(false, true)) {
-            return;
-        }
-        Blog.d(TAG, "Starting WifiWakeupController.");
-
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
-        filter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
-        filter.addAction(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION);
-        filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
-        filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
-        filter.addAction(RoboCompatUtil.ACTION_USER_RESTRICTIONS_CHANGED);
-        // TODO(b/33695273): conditionally register this receiver based on wifi enabled setting
-        mContext.registerReceiver(mBroadcastReceiver, filter, null, mHandler);
-        mContentResolver.registerContentObserver(
-                Settings.Global.getUriFor(Settings.Global.WIFI_WAKEUP_ENABLED),
-                true,
-                mContentObserver);
-        mContentResolver.registerContentObserver(
-                Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON),
-                true,
-                mContentObserver);
-        mContentObserver.onChange(true);
-        handlePowerSaverModeChanged();
-        handleUserRestrictionsChanged();
-        handleWifiApStateChanged();
-        handleConfiguredNetworksChanged();
-        handleWifiStateChanged(true);
-        handleScanResultsAvailable();
-    }
-
-    /** Stops {@link WifiWakeupController}. */
-    public void stop() {
-        if (!mStarted.compareAndSet(true, false)) {
-            return;
-        }
-        Blog.d(TAG, "Stopping WifiWakeupController.");
-        mContext.unregisterReceiver(mBroadcastReceiver);
-        mContentResolver.unregisterContentObserver(mContentObserver);
-    }
-
-    private void handlePowerSaverModeChanged() {
-        mPowerSaverModeOn = mPowerManager.isPowerSaveMode();
-        Blog.v(TAG, "handlePowerSaverModeChanged: %b", mPowerSaverModeOn);
-    }
-
-    private void handleWifiApStateChanged() {
-        mWifiApState = mWifiManager.getWifiApState();
-        Blog.v(TAG, "handleWifiApStateChanged: %d", mWifiApState);
-    }
-
-    private void handleUserRestrictionsChanged() {
-        mWifiConfigRestricted = mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_WIFI);
-        Blog.v(TAG, "handleUserRestrictionsChanged: %b", mWifiConfigRestricted);
-    }
-
-    private void handleConfiguredNetworksChanged() {
-        List<WifiConfiguration> wifiConfigurations = mWifiManager.getConfiguredNetworks();
-        if (wifiConfigurations == null) {
-            return;
-        }
-        Blog.v(TAG, "handleConfiguredNetworksChanged: %d", wifiConfigurations.size());
-
-        mSavedNetworkCounts.clear();
-        mSavedNetworkCounts.total = wifiConfigurations.size();
-        mSavedNetworks.clear();
-        mSavedSsids.clear();
-        for (int i = 0; i < wifiConfigurations.size(); i++) {
-            WifiConfiguration wifiConfiguration = wifiConfigurations.get(i);
-            if (wifiConfiguration.status != WifiConfiguration.Status.ENABLED
-                    && wifiConfiguration.status != WifiConfiguration.Status.CURRENT) {
-                continue; // Ignore networks that are not connected or enabled.
-            }
-            mSavedNetworkCounts.enabled++;
-            if (RoboCompatUtil.getInstance().hasNoInternetAccess(wifiConfiguration)) {
-                mSavedNetworkCounts.noInternetAccess++;
-                continue; // Ignore networks that do not have verified internet access.
-            }
-            if (RoboCompatUtil.getInstance().isNoInternetAccessExpected(wifiConfiguration)) {
-                mSavedNetworkCounts.noInternetAccessExpected++;
-                continue; // Ignore networks that are expected not to have internet access.
-            }
-            String ssid = WifiConfigurationUtil.removeDoubleQuotes(wifiConfiguration);
-            if (TextUtils.isEmpty(ssid)) {
-                continue;
-            }
-            if (WideAreaNetworks.contains(ssid)) {
-                mSavedNetworkCounts.blacklisted++;
-                continue; // Ignore wide area networks.
-            }
-            mSavedNetworks.put(ssid, wifiConfiguration);
-            mSavedSsids.add(ssid);
-
-            if (WifiConfigurationUtil.isConfigForOpenNetwork(wifiConfiguration)) {
-                mSavedNetworkCounts.open++;
-            }
-            if (RoboCompatUtil.getInstance().useExternalScores(wifiConfiguration)) {
-                mSavedNetworkCounts.useExternalScores++;
-            }
-        }
-        mSavedSsidsInLastScan.retainAll(mSavedSsids);
-    }
-
-    private void handleWifiStateChanged(boolean calledOnStart) {
-        mWifiState = mWifiManager.getWifiState();
-        Blog.v(TAG, "handleWifiStateChanged: %d", mWifiState);
-
-        switch (mWifiState) {
-            case WifiManager.WIFI_STATE_ENABLED:
-                mSavedSsidsOnDisable.clear();
-                if (!mAutopilotEnabledWifi) {}
-                break;
-            case WifiManager.WIFI_STATE_DISABLED:
-                if (calledOnStart) {
-                    readDisabledSsidsFromSharedPreferences();
-                } else {
-                    for (String ssid : mSavedSsidsInLastScan) {
-                        mSavedSsidsOnDisable.put(ssid, NUM_SCANS_TO_CONFIRM_AP_LOSS);
-                    }
-                    writeDisabledSsidsToSharedPreferences();
-                }
-                Blog.d(TAG, "Disabled ssid set: %s", mSavedSsidsOnDisable);
-
-                mAutopilotEnabledWifi = false;
-                break;
-            default: // Only handle ENABLED and DISABLED states
-        }
-    }
-
-    private void readDisabledSsidsFromSharedPreferences() {
-        Set<String> ssidsOnDisable = Preferences.savedSsidsOnDisable.get();
-        for (String ssid : mSavedSsids) {
-            if (ssidsOnDisable.contains(HashUtil.getSsidHash(ssid))) {
-                mSavedSsidsOnDisable.put(ssid, NUM_SCANS_TO_CONFIRM_AP_LOSS);
-            }
-        }
-    }
-
-    private void writeDisabledSsidsToSharedPreferences() {
-        Set<String> ssids = new ArraySet<>();
-        for (String ssid : mSavedSsidsOnDisable.keySet()) {
-            ssids.add(HashUtil.getSsidHash(ssid));
-        }
-        Preferences.savedSsidsOnDisable.put(ssids);
-    }
-
-    private void handleScanResultsAvailable() {
-        if (!mWifiWakeupEnabled || mWifiConfigRestricted) {
-            return;
-        }
-        List<ScanResult> scanResults = mWifiManager.getScanResults();
-        if (scanResults == null) {
-            return;
-        }
-        Blog.v(TAG, "handleScanResultsAvailable: %d", scanResults.size());
-
-        mSavedSsidsInLastScan.clear();
-        for (int i = 0; i < scanResults.size(); i++) {
-            String ssid = scanResults.get(i).SSID;
-            if (mSavedSsids.contains(ssid)) {
-                mSavedSsidsInLastScan.add(ssid);
-            }
-        }
-
-        if (mAirplaneModeEnabled
-                || mWifiState != WifiManager.WIFI_STATE_DISABLED
-                || mWifiApState != WifiManager.WIFI_AP_STATE_DISABLED
-                || mPowerSaverModeOn) {
-            return;
-        }
-
-        // Update mSavedSsidsOnDisable to remove ssids that the user has moved away from.
-        for (Map.Entry<String, Integer> entry : mSavedSsidsOnDisable.entrySet()) {
-            if (mSavedSsidsInLastScan.contains(entry.getKey())) {
-                mSavedSsidsOnDisable.put(entry.getKey(), NUM_SCANS_TO_CONFIRM_AP_LOSS);
-            } else {
-                if (entry.getValue() > 1) {
-                    mSavedSsidsOnDisable.put(entry.getKey(), entry.getValue() - 1);
-                } else {
-                    mSavedSsidsOnDisable.remove(entry.getKey());
-                }
-            }
-        }
-
-        if (!mSavedSsidsOnDisable.isEmpty()) {
-            Blog.d(
-                    TAG,
-                    "Scan results contain ssids from the disabled set: %s",
-                    mSavedSsidsOnDisable);
-            return;
-        }
-
-        if (mSavedSsidsInLastScan.isEmpty()) {
-            Blog.v(TAG, "Scan results do not contain any saved ssids.");
-            return;
-        }
-
-        WifiConfiguration selectedNetwork =
-                mWifiWakeupNetworkSelector.selectNetwork(mSavedNetworks, scanResults);
-        if (selectedNetwork != null) {
-            Blog.d(
-                    TAG,
-                    "Enabling wifi for ssid: %s",
-                    Blog.pii(selectedNetwork.SSID, G.Netrec.enableSensitiveLogging.get()));
-
-            mAutopilotEnabledWifi = true;
-            mWifiManager.setWifiEnabled(true /* enabled */);
-            mWifiWakeupHelper.startWifiSession(selectedNetwork);
-        }
-    }
-
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("mStarted " + mStarted.get());
-        pw.println("mWifiWakeupEnabled: " + mWifiWakeupEnabled);
-        pw.println("mSavedSsids: " + mSavedSsids);
-        pw.println("mSavedSsidsInLastScan: " + mSavedSsidsInLastScan);
-        pw.println("mSavedSsidsOnDisable: " + mSavedSsidsOnDisable);
-    }
-
-    /** Class to track counts for saved networks for logging. */
-    private static class SavedNetworkCounts {
-        int total;
-        int open;
-        int enabled;
-        int noInternetAccess;
-        int noInternetAccessExpected;
-        int useExternalScores;
-        int blacklisted;
-
-        void clear() {
-            total = 0;
-            open = 0;
-            enabled = 0;
-            noInternetAccess = 0;
-            noInternetAccessExpected = 0;
-            useExternalScores = 0;
-            blacklisted = 0;
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/wakeup/WifiWakeupHelper.java b/src/com/android/networkrecommendation/wakeup/WifiWakeupHelper.java
deleted file mode 100644
index 8b4da55..0000000
--- a/src/com/android/networkrecommendation/wakeup/WifiWakeupHelper.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.wakeup;
-
-import static com.android.networkrecommendation.Constants.TAG;
-import static com.android.networkrecommendation.util.NotificationChannelUtil.CHANNEL_ID_WAKEUP;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.Resources;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.Handler;
-import android.provider.Settings;
-import android.support.annotation.NonNull;
-import android.support.annotation.VisibleForTesting;
-import android.text.TextUtils;
-import android.util.ArraySet;
-import com.android.networkrecommendation.R;
-import com.android.networkrecommendation.config.G;
-import com.android.networkrecommendation.config.Preferences;
-import com.android.networkrecommendation.scoring.util.HashUtil;
-import com.android.networkrecommendation.util.Blog;
-import com.android.networkrecommendation.util.NotificationChannelUtil;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Helper class for logging Wi-Fi Wakeup sessions and showing showing notifications for {@link
- * WifiWakeupController}.
- */
-public class WifiWakeupHelper {
-    /** Unique ID used for the Wi-Fi Enabled notification. */
-    private static final int NOTIFICATION_ID = R.string.wifi_wakeup_enabled_notification_title;
-
-    @VisibleForTesting
-    static final String ACTION_WIFI_SETTINGS =
-            "com.android.networkrecommendation.wakeup.ACTION_WIFI_SETTINGS";
-
-    @VisibleForTesting
-    static final String ACTION_DISMISS_WIFI_ENABLED_NOTIFICATION =
-            "com.android.networkrecommendation.wakeup.ACTION_DISMISS_WIFI_ENABLED_NOTIFICATION";
-
-    private static final long NETWORK_CONNECTED_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(30);
-    private static final IntentFilter INTENT_FILTER = new IntentFilter();
-
-    static {
-        INTENT_FILTER.addAction(ACTION_DISMISS_WIFI_ENABLED_NOTIFICATION);
-        INTENT_FILTER.addAction(ACTION_WIFI_SETTINGS);
-        INTENT_FILTER.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-    }
-
-    private final Context mContext;
-    private final Resources mResources;
-    private final NotificationManager mNotificationManager;
-    private final Handler mHandler;
-    private final WifiManager mWifiManager;
-
-    /** Whether the wakeup notification is currently displayed. */
-    private boolean mNotificationShown;
-    /** True when the device is still connected to the first connected ssid since wakeup. */
-    private boolean mWifiSessionStarted;
-    /** The first connected ssid after wakeup enabled wifi. */
-    private String mConnectedSsid;
-
-    private final BroadcastReceiver mBroadcastReceiver =
-            new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    try {
-                        if (ACTION_WIFI_SETTINGS.equals(intent.getAction())) {
-                            mContext.startActivity(
-                                    new Intent(Settings.ACTION_WIFI_SETTINGS)
-                                            .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
-                        } else if (ACTION_DISMISS_WIFI_ENABLED_NOTIFICATION.equals(
-                                intent.getAction())) {
-                            cancelNotificationIfNeeded();
-                        } else if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(
-                                intent.getAction())) {
-                            networkStateChanged();
-                        }
-                    } catch (RuntimeException re) {
-                        // TODO(b/35044022) Remove try/catch after a couple of releases when we are confident
-                        // this is not going to throw.
-                        Blog.e(TAG, re, "RuntimeException in broadcast receiver.");
-                    }
-                }
-            };
-
-    public WifiWakeupHelper(
-            Context context,
-            Resources resources,
-            Handler handler,
-            NotificationManager notificationManager,
-            WifiManager wifiManager) {
-        mContext = context;
-        mResources = resources;
-        mNotificationManager = notificationManager;
-        mHandler = handler;
-        mWifiManager = wifiManager;
-        mWifiSessionStarted = false;
-        mNotificationShown = false;
-        mConnectedSsid = null;
-    }
-
-    /**
-     * Start tracking a wifi wakeup session. Optionally show a notification that Wi-Fi has been
-     * enabled by Wi-Fi Wakeup if one has not been displayed for this {@link WifiConfiguration}.
-     *
-     * @param wifiConfiguration the {@link WifiConfiguration} that triggered Wi-Fi to wakeup
-     */
-    public void startWifiSession(@NonNull WifiConfiguration wifiConfiguration) {
-        mContext.registerReceiver(
-                mBroadcastReceiver, INTENT_FILTER, null /* broadcastPermission*/, mHandler);
-        mWifiSessionStarted = true;
-        mHandler.postDelayed(
-                () -> {
-                    if (mWifiSessionStarted && mConnectedSsid == null) {
-                        endWifiSession();
-                    }
-                },
-                NETWORK_CONNECTED_TIMEOUT_MILLIS);
-
-        Set<String> hashedSsidSet = Preferences.ssidsForWakeupShown.get();
-        String hashedSsid = HashUtil.getSsidHash(wifiConfiguration.SSID);
-        if (hashedSsidSet.isEmpty()) {
-            hashedSsidSet = new ArraySet<>();
-        } else if (hashedSsidSet.contains(hashedSsid)) {
-            Blog.i(
-                    TAG,
-                    "Already showed Wi-Fi Enabled notification for ssid: %s",
-                    Blog.pii(wifiConfiguration.SSID, G.Netrec.enableSensitiveLogging.get()));
-            return;
-        }
-        hashedSsidSet.add(hashedSsid);
-        Preferences.ssidsForWakeupShown.put(hashedSsidSet);
-
-        String title = mResources.getString(R.string.wifi_wakeup_enabled_notification_title);
-        String summary =
-                mResources.getString(
-                        R.string.wifi_wakeup_enabled_notification_context, wifiConfiguration.SSID);
-        PendingIntent savedNetworkSettingsPendingIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(ACTION_WIFI_SETTINGS),
-                        PendingIntent.FLAG_UPDATE_CURRENT);
-        PendingIntent deletePendingIntent =
-                PendingIntent.getBroadcast(
-                        mContext,
-                        0,
-                        new Intent(ACTION_DISMISS_WIFI_ENABLED_NOTIFICATION),
-                        PendingIntent.FLAG_UPDATE_CURRENT);
-        Bundle extras = new Bundle();
-        extras.putString(
-                Notification.EXTRA_SUBSTITUTE_APP_NAME,
-                mResources.getString(R.string.notification_channel_group_name));
-        int smallIcon = R.drawable.ic_signal_wifi_statusbar_not_connected;
-        Notification.Builder notificationBuilder =
-                new Notification.Builder(mContext)
-                        .setContentTitle(title)
-                        .setSmallIcon(smallIcon)
-                        .setColor(mContext.getColor(R.color.color_tint))
-                        .setStyle(new Notification.BigTextStyle().bigText(summary))
-                        .setAutoCancel(true)
-                        .setShowWhen(false)
-                        .setDeleteIntent(deletePendingIntent)
-                        .setPriority(Notification.PRIORITY_LOW)
-                        .setVisibility(Notification.VISIBILITY_PUBLIC)
-                        .setCategory(Notification.CATEGORY_STATUS)
-                        .setContentIntent(savedNetworkSettingsPendingIntent)
-                        .setLocalOnly(true)
-                        .addExtras(extras);
-        NotificationChannelUtil.setChannel(notificationBuilder, CHANNEL_ID_WAKEUP);
-        mNotificationManager.notify(TAG, NOTIFICATION_ID, notificationBuilder.build());
-        mNotificationShown = true;
-    }
-
-    private void networkStateChanged() {
-        if (!mWifiManager.isWifiEnabled()) {
-            endWifiSession();
-            return;
-        }
-
-        WifiInfo wifiInfo = mWifiManager.getConnectionInfo();
-        String ssid = wifiInfo == null ? null : wifiInfo.getSSID();
-        if (mConnectedSsid == null) {
-            if (!TextUtils.isEmpty(ssid)) {
-                mConnectedSsid = ssid;
-            }
-        } else if (!TextUtils.equals(ssid, mConnectedSsid)) {
-            endWifiSession();
-        }
-    }
-
-    private void endWifiSession() {
-        if (mWifiSessionStarted) {
-            mWifiSessionStarted = false;
-            cancelNotificationIfNeeded();
-            mConnectedSsid = null;
-            mContext.unregisterReceiver(mBroadcastReceiver);
-        }
-    }
-
-    private void cancelNotificationIfNeeded() {
-        if (mNotificationShown) {
-            mNotificationShown = false;
-            mNotificationManager.cancel(TAG, NOTIFICATION_ID);
-        }
-    }
-}
diff --git a/src/com/android/networkrecommendation/wakeup/WifiWakeupNetworkSelector.java b/src/com/android/networkrecommendation/wakeup/WifiWakeupNetworkSelector.java
deleted file mode 100644
index 61ed2cb..0000000
--- a/src/com/android/networkrecommendation/wakeup/WifiWakeupNetworkSelector.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.networkrecommendation.wakeup;
-
-import android.content.res.Resources;
-import android.net.RecommendationRequest;
-import android.net.RecommendationResult;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.support.annotation.Nullable;
-import android.util.ArraySet;
-import com.android.networkrecommendation.R;
-import com.android.networkrecommendation.SynchronousNetworkRecommendationProvider;
-import com.android.networkrecommendation.util.RoboCompatUtil;
-import com.android.networkrecommendation.util.ScanResultUtil;
-import com.android.networkrecommendation.util.WifiConfigurationUtil;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/** This class determines which network the framework would connect to if Wi-Fi was enabled. */
-public class WifiWakeupNetworkSelector {
-    private final int mThresholdQualifiedRssi24;
-    private final int mThresholdQualifiedRssi5;
-    private final int mRssiScoreSlope;
-    private final int mRssiScoreOffset;
-    private final int mPasspointSecurityAward;
-    private final int mSecurityAward;
-    private final int mBand5GHzAward;
-    private final int mThresholdSaturatedRssi24;
-    private final SynchronousNetworkRecommendationProvider mNetworkRecommendationProvider;
-
-    public WifiWakeupNetworkSelector(
-            Resources resources,
-            SynchronousNetworkRecommendationProvider networkRecommendationProvider) {
-        mThresholdQualifiedRssi24 =
-                resources.getInteger(R.integer.config_netrec_wifi_score_low_rssi_threshold_24GHz);
-        mThresholdQualifiedRssi5 =
-                resources.getInteger(R.integer.config_netrec_wifi_score_low_rssi_threshold_5GHz);
-        mRssiScoreSlope = resources.getInteger(R.integer.config_netrec_RSSI_SCORE_SLOPE);
-        mRssiScoreOffset = resources.getInteger(R.integer.config_netrec_RSSI_SCORE_OFFSET);
-        mPasspointSecurityAward =
-                resources.getInteger(R.integer.config_netrec_PASSPOINT_SECURITY_AWARD);
-        mSecurityAward = resources.getInteger(R.integer.config_netrec_SECURITY_AWARD);
-        mBand5GHzAward = resources.getInteger(R.integer.config_netrec_5GHz_preference_boost_factor);
-        mThresholdSaturatedRssi24 =
-                resources.getInteger(R.integer.config_netrec_wifi_score_good_rssi_threshold_24GHz);
-        mNetworkRecommendationProvider = networkRecommendationProvider;
-    }
-
-    /** Returns the network that the framework would most likely connect to if Wi-Fi was enabled. */
-    @Nullable
-    public WifiConfiguration selectNetwork(
-            Map<String, WifiConfiguration> savedNetworks, List<ScanResult> scanResults) {
-        Set<WifiConfiguration> openOrExternalConfigs = new ArraySet<>();
-        List<ScanResult> openOrExternalScanResults = new ArrayList<>();
-        WifiConfiguration candidateWifiConfiguration = null;
-        ScanResult candidateScanResult = null;
-        int candidateScore = -1;
-        for (int i = 0; i < scanResults.size(); i++) {
-            ScanResult scanResult = scanResults.get(i);
-            WifiConfiguration wifiConfiguration = savedNetworks.get(scanResult.SSID);
-            if (wifiConfiguration == null) {
-                continue;
-            }
-            if ((ScanResultUtil.is5GHz(scanResult) && scanResult.level < mThresholdQualifiedRssi5)
-                    || (ScanResultUtil.is24GHz(scanResult)
-                            && scanResult.level < mThresholdQualifiedRssi24)) {
-                continue;
-            }
-            if (!ScanResultUtil.doesScanResultMatchWithNetwork(scanResult, wifiConfiguration)) {
-                continue;
-            }
-            if (WifiConfigurationUtil.isConfigForOpenNetwork(wifiConfiguration)
-                    || RoboCompatUtil.getInstance().useExternalScores(wifiConfiguration)) {
-                // All open and externally scored networks should defer to network recommendations.
-                openOrExternalConfigs.add(wifiConfiguration);
-                openOrExternalScanResults.add(scanResult);
-                continue;
-            }
-            int score = calculateScore(scanResult, wifiConfiguration);
-            if (candidateScanResult == null
-                    || calculateScore(scanResult, wifiConfiguration) > candidateScore) {
-                candidateScanResult = scanResult;
-                candidateWifiConfiguration = wifiConfiguration;
-                candidateScore = score;
-            }
-        }
-        if (candidateWifiConfiguration == null && !openOrExternalConfigs.isEmpty()) {
-            // TODO(netrec): Add connectableConfigs after next SystemApi drop
-            RecommendationRequest request =
-                    new RecommendationRequest.Builder()
-                            .setScanResults(openOrExternalScanResults.toArray(new ScanResult[0]))
-                            .build();
-            RecommendationResult result =
-                    mNetworkRecommendationProvider.requestRecommendation(request);
-            return result.getWifiConfiguration();
-        }
-        return candidateWifiConfiguration;
-    }
-
-    private int calculateScore(ScanResult scanResult, WifiConfiguration wifiConfiguration) {
-        int score = 0;
-        // Calculate the RSSI score.
-        int rssi =
-                scanResult.level <= mThresholdSaturatedRssi24
-                        ? scanResult.level
-                        : mThresholdSaturatedRssi24;
-        score += (rssi + mRssiScoreOffset) * mRssiScoreSlope;
-
-        // 5GHz band bonus.
-        if (ScanResultUtil.is5GHz(scanResult)) {
-            score += mBand5GHzAward;
-        }
-
-        // Security award.
-        if (RoboCompatUtil.getInstance().isPasspoint(wifiConfiguration)) {
-            score += mPasspointSecurityAward;
-        } else if (!WifiConfigurationUtil.isConfigForOpenNetwork(wifiConfiguration)) {
-            score += mSecurityAward;
-        }
-
-        return score;
-    }
-}
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
deleted file mode 100644
index 787d4d8..0000000
--- a/tests/AndroidTest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<configuration description="Run Tests for NetworkRecommendation.">
-    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
-        <option name="test-file-name" value="NetworkRecommendationTests.apk" />
-    </target_preparer>
-
-    <option name="test-suite-tag" value="apct" />
-    <option name="test-tag" value="NetworkRecommendationTests" />
-    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
-        <option name="package" value="com.android.networkrecommendation.tests" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
-    </test>
-</configuration>