Compile NetworkRecommendation with the system jar. am: f3811fdd2f
am: 6589ef9d68

Change-Id: Ifc14b10a5e8b486c0433430d6557de29edb7121f
diff --git a/Android.mk b/Android.mk
index b84749d..48bce25 100644
--- a/Android.mk
+++ b/Android.mk
@@ -3,6 +3,8 @@
 
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-support-annotations \
+    guava \
+    jsr305 \
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
@@ -11,6 +13,8 @@
 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
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index c7de545..881c8c5 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -22,7 +22,7 @@
     <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.INTERACT_ACROSS_USERS"/>
+    <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"/>
diff --git a/res/drawable/ic_signal_wifi_badged_0_bars.xml b/res/drawable/ic_signal_wifi_badged_0_bars.xml
new file mode 100644
index 0000000..bd1eb41
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_0_bars.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..aedb12c
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_1_bar.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..6f07cb5
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_2_bars.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..c41a8ca
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_3_bars.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..ec0a52f
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_4_bars.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..78bd0a0
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_4k.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..78085c2
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_hd.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..f660ab7
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_ld.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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
new file mode 100644
index 0000000..43b8653
--- /dev/null
+++ b/res/drawable/ic_signal_wifi_badged_sd.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 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/stat_notify_wifi_in_range.xml b/res/drawable/stat_notify_wifi_in_range.xml
new file mode 100644
index 0000000..a271ca5
--- /dev/null
+++ b/res/drawable/stat_notify_wifi_in_range.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2014 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/strings.xml b/res/values/strings.xml
index 98ddce0..3453343 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -24,4 +24,6 @@
     <string name="wifi_available_connecting">Connecting</string>
     <string name="wifi_available_connected">Connected</string>
     <string name="wifi_available_failed">FAILED TO CONNECT</string>
+
+    <string name="android_system_label">Android System</string>
 </resources>
diff --git a/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java b/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java
index 5698e7d..1b58ace 100644
--- a/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java
+++ b/src/com/android/networkrecommendation/DefaultNetworkRecommendationProvider.java
@@ -28,18 +28,18 @@
 import android.net.wifi.WifiConfiguration;
 import android.os.Bundle;
 import android.os.Handler;
+import android.support.annotation.VisibleForTesting;
 import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.Log;
 
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
-
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.annotation.concurrent.GuardedBy;
+
 /**
  * In memory, debuggable network recommendation provider.
  *
@@ -161,7 +161,8 @@
                 }
 
                 final NetworkKey networkKey = new NetworkKey(
-                        new WifiKey(quoteSsid(scanResult), scanResult.BSSID));
+                        new WifiKey(ScanResultUtil.createQuotedSSID(scanResult.SSID),
+                                scanResult.BSSID));
                 if (VERBOSE) Log.v(TAG, "Evaluating network: " + networkKey);
 
                 // We will only score networks we know about.
@@ -198,7 +199,7 @@
         } else {
             // Build a configuration based on the scan.
             WifiConfiguration recommendedConfig = new WifiConfiguration();
-            recommendedConfig.SSID = quoteSsid(recommendedScanResult);
+            recommendedConfig.SSID = ScanResultUtil.createQuotedSSID(recommendedScanResult.SSID);
             recommendedConfig.BSSID = recommendedScanResult.BSSID;
             recommendedConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
             recommendationResult = RecommendationResult
@@ -351,25 +352,10 @@
                 .append("ID=").append(config.networkId)
                 .append(",SSID=").append(config.SSID)
                 .append(",useExternalScores=").append(config.useExternalScores)
-                .append(",meteredHint=").append(config.meteredHint)
-                .append(",meteredOverride=").append(config.meteredOverride);
+                .append(",meteredHint=").append(config.meteredHint);
         return sb.toString();
     }
 
-    /**
-     * Add quotes to ScanResult ssids. WifiConfigurations, WifiKeys and ScoredNetworks have the
-     * SSID quoted but scan results don't.
-     */
-    private static String quoteSsid(ScanResult scanResult) {
-        if (scanResult.wifiSsid != null) {
-            return "\"" + scanResult.wifiSsid + "\"";
-        } else if (scanResult.SSID != null) {
-            return "\"" + scanResult.SSID + "\"";
-        } else {
-            throw new IllegalArgumentException("ScanResult is missing an SSID.");
-        }
-    }
-
     /** Stores scores about networks. Initial implementation is in-memory-only. */
     @VisibleForTesting
     static class ScoreStorage {
diff --git a/src/com/android/networkrecommendation/ImageUtils.java b/src/com/android/networkrecommendation/ImageUtils.java
new file mode 100644
index 0000000..4b3d042
--- /dev/null
+++ b/src/com/android/networkrecommendation/ImageUtils.java
@@ -0,0 +1,62 @@
+/*
+ * 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.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+
+/** Helper for image manipulation */
+public class ImageUtils {
+
+    /**
+     * Convert a drawable to a bitmap, scaled to fit within maxWidth and maxHeight.
+     */
+    public static Bitmap buildScaledBitmap(Drawable drawable, int maxWidth,
+            int maxHeight) {
+        if (drawable == null) {
+            return null;
+        }
+        int originalWidth = drawable.getIntrinsicWidth();
+        int originalHeight = drawable.getIntrinsicHeight();
+
+        if ((originalWidth <= maxWidth) && (originalHeight <= maxHeight)
+                && (drawable instanceof BitmapDrawable)) {
+            return ((BitmapDrawable) drawable).getBitmap();
+        }
+        if (originalHeight <= 0 || originalWidth <= 0) {
+            return null;
+        }
+
+        // create a new bitmap, scaling down to fit the max dimensions of
+        // a large notification icon if necessary
+        float ratio = Math.min((float) maxWidth / (float) originalWidth,
+                (float) maxHeight / (float) originalHeight);
+        ratio = Math.min(1.0f, ratio);
+        int scaledWidth = (int) (ratio * originalWidth);
+        int scaledHeight = (int) (ratio * originalHeight);
+        Bitmap result = Bitmap.createBitmap(scaledWidth, scaledHeight, Bitmap.Config.ARGB_8888);
+
+        // and paint our app bitmap on it
+        Canvas canvas = new Canvas(result);
+        drawable.setBounds(0, 0, scaledWidth, scaledHeight);
+        drawable.draw(canvas);
+
+        return result;
+    }
+}
diff --git a/src/com/android/networkrecommendation/ScanResultUtil.java b/src/com/android/networkrecommendation/ScanResultUtil.java
index c62f707..08b71d0 100644
--- a/src/com/android/networkrecommendation/ScanResultUtil.java
+++ b/src/com/android/networkrecommendation/ScanResultUtil.java
@@ -18,10 +18,9 @@
 
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
+import android.support.annotation.VisibleForTesting;
 import android.text.TextUtils;
 
-import com.android.internal.annotations.VisibleForTesting;
-
 /**
  * Scan result utility for any {@link ScanResult} related operations.
  * TODO(b/34125341): Delete this class once exposed as a SystemApi
@@ -71,6 +70,26 @@
         return "\"" + ssid + "\"";
     }
 
+    /** @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.
diff --git a/src/com/android/networkrecommendation/WifiConfigurationUtil.java b/src/com/android/networkrecommendation/WifiConfigurationUtil.java
index e65ecba..d653a4f 100644
--- a/src/com/android/networkrecommendation/WifiConfigurationUtil.java
+++ b/src/com/android/networkrecommendation/WifiConfigurationUtil.java
@@ -65,4 +65,25 @@
         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/WifiNotificationController.java b/src/com/android/networkrecommendation/WifiNotificationController.java
index c8cf1f8..11bb8ac 100644
--- a/src/com/android/networkrecommendation/WifiNotificationController.java
+++ b/src/com/android/networkrecommendation/WifiNotificationController.java
@@ -16,7 +16,6 @@
 
 package com.android.networkrecommendation;
 
-import android.annotation.Nullable;
 import android.app.Notification;
 import android.app.NotificationManager;
 import android.content.BroadcastReceiver;
@@ -34,8 +33,8 @@
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
 import android.os.Handler;
-import android.os.UserHandle;
 import android.provider.Settings;
+import android.support.annotation.Nullable;
 import android.support.annotation.VisibleForTesting;
 
 import java.io.FileDescriptor;
@@ -53,8 +52,7 @@
      * The icon to show in the 'available networks' notification. This will also
      * be the ID of the Notification given to the NotificationManager.
      */
-    private static final int ICON_NETWORKS_AVAILABLE =
-            com.android.internal.R.drawable.stat_notify_wifi_in_range;
+    private static final int ICON_NETWORKS_AVAILABLE = R.drawable.stat_notify_wifi_in_range;
     /**
      * When a notification is shown, we wait this amount before possibly showing it again.
      */
@@ -393,8 +391,7 @@
     }
 
     private void postNotification(Notification notification) {
-        mNotificationManager.notifyAsUser(null /* tag */, ICON_NETWORKS_AVAILABLE,
-                notification, UserHandle.ALL);
+        mNotificationManager.notify(null /* tag */, ICON_NETWORKS_AVAILABLE, notification);
     }
 
     /**
@@ -410,7 +407,7 @@
     }
 
     private void removeNotification() {
-        mNotificationManager.cancelAsUser(null /* tag */, ICON_NETWORKS_AVAILABLE, UserHandle.ALL);
+        mNotificationManager.cancel(null /* tag */, ICON_NETWORKS_AVAILABLE);
         mNotificationShown = false;
     }
 
diff --git a/src/com/android/networkrecommendation/WifiNotificationHelper.java b/src/com/android/networkrecommendation/WifiNotificationHelper.java
index b8fc0f0..4408804 100644
--- a/src/com/android/networkrecommendation/WifiNotificationHelper.java
+++ b/src/com/android/networkrecommendation/WifiNotificationHelper.java
@@ -18,7 +18,6 @@
 
 import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
 
-import android.annotation.NonNull;
 import android.app.Notification;
 import android.app.Notification.Action;
 import android.app.PendingIntent;
@@ -34,15 +33,13 @@
 import android.net.WifiKey;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Bundle;
+import android.support.annotation.NonNull;
 import android.text.Spannable;
 import android.text.SpannableString;
 import android.text.style.ForegroundColorSpan;
 
-import com.android.internal.util.ImageUtils;
-
 import java.util.List;
 
 /**
@@ -148,41 +145,39 @@
                 FLAG_UPDATE_CURRENT);
         return new Notification.Builder(mContext)
                 .setDeleteIntent(deleteIntent)
-                .setSmallIcon(com.android.internal.R.drawable.stat_notify_wifi_in_range)
+                .setSmallIcon(R.drawable.stat_notify_wifi_in_range)
                 .setLargeIcon(badge)
                 .setAutoCancel(true)
-                .setColor(mContext.getColor(
-                        com.android.internal.R.color.system_notification_accent_color))
                 .setTicker(title)
                 .setContentTitle(title)
-                .setContentText(config.getPrintableSsid())
+                .setContentText(WifiConfigurationUtil.getPrintableSsid(config))
                 .addExtras(getSystemLabelExtras());
     }
 
     private Bundle getSystemLabelExtras() {
         Bundle extras = new Bundle();
         extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
-                mContext.getString(com.android.internal.R.string.android_system_label));
+                mContext.getString(R.string.android_system_label));
         return extras;
     }
 
     //TODO(34177812): Share this logic between systemUi and Settings.
     static final int[] WIFI_PIE_FOR_BADGING = {
-            com.android.internal.R.drawable.ic_signal_wifi_badged_0_bars,
-            com.android.internal.R.drawable.ic_signal_wifi_badged_1_bar,
-            com.android.internal.R.drawable.ic_signal_wifi_badged_2_bars,
-            com.android.internal.R.drawable.ic_signal_wifi_badged_3_bars,
-            com.android.internal.R.drawable.ic_signal_wifi_badged_4_bars
+            R.drawable.ic_signal_wifi_badged_0_bars,
+            R.drawable.ic_signal_wifi_badged_1_bar,
+            R.drawable.ic_signal_wifi_badged_2_bars,
+            R.drawable.ic_signal_wifi_badged_3_bars,
+            R.drawable.ic_signal_wifi_badged_4_bars
     };
 
     private int getWifiBadgeResourceForEnum(int badgeEnum) {
         switch (badgeEnum) {
             case ScoredNetwork.BADGING_SD:
-                return com.android.internal.R.drawable.ic_signal_wifi_badged_sd;
+                return R.drawable.ic_signal_wifi_badged_sd;
             case ScoredNetwork.BADGING_HD:
-                return com.android.internal.R.drawable.ic_signal_wifi_badged_hd;
+                return R.drawable.ic_signal_wifi_badged_hd;
             case ScoredNetwork.BADGING_4K:
-                return com.android.internal.R.drawable.ic_signal_wifi_badged_4k;
+                return R.drawable.ic_signal_wifi_badged_4k;
             default:
                 throw new IllegalArgumentException("No badge resource for enum :" + badgeEnum);
         }
@@ -222,7 +217,7 @@
 
     private ScanResult findMatchingScanResult(List<ScanResult> scanResults,
             WifiConfiguration wifiConfiguration) {
-        String ssid = WifiInfo.removeDoubleQuotes(wifiConfiguration.SSID);
+        String ssid = WifiConfigurationUtil.removeDoubleQuotes(wifiConfiguration);
         String bssid = wifiConfiguration.BSSID;
         for (ScanResult scanResult : scanResults) {
             if (ssid.equals(scanResult.SSID) && bssid.equals(scanResult.BSSID)) {
diff --git a/src/com/android/networkrecommendation/WifiWakeupController.java b/src/com/android/networkrecommendation/WifiWakeupController.java
index 7354106..d1ac74a 100644
--- a/src/com/android/networkrecommendation/WifiWakeupController.java
+++ b/src/com/android/networkrecommendation/WifiWakeupController.java
@@ -24,18 +24,16 @@
 import android.database.ContentObserver;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.os.Handler;
 import android.os.Looper;
 import android.provider.Settings;
+import android.support.annotation.VisibleForTesting;
 import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 import android.util.Log;
 
-import com.android.internal.annotations.VisibleForTesting;
-
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.List;
@@ -161,15 +159,14 @@
         for (int i = 0; i < wifiConfigurations.size(); i++) {
             WifiConfiguration wifiConfiguration = wifiConfigurations.get(i);
             if (wifiConfiguration.status != WifiConfiguration.Status.ENABLED
-                    || wifiConfiguration.ephemeral
                     || wifiConfiguration.useExternalScores) {
-                continue; // Ignore disabled, ephemeral and externally scored networks.
+                continue; // Ignore disabled and externally scored networks.
             }
             if (wifiConfiguration.hasNoInternetAccess()
-                    || wifiConfiguration.noInternetAccessExpected) {
+                    || wifiConfiguration.isNoInternetAccessExpected()) {
                 continue; // Ignore networks that will likely not have internet access.
             }
-            String ssid = WifiInfo.removeDoubleQuotes(wifiConfiguration.SSID);
+            String ssid = WifiConfigurationUtil.removeDoubleQuotes(wifiConfiguration);
             if (TextUtils.isEmpty(ssid)) {
                 continue;
             }
diff --git a/src/com/android/networkrecommendation/WifiWakeupNetworkSelector.java b/src/com/android/networkrecommendation/WifiWakeupNetworkSelector.java
index 730ef4c..94fce56 100644
--- a/src/com/android/networkrecommendation/WifiWakeupNetworkSelector.java
+++ b/src/com/android/networkrecommendation/WifiWakeupNetworkSelector.java
@@ -69,8 +69,9 @@
             if (wifiConfiguration == null) {
                 continue;
             }
-            if (scanResult.is5GHz() && scanResult.level < mThresholdQualifiedRssi5
-                    || scanResult.is24GHz() && scanResult.level < mThresholdQualifiedRssi24) {
+            if (ScanResultUtil.is5GHz(scanResult) && scanResult.level < mThresholdQualifiedRssi5
+                    || ScanResultUtil.is24GHz(scanResult)
+                    && scanResult.level < mThresholdQualifiedRssi24) {
                 continue;
             }
             if (!ScanResultUtil.doesScanResultMatchWithNetwork(scanResult, wifiConfiguration)) {
@@ -95,7 +96,7 @@
         score += (rssi + mRssiScoreOffset) * mRssiScoreSlope;
 
         // 5GHz band bonus.
-        if (scanResult.is5GHz()) {
+        if (ScanResultUtil.is5GHz(scanResult)) {
             score += mBand5GHzAward;
         }
 
diff --git a/tests/Android.mk b/tests/Android.mk
index a522fbc..b5759f3 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -3,7 +3,10 @@
 
 LOCAL_MODULE_TAGS := tests
 
-LOCAL_STATIC_JAVA_LIBRARIES := android-support-test \
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android-support-test \
+    guava \
+    jsr305 \
     mockito-target
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index f8c656c..3ebaaf3 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -17,6 +17,9 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.networkrecommendation.tests">
 
+    <uses-permission android:name="android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE"/>
+    <uses-permission android:name="android.permission.REQUEST_NETWORK_SCORES"/>
+
     <application>
         <uses-library android:name="android.test.runner" />
     </application>