diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 3933b9c..871f609 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2973,11 +2973,16 @@
             android:label="@string/settings_panel_title"
             android:theme="@style/Theme.BottomDialog"
             android:excludeFromRecents="true"
-            android:launchMode="singleTask">
+            android:launchMode="singleTask"
+            android:exported="true">
                  <intent-filter>
-                     <action android:name="android.settings.SETTINGSPANEL" />
+                     <action android:name="android.settings.panel.action.INTERNET_CONNECTIVITY" />
                      <category android:name="android.intent.category.DEFAULT" />
                  </intent-filter>
+                <intent-filter>
+                    <action android:name="android.settings.panel.action.VOLUME" />
+                    <category android:name="android.intent.category.DEFAULT" />
+                </intent-filter>
         </activity>
 
         <provider android:name=".slices.SettingsSliceProvider"
diff --git a/res/layout/face_enroll_accessibility_toggle.xml b/res/layout/face_enroll_accessibility_toggle.xml
new file mode 100644
index 0000000..4dda2a7
--- /dev/null
+++ b/res/layout/face_enroll_accessibility_toggle.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 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.
+-->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingEnd="16dp"
+    android:paddingStart="16dp">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/title"/>
+
+    <Space
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        android:layout_weight="1"/>
+
+    <View
+        android:layout_width="1dp"
+        android:layout_height="match_parent"
+        android:background="?android:attr/listDivider" />
+
+    <Switch
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/toggle"
+        android:checked="true"/>
+
+</LinearLayout>
diff --git a/res/layout/face_enroll_introduction.xml b/res/layout/face_enroll_introduction.xml
index 7a5c172..025c239 100644
--- a/res/layout/face_enroll_introduction.xml
+++ b/res/layout/face_enroll_introduction.xml
@@ -18,6 +18,7 @@
 <com.google.android.setupdesign.GlifLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:FaceEnrollAccessibilitySwitch="http://schemas.android.com/apk/res/com.android.settings"
     style="?attr/face_layout_theme"
     android:id="@+id/setup_wizard_layout"
     android:layout_width="match_parent"
@@ -59,6 +60,41 @@
 
         </com.google.android.setupdesign.view.FillContentLayout>
 
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center">
+            <Button
+                android:id="@+id/accessibility_button"
+                style="@style/SuwGlifButton.Secondary"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/security_settings_face_enroll_introduction_accessibility" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:id="@+id/accessibility_layout"
+                android:orientation="vertical"
+                android:visibility="invisible">
+
+                <com.android.settings.biometrics.face.FaceEnrollAccessibilityToggle
+                    android:id="@+id/toggle_diversity"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    FaceEnrollAccessibilitySwitch:messageText="@string/security_settings_face_enroll_introduction_accessibility_diversity"/>
+
+                <com.android.settings.biometrics.face.FaceEnrollAccessibilityToggle
+                    android:id="@+id/toggle_vision"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    FaceEnrollAccessibilitySwitch:messageText="@string/security_settings_face_enroll_introduction_accessibility_vision"/>
+
+            </LinearLayout>
+        </FrameLayout>
+
     </LinearLayout>
 
 </com.google.android.setupdesign.GlifLayout>
diff --git a/res/layout/panel_layout.xml b/res/layout/panel_layout.xml
index a6f62a4..c466ce8 100644
--- a/res/layout/panel_layout.xml
+++ b/res/layout/panel_layout.xml
@@ -22,7 +22,7 @@
               android:orientation="vertical">
 
     <TextView
-        android:id="@+id/title"
+        android:id="@+id/panel_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:gravity="center"
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 383506d..806e148 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -146,6 +146,11 @@
         <attr name="thickness" format="dimension" />
     </declare-styleable>
 
+    <!-- For Face enroll accessibility toggle -->
+    <declare-styleable name="FaceEnrollAccessibilityToggle">
+        <attr name="messageText" format="reference" />
+    </declare-styleable>
+
     <!-- For TwoStatesButtonPreference -->
     <declare-styleable name="TwoStateButtonPreference">
         <attr name="textOn" format="reference" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d07cc53..da05a41 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -877,6 +877,12 @@
     <string name="security_settings_face_preference_summary_none">Tap to set up face authentication</string>
     <!-- Title shown for menu item that launches face settings or enrollment. [CHAR LIMIT=32] -->
     <string name="security_settings_face_preference_title">Face authentication</string>
+    <!-- Button shown which shows accessibility toggles for face enrollment when clicked. [CHAR LIMIT=32] -->
+    <string name="security_settings_face_enroll_introduction_accessibility">Use accessibility setup</string>
+    <!-- Message shown for a toggle which when disabled, allows the user to enroll using a simpler flow for accessibility [CHAR LIMIT=NONE] -->
+    <string name="security_settings_face_enroll_introduction_accessibility_diversity"></string>
+    <!-- Message shown for a toggle which when disabled, allows the user to enroll using a simpler flow for accessibility [CHAR LIMIT=NONE] -->
+    <string name="security_settings_face_enroll_introduction_accessibility_vision"></string>
     <!-- Button text to cancel enrollment from the introduction [CHAR LIMIT=22] -->
     <string name="security_settings_face_enroll_introduction_cancel">Cancel</string>
     <!-- Introduction title shown in face enrollment to introduce the face unlock feature [CHAR LIMIT=40] -->
diff --git a/src/com/android/settings/biometrics/BiometricEnrollBase.java b/src/com/android/settings/biometrics/BiometricEnrollBase.java
index 2597b29..7a06671 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollBase.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollBase.java
@@ -40,8 +40,10 @@
  */
 public abstract class BiometricEnrollBase extends InstrumentedActivity
         implements View.OnClickListener {
-    public static final String EXTRA_KEY_LAUNCHED_CONFIRM = "launched_confirm_lock";
 
+    public static final String EXTRA_KEY_LAUNCHED_CONFIRM = "launched_confirm_lock";
+    public static final String EXTRA_KEY_REQUIRE_VISION = "accessibility_vision";
+    public static final String EXTRA_KEY_REQUIRE_DIVERSITY = "accessibility_diversity";
 
     /**
      * Used by the choose fingerprint wizard to indicate the wizard is
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollAccessibilityToggle.java b/src/com/android/settings/biometrics/face/FaceEnrollAccessibilityToggle.java
new file mode 100644
index 0000000..49f4f7f
--- /dev/null
+++ b/src/com/android/settings/biometrics/face/FaceEnrollAccessibilityToggle.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2018 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.settings.biometrics.face;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.LinearLayout;
+import android.widget.Switch;
+import android.widget.TextView;
+
+import com.android.settings.R;
+
+/**
+ * A layout that contains a start-justified title, and an end-justified switch.
+ */
+public class FaceEnrollAccessibilityToggle extends LinearLayout {
+
+    private Switch mSwitch;
+
+    public FaceEnrollAccessibilityToggle(Context context) {
+        this(context, null /* attrs */);
+    }
+
+    public FaceEnrollAccessibilityToggle(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public FaceEnrollAccessibilityToggle(Context context, AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+
+        LayoutInflater.from(context).inflate(R.layout.face_enroll_accessibility_toggle,
+                this, true /* attachToRoot */);
+
+        final TypedArray a =
+                context.obtainStyledAttributes(attrs, R.styleable.FaceEnrollAccessibilityToggle);
+        try {
+            final CharSequence title =
+                    a.getText(R.styleable.FaceEnrollAccessibilityToggle_messageText);
+            final TextView titleTextView = findViewById(R.id.title);
+            titleTextView.setText(title);
+        } finally {
+            a.recycle();
+        }
+        mSwitch = findViewById(R.id.toggle);
+    }
+
+    public boolean isChecked() {
+        return mSwitch.isChecked();
+    }
+}
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java b/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
index bb46b18..990eef4 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollEnrolling.java
@@ -29,11 +29,12 @@
 
 import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
-import com.android.settings.Utils;
+import com.android.settings.biometrics.BiometricEnrollBase;
 import com.android.settings.biometrics.BiometricEnrollSidecar;
 import com.android.settings.biometrics.BiometricErrorDialog;
 import com.android.settings.biometrics.BiometricsEnrollEnrolling;
-import com.android.settings.password.ChooseLockSettingsHelper;
+
+import java.util.ArrayList;
 
 
 public class FaceEnrollEnrolling extends BiometricsEnrollEnrolling {
@@ -46,6 +47,8 @@
     private Interpolator mLinearOutSlowInInterpolator;
     private FaceEnrollPreviewFragment mPreviewFragment;
 
+    private ArrayList<Integer> mDisabledFeatures = new ArrayList<>();
+
     private FaceFeatureProvider.Listener mListener = new FaceFeatureProvider.Listener() {
         @Override
         public void onEnrolled() {
@@ -91,6 +94,13 @@
         Button skipButton = findViewById(R.id.skip_button);
         skipButton.setOnClickListener(this);
 
+        if (!getIntent().getBooleanExtra(BiometricEnrollBase.EXTRA_KEY_REQUIRE_DIVERSITY, true)) {
+            mDisabledFeatures.add(FaceManager.FEATURE_REQUIRE_REQUIRE_DIVERSITY);
+        }
+        if (!getIntent().getBooleanExtra(BiometricEnrollBase.EXTRA_KEY_REQUIRE_VISION, true)) {
+            mDisabledFeatures.add(FaceManager.FEATURE_REQUIRE_ATTENTION);
+        }
+
         startEnrollment();
     }
 
@@ -114,7 +124,12 @@
 
     @Override
     protected BiometricEnrollSidecar getSidecar() {
-        return new FaceEnrollSidecar();
+        final int[] disabledFeatures = new int[mDisabledFeatures.size()];
+        for (int i = 0; i < mDisabledFeatures.size(); i++) {
+            disabledFeatures[i] = mDisabledFeatures.get(i);
+        }
+
+        return new FaceEnrollSidecar(disabledFeatures);
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
index b720ff4..e221c96 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
@@ -20,7 +20,9 @@
 import android.content.Intent;
 import android.hardware.face.FaceManager;
 import android.os.Bundle;
+import android.view.View;
 import android.widget.Button;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.android.internal.logging.nano.MetricsProto;
@@ -37,11 +39,22 @@
     private static final String TAG = "FaceIntro";
 
     private FaceManager mFaceManager;
+    private FaceEnrollAccessibilityToggle mSwitchVision;
+    private FaceEnrollAccessibilityToggle mSwitchDiversity;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         mFaceManager = Utils.getFaceManagerOrNull(this);
+        final LinearLayout accessibilityLayout = findViewById(R.id.accessibility_layout);
+        final Button accessibilityButton = findViewById(R.id.accessibility_button);
+        accessibilityButton.setOnClickListener(view -> {
+            accessibilityButton.setVisibility(View.INVISIBLE);
+            accessibilityLayout.setVisibility(View.VISIBLE);
+        });
+
+        mSwitchVision = findViewById(R.id.toggle_vision);
+        mSwitchDiversity = findViewById(R.id.toggle_diversity);
     }
 
     @Override
@@ -116,7 +129,10 @@
 
     @Override
     protected Intent getEnrollingIntent() {
-        return new Intent(this, FaceEnrollEnrolling.class);
+        final Intent intent = new Intent(this, FaceEnrollEnrolling.class);
+        intent.putExtra(EXTRA_KEY_REQUIRE_VISION, mSwitchVision.isChecked());
+        intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, mSwitchDiversity.isChecked());
+        return intent;
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollSidecar.java b/src/com/android/settings/biometrics/face/FaceEnrollSidecar.java
index 2433fcb..7519530 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollSidecar.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollSidecar.java
@@ -24,13 +24,22 @@
 import com.android.settings.Utils;
 import com.android.settings.biometrics.BiometricEnrollSidecar;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+
 /**
  * Sidecar fragment to handle the state around face enrollment
  */
 public class FaceEnrollSidecar extends BiometricEnrollSidecar {
 
+    private final int[] mDisabledFeatures;
+
     private FaceManager mFaceManager;
 
+    public FaceEnrollSidecar(int[] disabledFeatures) {
+        mDisabledFeatures = Arrays.copyOf(disabledFeatures, disabledFeatures.length);
+    }
+
     @Override
     public void onAttach(Activity activity) {
         super.onAttach(activity);
@@ -43,9 +52,9 @@
         if (mUserId != UserHandle.USER_NULL) {
             mFaceManager.setActiveUser(mUserId);
         }
-        // TODO: Send the list of disabled features
+
         mFaceManager.enroll(mToken, mEnrollmentCancel,
-                mEnrollmentCallback, new int[0] /* disabledFeatures */);
+                mEnrollmentCallback, mDisabledFeatures);
     }
 
     private FaceManager.EnrollmentCallback mEnrollmentCallback
diff --git a/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdater.java b/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdater.java
index befdf29..0be1438 100644
--- a/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdater.java
+++ b/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdater.java
@@ -15,9 +15,12 @@
  */
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SOURCE;
+
 import android.content.Context;
 import android.hardware.usb.UsbManager;
-import android.hardware.usb.UsbPort;
 
 import androidx.annotation.VisibleForTesting;
 import androidx.preference.Preference;
@@ -43,7 +46,7 @@
     UsbConnectionBroadcastReceiver.UsbConnectionListener mUsbConnectionListener =
             (connected, functions, powerRole, dataRole) -> {
                 if (connected) {
-                    mUsbPreference.setSummary(getSummary(dataRole == UsbPort.DATA_ROLE_DEVICE
+                    mUsbPreference.setSummary(getSummary(dataRole == DATA_ROLE_DEVICE
                                     ? functions : UsbManager.FUNCTION_NONE, powerRole));
                     mDevicePreferenceCallback.onDeviceAdded(mUsbPreference);
                 } else {
@@ -100,7 +103,7 @@
 
     public static int getSummary(long functions, int power) {
         switch (power) {
-            case UsbPort.POWER_ROLE_SINK:
+            case POWER_ROLE_SINK:
                 if (functions == UsbManager.FUNCTION_MTP) {
                     return R.string.usb_summary_file_transfers;
                 } else if (functions == UsbManager.FUNCTION_RNDIS) {
@@ -112,7 +115,7 @@
                 } else {
                     return R.string.usb_summary_charging_only;
                 }
-            case UsbPort.POWER_ROLE_SOURCE:
+            case POWER_ROLE_SOURCE:
                 if (functions == UsbManager.FUNCTION_MTP) {
                     return R.string.usb_summary_file_transfers_power;
                 } else if (functions == UsbManager.FUNCTION_RNDIS) {
diff --git a/src/com/android/settings/connecteddevice/usb/UsbBackend.java b/src/com/android/settings/connecteddevice/usb/UsbBackend.java
index f68a4a0..556f76d 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbBackend.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbBackend.java
@@ -15,6 +15,13 @@
  */
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SOURCE;
+import static android.service.usb.UsbPortStatusProto.DATA_ROLE_HOST;
+import static android.service.usb.UsbPortStatusProto.DATA_ROLE_NONE;
+import static android.service.usb.UsbPortStatusProto.POWER_ROLE_SINK;
+
 import android.annotation.Nullable;
 import android.content.Context;
 import android.content.pm.PackageManager;
@@ -27,6 +34,8 @@
 
 import androidx.annotation.VisibleForTesting;
 
+import java.util.List;
+
 /**
  * Provides access to underlying system USB functionality.
  */
@@ -96,30 +105,30 @@
 
     public int getPowerRole() {
         updatePorts();
-        return mPortStatus == null ? UsbPort.POWER_ROLE_NONE : mPortStatus.getCurrentPowerRole();
+        return mPortStatus == null ? POWER_ROLE_NONE : mPortStatus.getCurrentPowerRole();
     }
 
     public int getDataRole() {
         updatePorts();
-        return mPortStatus == null ? UsbPort.DATA_ROLE_NONE : mPortStatus.getCurrentDataRole();
+        return mPortStatus == null ? DATA_ROLE_NONE : mPortStatus.getCurrentDataRole();
     }
 
     public void setPowerRole(int role) {
         int newDataRole = getDataRole();
         if (!areAllRolesSupported()) {
             switch (role) {
-                case UsbPort.POWER_ROLE_SINK:
-                    newDataRole = UsbPort.DATA_ROLE_DEVICE;
+                case POWER_ROLE_SINK:
+                    newDataRole = DATA_ROLE_DEVICE;
                     break;
-                case UsbPort.POWER_ROLE_SOURCE:
-                    newDataRole = UsbPort.DATA_ROLE_HOST;
+                case POWER_ROLE_SOURCE:
+                    newDataRole = DATA_ROLE_HOST;
                     break;
                 default:
-                    newDataRole = UsbPort.DATA_ROLE_NONE;
+                    newDataRole = DATA_ROLE_NONE;
             }
         }
         if (mPort != null) {
-            mUsbManager.setPortRoles(mPort, role, newDataRole);
+            mPort.setRoles(role, newDataRole);
         }
     }
 
@@ -127,31 +136,27 @@
         int newPowerRole = getPowerRole();
         if (!areAllRolesSupported()) {
             switch (role) {
-                case UsbPort.DATA_ROLE_DEVICE:
-                    newPowerRole = UsbPort.POWER_ROLE_SINK;
+                case DATA_ROLE_DEVICE:
+                    newPowerRole = POWER_ROLE_SINK;
                     break;
-                case UsbPort.DATA_ROLE_HOST:
-                    newPowerRole = UsbPort.POWER_ROLE_SOURCE;
+                case DATA_ROLE_HOST:
+                    newPowerRole = POWER_ROLE_SOURCE;
                     break;
                 default:
-                    newPowerRole = UsbPort.POWER_ROLE_NONE;
+                    newPowerRole = POWER_ROLE_NONE;
             }
         }
         if (mPort != null) {
-            mUsbManager.setPortRoles(mPort, newPowerRole, role);
+            mPort.setRoles(newPowerRole, role);
         }
     }
 
     public boolean areAllRolesSupported() {
         return mPort != null && mPortStatus != null
-                && mPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE)
-                && mPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_HOST)
-                && mPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_DEVICE)
-                && mPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST);
+                && mPortStatus.isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_DEVICE)
+                && mPortStatus.isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_HOST)
+                && mPortStatus.isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_DEVICE)
+                && mPortStatus.isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_HOST);
     }
 
     public static String usbFunctionsToString(long functions) {
@@ -205,17 +210,14 @@
     private void updatePorts() {
         mPort = null;
         mPortStatus = null;
-        UsbPort[] ports = mUsbManager.getPorts();
-        if (ports == null) {
-            return;
-        }
+        List<UsbPort> ports = mUsbManager.getPorts();
         // For now look for a connected port, in the future we should identify port in the
         // notification and pick based on that.
-        final int N = ports.length;
+        final int N = ports.size();
         for (int i = 0; i < N; i++) {
-            UsbPortStatus status = mUsbManager.getPortStatus(ports[i]);
+            UsbPortStatus status = ports.get(i).getStatus();
             if (status.isConnected()) {
-                mPort = ports[i];
+                mPort = ports.get(i);
                 mPortStatus = status;
                 break;
             }
diff --git a/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiver.java b/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiver.java
index 1d43371..beb2375 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiver.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiver.java
@@ -49,8 +49,8 @@
         mUsbBackend = backend;
 
         mFunctions = UsbManager.FUNCTION_NONE;
-        mDataRole = UsbPort.DATA_ROLE_NONE;
-        mPowerRole = UsbPort.POWER_ROLE_NONE;
+        mDataRole = UsbPortStatus.DATA_ROLE_NONE;
+        mPowerRole = UsbPortStatus.POWER_ROLE_NONE;
     }
 
     @Override
diff --git a/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleController.java b/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleController.java
index 84576b1..a584c11 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleController.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleController.java
@@ -16,6 +16,10 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_HOST;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_NONE;
+
 import android.content.Context;
 import android.hardware.usb.UsbPort;
 
@@ -55,23 +59,23 @@
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
         mPreferenceCategory = (PreferenceCategory) screen.findPreference(getPreferenceKey());
-        mHostPref = makeRadioPreference(UsbBackend.dataRoleToString(UsbPort.DATA_ROLE_HOST),
+        mHostPref = makeRadioPreference(UsbBackend.dataRoleToString(DATA_ROLE_HOST),
                 R.string.usb_control_host);
-        mDevicePref = makeRadioPreference(UsbBackend.dataRoleToString(UsbPort.DATA_ROLE_DEVICE),
+        mDevicePref = makeRadioPreference(UsbBackend.dataRoleToString(DATA_ROLE_DEVICE),
                 R.string.usb_control_device);
     }
 
     @Override
     protected void refresh(boolean connected, long functions, int powerRole, int dataRole) {
-        if (dataRole == UsbPort.DATA_ROLE_DEVICE) {
+        if (dataRole == DATA_ROLE_DEVICE) {
             mDevicePref.setChecked(true);
             mHostPref.setChecked(false);
             mPreferenceCategory.setEnabled(true);
-        } else if (dataRole == UsbPort.DATA_ROLE_HOST) {
+        } else if (dataRole == DATA_ROLE_HOST) {
             mDevicePref.setChecked(false);
             mHostPref.setChecked(true);
             mPreferenceCategory.setEnabled(true);
-        } else if (!connected || dataRole == UsbPort.DATA_ROLE_NONE){
+        } else if (!connected || dataRole == DATA_ROLE_NONE){
             mPreferenceCategory.setEnabled(false);
             if (mNextRolePref == null) {
                 // Disconnected with no operation pending, so clear subtexts
@@ -80,7 +84,7 @@
             }
         }
 
-        if (mNextRolePref != null && dataRole != UsbPort.DATA_ROLE_NONE) {
+        if (mNextRolePref != null && dataRole != DATA_ROLE_NONE) {
             if (UsbBackend.dataRoleFromString(mNextRolePref.getKey()) == dataRole) {
                 // Clear switching text if switch succeeded
                 mNextRolePref.setSummary("");
diff --git a/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsController.java b/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsController.java
index f74dc0f..283e56b 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsController.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsController.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
 import static android.net.ConnectivityManager.TETHERING_USB;
 
 import android.content.Context;
@@ -88,7 +89,7 @@
 
     @Override
     protected void refresh(boolean connected, long functions, int powerRole, int dataRole) {
-        if (!connected || dataRole != UsbPort.DATA_ROLE_DEVICE) {
+        if (!connected || dataRole != DATA_ROLE_DEVICE) {
             mProfilesContainer.setEnabled(false);
         } else {
             // Functions are only available in device mode
diff --git a/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleController.java b/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleController.java
index 30314f6..b59890a 100644
--- a/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleController.java
+++ b/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleController.java
@@ -16,8 +16,13 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SOURCE;
+
 import android.content.Context;
 import android.hardware.usb.UsbPort;
+import android.hardware.usb.UsbPortStatus;
 
 import androidx.preference.Preference;
 import androidx.preference.Preference.OnPreferenceClickListener;
@@ -40,16 +45,16 @@
     private int mNextPowerRole;
 
     private final Runnable mFailureCallback = () -> {
-        if (mNextPowerRole != UsbPort.POWER_ROLE_NONE) {
+        if (mNextPowerRole != POWER_ROLE_NONE) {
             mSwitchPreference.setSummary(R.string.usb_switching_failed);
-            mNextPowerRole = UsbPort.POWER_ROLE_NONE;
+            mNextPowerRole = POWER_ROLE_NONE;
         }
     };
 
     public UsbDetailsPowerRoleController(Context context, UsbDetailsFragment fragment,
             UsbBackend backend) {
         super(context, fragment, backend);
-        mNextPowerRole = UsbPort.POWER_ROLE_NONE;
+        mNextPowerRole = POWER_ROLE_NONE;
     }
 
     @Override
@@ -70,20 +75,21 @@
         } else if (connected && mUsbBackend.areAllRolesSupported()){
             mFragment.getPreferenceScreen().addPreference(mPreferenceCategory);
         }
-        if (powerRole == UsbPort.POWER_ROLE_SOURCE) {
+        if (powerRole == POWER_ROLE_SOURCE) {
             mSwitchPreference.setChecked(true);
             mPreferenceCategory.setEnabled(true);
-        } else if (powerRole == UsbPort.POWER_ROLE_SINK) {
+        } else if (powerRole == POWER_ROLE_SINK) {
             mSwitchPreference.setChecked(false);
             mPreferenceCategory.setEnabled(true);
-        } else if (!connected || powerRole == UsbPort.POWER_ROLE_NONE){
+        } else if (!connected || powerRole == POWER_ROLE_NONE){
             mPreferenceCategory.setEnabled(false);
-            if (mNextPowerRole == UsbPort.POWER_ROLE_NONE) {
+            if (mNextPowerRole == POWER_ROLE_NONE) {
                 mSwitchPreference.setSummary("");
             }
         }
 
-        if (mNextPowerRole != UsbPort.POWER_ROLE_NONE && powerRole != UsbPort.POWER_ROLE_NONE) {
+        if (mNextPowerRole != POWER_ROLE_NONE
+                && powerRole != POWER_ROLE_NONE) {
             if (mNextPowerRole == powerRole) {
                 // Clear switching text if switch succeeded
                 mSwitchPreference.setSummary("");
@@ -91,16 +97,16 @@
                 // Set failure text if switch failed
                 mSwitchPreference.setSummary(R.string.usb_switching_failed);
             }
-            mNextPowerRole = UsbPort.POWER_ROLE_NONE;
+            mNextPowerRole = POWER_ROLE_NONE;
             mHandler.removeCallbacks(mFailureCallback);
         }
     }
 
     @Override
     public boolean onPreferenceClick(Preference preference) {
-        int newRole = mSwitchPreference.isChecked() ? UsbPort.POWER_ROLE_SOURCE
-                : UsbPort.POWER_ROLE_SINK;
-        if (mUsbBackend.getPowerRole() != newRole && mNextPowerRole == UsbPort.POWER_ROLE_NONE
+        int newRole = mSwitchPreference.isChecked() ? POWER_ROLE_SOURCE
+                : POWER_ROLE_SINK;
+        if (mUsbBackend.getPowerRole() != newRole && mNextPowerRole == POWER_ROLE_NONE
                 && !Utils.isMonkeyRunning()) {
             mUsbBackend.setPowerRole(newRole);
 
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java b/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
index 997d86b..88478e3 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardLoader.java
@@ -21,7 +21,7 @@
 import static androidx.slice.widget.SliceLiveData.SUPPORTED_SPECS;
 
 import static com.android.settings.slices.CustomSliceRegistry.BLUETOOTH_DEVICES_SLICE_URI;
-import static com.android.settings.slices.CustomSliceRegistry.WIFI_SLICE_URI;
+import static com.android.settings.slices.CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI;
 
 import android.content.ContentProviderClient;
 import android.content.ContentResolver;
@@ -204,7 +204,7 @@
     }
 
     private boolean isLargeCard(ContextualCard card) {
-        return card.getSliceUri().equals(WIFI_SLICE_URI)
+        return card.getSliceUri().equals(CONTEXTUAL_WIFI_SLICE_URI)
                 || card.getSliceUri().equals(BLUETOOTH_DEVICES_SLICE_URI);
     }
 
diff --git a/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProvider.java b/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProvider.java
index d5500fb..5797043 100644
--- a/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProvider.java
+++ b/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProvider.java
@@ -34,8 +34,8 @@
     public ContextualCardList getContextualCards() {
         final ContextualCard wifiCard =
                 ContextualCard.newBuilder()
-                        .setSliceUri(CustomSliceRegistry.WIFI_SLICE_URI.toString())
-                        .setCardName(CustomSliceRegistry.WIFI_SLICE_URI.toString())
+                        .setSliceUri(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString())
+                        .setCardName(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString())
                         .setCardCategory(ContextualCard.Category.IMPORTANT)
                         .build();
         final ContextualCard connectedDeviceCard =
diff --git a/src/com/android/settings/panel/PanelFeatureProviderImpl.java b/src/com/android/settings/panel/PanelFeatureProviderImpl.java
index 503a5c3..ade2ffd 100644
--- a/src/com/android/settings/panel/PanelFeatureProviderImpl.java
+++ b/src/com/android/settings/panel/PanelFeatureProviderImpl.java
@@ -17,15 +17,16 @@
 package com.android.settings.panel;
 
 import android.content.Context;
+import android.provider.Settings;
 
 public class PanelFeatureProviderImpl implements PanelFeatureProvider {
 
     @Override
     public PanelContent getPanel(Context context, String panelType) {
         switch (panelType) {
-            case SettingsPanelActivity.PANEL_TYPE_WIFI:
+            case Settings.Panel.ACTION_INTERNET_CONNECTIVITY:
                 return InternetConnectivityPanel.create(context);
-            case SettingsPanelActivity.PANEL_TYPE_VOLUME:
+            case Settings.Panel.ACTION_VOLUME:
                 return VolumePanel.create(context);
         }
 
diff --git a/src/com/android/settings/panel/PanelFragment.java b/src/com/android/settings/panel/PanelFragment.java
index e61b8f8..7655be8 100644
--- a/src/com/android/settings/panel/PanelFragment.java
+++ b/src/com/android/settings/panel/PanelFragment.java
@@ -69,7 +69,7 @@
         mPanelSlices = view.findViewById(R.id.panel_parent_layout);
         mSeeMoreButton = view.findViewById(R.id.see_more);
         mDoneButton = view.findViewById(R.id.done);
-        mTitleView = view.findViewById(R.id.title);
+        mTitleView = view.findViewById(R.id.panel_title);
 
         final Bundle arguments = getArguments();
         final String panelType = arguments.getString(SettingsPanelActivity.KEY_PANEL_TYPE_ARGUMENT);
diff --git a/src/com/android/settings/panel/SettingsPanelActivity.java b/src/com/android/settings/panel/SettingsPanelActivity.java
index 09bead4..ffe94f8 100644
--- a/src/com/android/settings/panel/SettingsPanelActivity.java
+++ b/src/com/android/settings/panel/SettingsPanelActivity.java
@@ -16,11 +16,9 @@
 
 package com.android.settings.panel;
 
-import android.content.ComponentName;
 import android.content.Intent;
 import android.os.Bundle;
 
-import android.text.TextUtils;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.Window;
@@ -35,8 +33,6 @@
 
 /**
  * Dialog Activity to host Settings Slices.
- *
- * TODO link to action / framework API
  */
 public class SettingsPanelActivity extends FragmentActivity {
 
@@ -47,28 +43,10 @@
      */
     public static final String KEY_PANEL_TYPE_ARGUMENT = "PANEL_TYPE_ARGUMENT";
 
-
-    // TODO (b/117804442) move to framework
-    public static final String EXTRA_PANEL_TYPE = "com.android.settings.panel.extra";
-
-    // TODO (b/117804442) move to framework
-    public static final String PANEL_TYPE_WIFI = "wifi_panel";
-
-    // TODO (b/117804442) move to framework
-    public static final String PANEL_TYPE_VOLUME = "volume_panel";
-
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        final ComponentName callingActivityName = getCallingActivity();
-
-        if (callingActivityName == null) {
-            Log.e(TAG, "Must start with startActivityForResult. Closing.");
-            finish();
-            return;
-        }
-
         final Intent callingIntent = getIntent();
         if (callingIntent == null) {
             Log.e(TAG, "Null intent, closing Panel Activity");
@@ -76,12 +54,6 @@
             return;
         }
 
-        final String typeExtra = callingIntent.getStringExtra(EXTRA_PANEL_TYPE);
-        if (TextUtils.isEmpty(typeExtra)) {
-            Log.e(TAG, "No intent passed, closing Panel Activity");
-            return;
-        }
-
         setContentView(R.layout.settings_panel);
 
         // Move the window to the bottom of screen, and make it take up the entire screen width.
@@ -90,9 +62,8 @@
         window.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
                 WindowManager.LayoutParams.WRAP_CONTENT);
 
-
         final Bundle bundle = new Bundle();
-        bundle.putString(KEY_PANEL_TYPE_ARGUMENT, typeExtra);
+        bundle.putString(KEY_PANEL_TYPE_ARGUMENT, callingIntent.getAction());
 
         final PanelFragment panelFragment = new PanelFragment();
         panelFragment.setArguments(bundle);
diff --git a/src/com/android/settings/slices/CustomSliceManager.java b/src/com/android/settings/slices/CustomSliceManager.java
index 4a9de15..bb47df2 100644
--- a/src/com/android/settings/slices/CustomSliceManager.java
+++ b/src/com/android/settings/slices/CustomSliceManager.java
@@ -32,7 +32,8 @@
 import com.android.settings.homepage.contextualcards.slices.BluetoothDevicesSlice;
 import com.android.settings.homepage.contextualcards.slices.LowStorageSlice;
 import com.android.settings.location.LocationSlice;
-import com.android.settings.wifi.WifiSlice;
+import com.android.settings.wifi.slice.ContextualWifiSlice;
+import com.android.settings.wifi.slice.WifiSlice;
 
 import java.util.Map;
 import java.util.WeakHashMap;
@@ -107,6 +108,7 @@
         mUriMap.put(CustomSliceRegistry.BATTERY_FIX_SLICE_URI, BatteryFixSlice.class);
         mUriMap.put(CustomSliceRegistry.BATTERY_INFO_SLICE_URI, BatterySlice.class);
         mUriMap.put(CustomSliceRegistry.BLUETOOTH_DEVICES_SLICE_URI, BluetoothDevicesSlice.class);
+        mUriMap.put(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI, ContextualWifiSlice.class);
         mUriMap.put(CustomSliceRegistry.DATA_USAGE_SLICE_URI, DataUsageSlice.class);
         mUriMap.put(CustomSliceRegistry.DEVICE_INFO_SLICE_URI, DeviceInfoSlice.class);
         mUriMap.put(CustomSliceRegistry.EMERGENCY_INFO_SLICE_URI, EmergencyInfoSlice.class);
diff --git a/src/com/android/settings/slices/CustomSliceRegistry.java b/src/com/android/settings/slices/CustomSliceRegistry.java
index 1b8cffe..bdf8b35 100644
--- a/src/com/android/settings/slices/CustomSliceRegistry.java
+++ b/src/com/android/settings/slices/CustomSliceRegistry.java
@@ -80,6 +80,17 @@
             .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
             .appendPath("bluetooth_devices")
             .build();
+
+    /**
+     * Backing Uri for the Wifi Slice.
+     */
+    public static final Uri CONTEXTUAL_WIFI_SLICE_URI = new Uri.Builder()
+            .scheme(ContentResolver.SCHEME_CONTENT)
+            .authority(SettingsSlicesContract.AUTHORITY)
+            .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
+            .appendPath("contextual_wifi")
+            .build();
+
     /**
      * Backing Uri for the Data usage Slice.
      */
@@ -216,6 +227,7 @@
             .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
             .appendPath(KEY_WIFI)
             .build();
+
     /**
      * Backing Uri for the Zen Mode Slice.
      */
diff --git a/src/com/android/settings/wifi/WifiDialogActivity.java b/src/com/android/settings/wifi/WifiDialogActivity.java
index 9ef6a39..c32bcf3 100644
--- a/src/com/android/settings/wifi/WifiDialogActivity.java
+++ b/src/com/android/settings/wifi/WifiDialogActivity.java
@@ -38,6 +38,8 @@
 
     private static final String TAG = "WifiDialogActivity";
 
+    public static final String KEY_ACCESS_POINT_STATE = "access_point_state";
+
     /**
      * Boolean extra indicating whether this activity should connect to an access point on the
      * caller's behalf. If this is set to false, the caller should check
@@ -46,9 +48,8 @@
      */
     @VisibleForTesting
     static final String KEY_CONNECT_FOR_CALLER = "connect_for_caller";
-    static final String KEY_ACCESS_POINT_STATE = "access_point_state";
-    private static final String KEY_WIFI_CONFIGURATION = "wifi_configuration";
 
+    private static final String KEY_WIFI_CONFIGURATION = "wifi_configuration";
     private static final int RESULT_CONNECTED = RESULT_FIRST_USER;
     private static final int RESULT_FORGET = RESULT_FIRST_USER + 1;
 
diff --git a/src/com/android/settings/wifi/slice/ContextualWifiSlice.java b/src/com/android/settings/wifi/slice/ContextualWifiSlice.java
new file mode 100644
index 0000000..fa8c267
--- /dev/null
+++ b/src/com/android/settings/wifi/slice/ContextualWifiSlice.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2018 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.settings.wifi.slice;
+
+import android.content.Context;
+import android.net.Uri;
+import android.net.wifi.WifiSsid;
+import android.text.TextUtils;
+import android.util.Log;
+
+import androidx.annotation.VisibleForTesting;
+import androidx.slice.Slice;
+
+import com.android.settings.slices.CustomSliceRegistry;
+import com.android.settings.slices.CustomSliceable;
+
+/**
+ * {@link CustomSliceable} for Wi-Fi, used by contextual homepage.
+ */
+public class ContextualWifiSlice extends WifiSlice {
+
+    private static final String TAG = "ContextualWifiSlice";
+    @VisibleForTesting
+    boolean mPreviouslyDisplayed;
+
+    public ContextualWifiSlice(Context context) {
+        super(context);
+    }
+
+    @Override
+    public Uri getUri() {
+        return CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI;
+    }
+
+    @Override
+    public Slice getSlice() {
+        if (!mPreviouslyDisplayed && !TextUtils.equals(getActiveSSID(), WifiSsid.NONE)) {
+            Log.d(TAG, "Wifi is connected, no point showing any suggestion.");
+            return null;
+        }
+        // Set mPreviouslyDisplayed to true - we will show *something* on the screen. So we should
+        // keep showing this card to keep UI stable, even if wifi connects to a network later.
+        mPreviouslyDisplayed = true;
+
+        return super.getSlice();
+    }
+}
diff --git a/src/com/android/settings/wifi/WifiSlice.java b/src/com/android/settings/wifi/slice/WifiSlice.java
similarity index 95%
rename from src/com/android/settings/wifi/WifiSlice.java
rename to src/com/android/settings/wifi/slice/WifiSlice.java
index 9f05783..4d3a95a 100644
--- a/src/com/android/settings/wifi/WifiSlice.java
+++ b/src/com/android/settings/wifi/slice/WifiSlice.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.settings.wifi;
+package com.android.settings.wifi.slice;
 
 import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
 import static android.provider.SettingsSlicesContract.KEY_WIFI;
@@ -46,6 +46,8 @@
 import com.android.settings.slices.CustomSliceable;
 import com.android.settings.slices.SliceBackgroundWorker;
 import com.android.settings.slices.SliceBuilderUtils;
+import com.android.settings.wifi.WifiDialogActivity;
+import com.android.settings.wifi.WifiSettings;
 import com.android.settings.wifi.details.WifiNetworkDetailsFragment;
 import com.android.settingslib.wifi.AccessPoint;
 import com.android.settingslib.wifi.WifiTracker;
@@ -54,15 +56,15 @@
 import java.util.List;
 
 /**
- * Utility class to build a Wifi Slice, and handle all associated actions.
+ * {@link CustomSliceable} for Wi-Fi, used by generic clients.
  */
 public class WifiSlice implements CustomSliceable {
 
     @VisibleForTesting
     static final int DEFAULT_EXPANDED_ROW_COUNT = 3;
 
+    protected final WifiManager mWifiManager;
     private final Context mContext;
-    private final WifiManager mWifiManager;
 
     public WifiSlice(Context context) {
         mContext = context;
@@ -77,6 +79,7 @@
     @Override
     public Slice getSlice() {
         final boolean isWifiEnabled = isWifiEnabled();
+
         final IconCompat icon = IconCompat.createWithResource(mContext,
                 R.drawable.ic_settings_wireless);
         final String title = mContext.getString(R.string.wifi_settings);
@@ -208,6 +211,13 @@
         return intent;
     }
 
+    protected String getActiveSSID() {
+        if (mWifiManager.getWifiState() != WifiManager.WIFI_STATE_ENABLED) {
+            return WifiSsid.NONE;
+        }
+        return WifiInfo.removeDoubleQuotes(mWifiManager.getConnectionInfo().getSSID());
+    }
+
     private boolean isWifiEnabled() {
         switch (mWifiManager.getWifiState()) {
             case WifiManager.WIFI_STATE_ENABLED:
@@ -221,8 +231,7 @@
     private CharSequence getSummary() {
         switch (mWifiManager.getWifiState()) {
             case WifiManager.WIFI_STATE_ENABLED:
-                final String ssid = WifiInfo.removeDoubleQuotes(mWifiManager.getConnectionInfo()
-                        .getSSID());
+                final String ssid = getActiveSSID();
                 if (TextUtils.equals(ssid, WifiSsid.NONE)) {
                     return mContext.getText(R.string.disconnected);
                 }
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdaterTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdaterTest.java
index b698b3a..7c6a305 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdaterTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/ConnectedUsbDeviceUpdaterTest.java
@@ -15,6 +15,11 @@
  */
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.verify;
@@ -22,7 +27,6 @@
 
 import android.content.Context;
 import android.hardware.usb.UsbManager;
-import android.hardware.usb.UsbPort;
 
 import com.android.settings.R;
 import com.android.settings.connecteddevice.DevicePreferenceCallback;
@@ -78,7 +82,7 @@
     public void initUsbPreference_usbConnected_preferenceAdded() {
         mDeviceUpdater.initUsbPreference(mContext);
         mDeviceUpdater.mUsbConnectionListener.onUsbConnectionChanged(true /* connected */,
-                UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                UsbManager.FUNCTION_NONE, POWER_ROLE_SINK, DATA_ROLE_DEVICE);
 
         verify(mDevicePreferenceCallback).onDeviceAdded(mDeviceUpdater.mUsbPreference);
     }
@@ -87,7 +91,7 @@
     public void initUsbPreference_usbDisconnected_preferenceRemoved() {
         mDeviceUpdater.initUsbPreference(mContext);
         mDeviceUpdater.mUsbConnectionListener.onUsbConnectionChanged(false /* connected */,
-                UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                UsbManager.FUNCTION_NONE, POWER_ROLE_NONE, DATA_ROLE_NONE);
 
         verify(mDevicePreferenceCallback).onDeviceRemoved(mDeviceUpdater.mUsbPreference);
     }
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbBackendTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbBackendTest.java
index 333d2b6..4e5897d 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbBackendTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbBackendTest.java
@@ -16,6 +16,11 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_HOST;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SOURCE;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Answers.RETURNS_DEEP_STUBS;
@@ -40,6 +45,8 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 
+import java.util.Collections;
+
 @RunWith(RobolectricTestRunner.class)
 public class UsbBackendTest {
 
@@ -64,9 +71,9 @@
         when((Object) mContext.getSystemService(UsbManager.class)).thenReturn(mUsbManager);
         when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE))
                 .thenReturn(mConnectivityManager);
-        when(mUsbManager.getPorts()).thenReturn(new UsbPort[] {mUsbPort});
+        when(mUsbManager.getPorts()).thenReturn(Collections.singletonList(mUsbPort));
         when(mUsbPortStatus.isConnected()).thenReturn(true);
-        when(mUsbManager.getPortStatus(mUsbPort)).thenReturn(mUsbPortStatus);
+        when(mUsbPort.getStatus()).thenReturn(mUsbPortStatus);
     }
 
     @Test
@@ -74,22 +81,22 @@
         final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager);
 
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_HOST))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_HOST))
                 .thenReturn(true);
-        when(mUsbPortStatus.getCurrentPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbPortStatus.getCurrentPowerRole()).thenReturn(POWER_ROLE_SINK);
 
-        usbBackend.setDataRole(UsbPort.DATA_ROLE_HOST);
+        usbBackend.setDataRole(DATA_ROLE_HOST);
 
-        verify(mUsbManager).setPortRoles(mUsbPort, UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_HOST);
+        verify(mUsbPort).setRoles(POWER_ROLE_SINK, DATA_ROLE_HOST);
     }
 
     @Test
@@ -97,17 +104,16 @@
         final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager);
 
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_HOST))
                 .thenReturn(true);
-        when(mUsbPortStatus.getCurrentPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbPortStatus.getCurrentPowerRole()).thenReturn(POWER_ROLE_SINK);
 
-        usbBackend.setDataRole(UsbPort.DATA_ROLE_HOST);
+        usbBackend.setDataRole(DATA_ROLE_HOST);
 
-        verify(mUsbManager)
-                .setPortRoles(mUsbPort, UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST);
+        verify(mUsbPort).setRoles(POWER_ROLE_SOURCE, DATA_ROLE_HOST);
     }
 
     @Test
@@ -115,23 +121,22 @@
         final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager);
 
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_HOST))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_HOST))
                 .thenReturn(true);
-        when(mUsbPortStatus.getCurrentDataRole()).thenReturn(UsbPort.DATA_ROLE_DEVICE);
+        when(mUsbPortStatus.getCurrentDataRole()).thenReturn(DATA_ROLE_DEVICE);
 
-        usbBackend.setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        usbBackend.setPowerRole(POWER_ROLE_SOURCE);
 
-        verify(mUsbManager)
-                .setPortRoles(mUsbPort, UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbPort).setRoles(POWER_ROLE_SOURCE, DATA_ROLE_DEVICE);
     }
 
     @Test
@@ -139,17 +144,16 @@
         final UsbBackend usbBackend = new UsbBackend(mContext, mUserManager);
 
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE))
+                .isRoleCombinationSupported(POWER_ROLE_SINK, DATA_ROLE_DEVICE))
                 .thenReturn(true);
         when(mUsbPortStatus
-                .isRoleCombinationSupported(UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST))
+                .isRoleCombinationSupported(POWER_ROLE_SOURCE, DATA_ROLE_HOST))
                 .thenReturn(true);
-        when(mUsbPortStatus.getCurrentDataRole()).thenReturn(UsbPort.DATA_ROLE_DEVICE);
+        when(mUsbPortStatus.getCurrentDataRole()).thenReturn(DATA_ROLE_DEVICE);
 
-        usbBackend.setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        usbBackend.setPowerRole(POWER_ROLE_SOURCE);
 
-        verify(mUsbManager)
-                .setPortRoles(mUsbPort, UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST);
+        verify(mUsbPort).setRoles(POWER_ROLE_SOURCE, DATA_ROLE_HOST);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiverTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiverTest.java
index 1689ee7..1da97f5 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiverTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbConnectionBroadcastReceiverTest.java
@@ -15,6 +15,11 @@
  */
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.verify;
@@ -22,7 +27,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.hardware.usb.UsbManager;
-import android.hardware.usb.UsbPort;
 import android.hardware.usb.UsbPortStatus;
 
 import org.junit.Before;
@@ -63,7 +67,7 @@
         mReceiver.onReceive(mContext, intent);
 
         verify(mListener).onUsbConnectionChanged(true /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
     }
 
     @Test
@@ -75,7 +79,7 @@
         mReceiver.onReceive(mContext, intent);
 
         verify(mListener).onUsbConnectionChanged(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
     }
 
     @Test
@@ -89,21 +93,21 @@
         mReceiver.onReceive(mContext, intent);
 
         verify(mListener).onUsbConnectionChanged(true /* connected */, UsbManager.FUNCTION_MTP,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
     }
 
     @Test
     public void onReceive_usbPortStatus_invokeCallback() {
         final Intent intent = new Intent();
         intent.setAction(UsbManager.ACTION_USB_PORT_CHANGED);
-        final UsbPortStatus status = new UsbPortStatus(0, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE, 0);
+        final UsbPortStatus status = new UsbPortStatus(0, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE, 0);
         intent.putExtra(UsbManager.EXTRA_PORT_STATUS, status);
 
         mReceiver.onReceive(mContext, intent);
 
         verify(mListener).onUsbConnectionChanged(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SINK, DATA_ROLE_DEVICE);
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleControllerTest.java
index 3eda3d1..91e680b 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsDataRoleControllerTest.java
@@ -16,6 +16,12 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_HOST;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyLong;
@@ -24,7 +30,6 @@
 
 import android.content.Context;
 import android.hardware.usb.UsbManager;
-import android.hardware.usb.UsbPort;
 import android.os.Handler;
 
 import androidx.fragment.app.FragmentActivity;
@@ -92,11 +97,11 @@
     public void displayRefresh_deviceRole_shouldCheckDevice() {
         mDetailsDataRoleController.displayPreference(mScreen);
 
-        mDetailsDataRoleController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsDataRoleController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
-        final RadioButtonPreference hostPref = getRadioPreference(UsbPort.DATA_ROLE_HOST);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
+        final RadioButtonPreference hostPref = getRadioPreference(DATA_ROLE_HOST);
         assertThat(devicePref.isChecked()).isTrue();
         assertThat(hostPref.isChecked()).isFalse();
     }
@@ -105,11 +110,11 @@
     public void displayRefresh_hostRole_shouldCheckHost() {
         mDetailsDataRoleController.displayPreference(mScreen);
 
-        mDetailsDataRoleController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_HOST);
+        mDetailsDataRoleController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
-        final RadioButtonPreference hostPref = getRadioPreference(UsbPort.DATA_ROLE_HOST);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
+        final RadioButtonPreference hostPref = getRadioPreference(DATA_ROLE_HOST);
         assertThat(devicePref.isChecked()).isFalse();
         assertThat(hostPref.isChecked()).isTrue();
     }
@@ -118,8 +123,8 @@
     public void displayRefresh_disconnected_shouldDisable() {
         mDetailsDataRoleController.displayPreference(mScreen);
 
-        mDetailsDataRoleController.refresh(false, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsDataRoleController.refresh(false, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
 
         assertThat(mPreference.isEnabled()).isFalse();
     }
@@ -127,12 +132,12 @@
     @Test
     public void onClickDevice_hostEnabled_shouldSetDevice() {
         mDetailsDataRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getDataRole()).thenReturn(UsbPort.DATA_ROLE_HOST);
+        when(mUsbBackend.getDataRole()).thenReturn(DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
         devicePref.performClick();
 
-        verify(mUsbBackend).setDataRole(UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbBackend).setDataRole(DATA_ROLE_DEVICE);
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
     }
@@ -140,50 +145,50 @@
     @Test
     public void onClickDeviceTwice_hostEnabled_shouldSetDeviceOnce() {
         mDetailsDataRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getDataRole()).thenReturn(UsbPort.DATA_ROLE_HOST);
+        when(mUsbBackend.getDataRole()).thenReturn(DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
         devicePref.performClick();
 
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         devicePref.performClick();
-        verify(mUsbBackend).setDataRole(UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbBackend).setDataRole(DATA_ROLE_DEVICE);
     }
 
     @Test
     public void onClickDeviceAndRefresh_success_shouldClearSubtext() {
         mDetailsDataRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getDataRole()).thenReturn(UsbPort.DATA_ROLE_HOST);
+        when(mUsbBackend.getDataRole()).thenReturn(DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
         devicePref.performClick();
 
-        verify(mUsbBackend).setDataRole(UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbBackend).setDataRole(DATA_ROLE_DEVICE);
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsDataRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         mDetailsDataRoleController.refresh(true /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SINK, DATA_ROLE_DEVICE);
         assertThat(devicePref.getSummary()).isEqualTo("");
     }
 
     @Test
     public void onClickDeviceAndRefresh_failed_shouldShowFailureText() {
         mDetailsDataRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getDataRole()).thenReturn(UsbPort.DATA_ROLE_HOST);
+        when(mUsbBackend.getDataRole()).thenReturn(DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
         devicePref.performClick();
 
-        verify(mUsbBackend).setDataRole(UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbBackend).setDataRole(DATA_ROLE_DEVICE);
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsDataRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         mDetailsDataRoleController.refresh(true /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_HOST);
+                POWER_ROLE_SINK, DATA_ROLE_HOST);
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching_failed));
     }
@@ -191,18 +196,18 @@
     @Test
     public void onClickDevice_timedOut_shouldShowFailureText() {
         mDetailsDataRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getDataRole()).thenReturn(UsbPort.DATA_ROLE_HOST);
+        when(mUsbBackend.getDataRole()).thenReturn(DATA_ROLE_HOST);
 
-        final RadioButtonPreference devicePref = getRadioPreference(UsbPort.DATA_ROLE_DEVICE);
+        final RadioButtonPreference devicePref = getRadioPreference(DATA_ROLE_DEVICE);
         devicePref.performClick();
 
-        verify(mUsbBackend).setDataRole(UsbPort.DATA_ROLE_DEVICE);
+        verify(mUsbBackend).setDataRole(DATA_ROLE_DEVICE);
         ArgumentCaptor<Runnable> captor = ArgumentCaptor.forClass(Runnable.class);
         verify(mHandler).postDelayed(captor.capture(), anyLong());
         assertThat(devicePref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsDataRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         captor.getValue().run();
 
         assertThat(devicePref.getSummary())
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsControllerTest.java
index fc93a58..11fa613 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsFunctionsControllerTest.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
 import static android.net.ConnectivityManager.TETHERING_USB;
 
 import static com.google.common.truth.Truth.assertThat;
@@ -105,8 +107,8 @@
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
         mDetailsFunctionsController.displayPreference(mScreen);
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         List<RadioButtonPreference> prefs = getRadioPreferences();
         Iterator<Long> iter = UsbDetailsFunctionsController.FUNCTIONS_MAP.keySet().iterator();
 
@@ -120,7 +122,7 @@
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
         mDetailsFunctionsController.refresh(false, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SINK, DATA_ROLE_DEVICE);
         assertThat(mPreferenceCategory.isEnabled()).isFalse();
     }
 
@@ -131,8 +133,8 @@
         when(mUsbBackend.areFunctionsSupported(UsbManager.FUNCTION_PTP)).thenReturn(false);
         when(mUsbBackend.areFunctionsSupported(UsbManager.FUNCTION_RNDIS)).thenReturn(false);
 
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         List<RadioButtonPreference> prefs = getRadioPreferences();
         assertThat(prefs.size()).isEqualTo(1);
         assertThat(prefs.get(0).getKey())
@@ -143,8 +145,8 @@
     public void displayRefresh_mtpEnabled_shouldCheckSwitches() {
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         List<RadioButtonPreference> prefs = getRadioPreferences();
 
         assertThat(prefs.get(0).getKey())
@@ -156,8 +158,8 @@
     public void onClickMtp_noneEnabled_shouldEnableMtp() {
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         when(mUsbBackend.getCurrentFunctions()).thenReturn(UsbManager.FUNCTION_NONE);
         List<RadioButtonPreference> prefs = getRadioPreferences();
         prefs.get(0).performClick();
@@ -165,8 +167,8 @@
         assertThat(prefs.get(0).getKey())
                 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP));
         verify(mUsbBackend).setCurrentFunctions(UsbManager.FUNCTION_MTP);
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         assertThat(prefs.get(0).isChecked()).isTrue();
     }
 
@@ -174,8 +176,8 @@
     public void onClickMtp_ptpEnabled_shouldEnableMtp() {
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_PTP, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_PTP, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         when(mUsbBackend.getCurrentFunctions()).thenReturn(UsbManager.FUNCTION_PTP);
         List<RadioButtonPreference> prefs = getRadioPreferences();
         prefs.get(0).performClick();
@@ -183,8 +185,8 @@
         assertThat(prefs.get(0).getKey())
                 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_MTP));
         verify(mUsbBackend).setCurrentFunctions(UsbManager.FUNCTION_MTP);
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         assertThat(prefs.get(0).isChecked()).isTrue();
         assertThat(prefs.get(3).getKey())
                 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_PTP));
@@ -195,8 +197,8 @@
     public void onClickNone_mtpEnabled_shouldDisableMtp() {
         when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
 
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_MTP, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         when(mUsbBackend.getCurrentFunctions()).thenReturn(UsbManager.FUNCTION_MTP);
         List<RadioButtonPreference> prefs = getRadioPreferences();
         prefs.get(4).performClick();
@@ -204,8 +206,8 @@
         assertThat(prefs.get(4).getKey())
                 .isEqualTo(UsbBackend.usbFunctionsToString(UsbManager.FUNCTION_NONE));
         verify(mUsbBackend).setCurrentFunctions(UsbManager.FUNCTION_NONE);
-        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsFunctionsController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         assertThat(prefs.get(0).isChecked()).isFalse();
     }
 
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsHeaderControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsHeaderControllerTest.java
index d72214f..280b8d4 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsHeaderControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsHeaderControllerTest.java
@@ -16,6 +16,9 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+
 import static org.mockito.ArgumentMatchers.argThat;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -101,8 +104,8 @@
     @Test
     public void displayRefresh_charging_shouldSetHeader() {
         mDetailsHeaderController.displayPreference(mScreen);
-        mDetailsHeaderController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsHeaderController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
         verify(mHeaderController).setLabel(mContext.getString(R.string.usb_pref));
         verify(mHeaderController).setIcon(argThat((ArgumentMatcher<Drawable>) t -> {
             DrawableTestHelper.assertDrawableResId(t, R.drawable.ic_usb);
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleControllerTest.java
index b16a453..aa62741 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/usb/UsbDetailsPowerRoleControllerTest.java
@@ -16,6 +16,13 @@
 
 package com.android.settings.connecteddevice.usb;
 
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_DEVICE;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_HOST;
+import static android.hardware.usb.UsbPortStatus.DATA_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_NONE;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SINK;
+import static android.hardware.usb.UsbPortStatus.POWER_ROLE_SOURCE;
+
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.anyLong;
@@ -25,7 +32,6 @@
 
 import android.content.Context;
 import android.hardware.usb.UsbManager;
-import android.hardware.usb.UsbPort;
 import android.os.Handler;
 
 import androidx.fragment.app.FragmentActivity;
@@ -95,8 +101,8 @@
         mDetailsPowerRoleController.displayPreference(mScreen);
         when(mUsbBackend.areAllRolesSupported()).thenReturn(true);
 
-        mDetailsPowerRoleController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsPowerRoleController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
 
         SwitchPreference pref = getPreference();
         assertThat(pref.isChecked()).isFalse();
@@ -108,7 +114,7 @@
         when(mUsbBackend.areAllRolesSupported()).thenReturn(true);
 
         mDetailsPowerRoleController.refresh(true, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_HOST);
+                POWER_ROLE_SOURCE, DATA_ROLE_HOST);
 
         SwitchPreference pref = getPreference();
         assertThat(pref.isChecked()).isTrue();
@@ -120,7 +126,7 @@
         when(mUsbBackend.areAllRolesSupported()).thenReturn(true);
 
         mDetailsPowerRoleController.refresh(false, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SINK, DATA_ROLE_DEVICE);
 
         assertThat(mPreference.isEnabled()).isFalse();
         assertThat((Preference) mScreen.findPreference(
@@ -132,8 +138,8 @@
         mDetailsPowerRoleController.displayPreference(mScreen);
         when(mUsbBackend.areAllRolesSupported()).thenReturn(false);
 
-        mDetailsPowerRoleController.refresh(true, UsbManager.FUNCTION_NONE, UsbPort.POWER_ROLE_SINK,
-                UsbPort.DATA_ROLE_DEVICE);
+        mDetailsPowerRoleController.refresh(true, UsbManager.FUNCTION_NONE, POWER_ROLE_SINK,
+                DATA_ROLE_DEVICE);
 
         assertThat((Preference) mScreen.findPreference(
                 mDetailsPowerRoleController.getPreferenceKey())).isNull();
@@ -142,12 +148,12 @@
     @Test
     public void onClick_sink_shouldSetSource() {
         mDetailsPowerRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbBackend.getPowerRole()).thenReturn(POWER_ROLE_SINK);
 
         SwitchPreference pref = getPreference();
         pref.performClick();
 
-        verify(mUsbBackend).setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        verify(mUsbBackend).setPowerRole(POWER_ROLE_SOURCE);
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
     }
@@ -155,7 +161,7 @@
     @Test
     public void onClickTwice_sink_shouldSetSourceOnce() {
         mDetailsPowerRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbBackend.getPowerRole()).thenReturn(POWER_ROLE_SINK);
 
         SwitchPreference pref = getPreference();
         pref.performClick();
@@ -163,42 +169,42 @@
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         pref.performClick();
-        verify(mUsbBackend, times(1)).setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        verify(mUsbBackend, times(1)).setPowerRole(POWER_ROLE_SOURCE);
     }
 
     @Test
     public void onClickDeviceAndRefresh_success_shouldClearSubtext() {
         mDetailsPowerRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbBackend.getPowerRole()).thenReturn(POWER_ROLE_SINK);
 
         SwitchPreference pref = getPreference();
         pref.performClick();
 
-        verify(mUsbBackend).setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        verify(mUsbBackend).setPowerRole(POWER_ROLE_SOURCE);
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsPowerRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         mDetailsPowerRoleController.refresh(true /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SOURCE, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SOURCE, DATA_ROLE_DEVICE);
         assertThat(pref.getSummary()).isEqualTo("");
     }
 
     @Test
     public void onClickDeviceAndRefresh_failed_shouldShowFailureText() {
         mDetailsPowerRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbBackend.getPowerRole()).thenReturn(POWER_ROLE_SINK);
 
         SwitchPreference pref = getPreference();
         pref.performClick();
 
-        verify(mUsbBackend).setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        verify(mUsbBackend).setPowerRole(POWER_ROLE_SOURCE);
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsPowerRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         mDetailsPowerRoleController.refresh(true /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_SINK, UsbPort.DATA_ROLE_DEVICE);
+                POWER_ROLE_SINK, DATA_ROLE_DEVICE);
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching_failed));
     }
@@ -206,18 +212,18 @@
     @Test
     public void onClickDevice_timedOut_shouldShowFailureText() {
         mDetailsPowerRoleController.displayPreference(mScreen);
-        when(mUsbBackend.getPowerRole()).thenReturn(UsbPort.POWER_ROLE_SINK);
+        when(mUsbBackend.getPowerRole()).thenReturn(POWER_ROLE_SINK);
 
         SwitchPreference pref = getPreference();
         pref.performClick();
 
-        verify(mUsbBackend).setPowerRole(UsbPort.POWER_ROLE_SOURCE);
+        verify(mUsbBackend).setPowerRole(POWER_ROLE_SOURCE);
         ArgumentCaptor<Runnable> captor = ArgumentCaptor.forClass(Runnable.class);
         verify(mHandler).postDelayed(captor.capture(), anyLong());
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching));
         mDetailsPowerRoleController.refresh(false /* connected */, UsbManager.FUNCTION_NONE,
-                UsbPort.POWER_ROLE_NONE, UsbPort.DATA_ROLE_NONE);
+                POWER_ROLE_NONE, DATA_ROLE_NONE);
         captor.getValue().run();
         assertThat(pref.getSummary())
                 .isEqualTo(mContext.getString(R.string.usb_switching_failed));
diff --git a/tests/robotests/src/com/android/settings/development/qstile/DevelopmentTilePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/qstile/DevelopmentTilePreferenceControllerTest.java
index 8b006fc..dc466df 100644
--- a/tests/robotests/src/com/android/settings/development/qstile/DevelopmentTilePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/qstile/DevelopmentTilePreferenceControllerTest.java
@@ -19,6 +19,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.atLeastOnce;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -40,7 +41,6 @@
 import com.android.settings.R;
 
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.ArgumentCaptor;
@@ -52,6 +52,8 @@
 import org.robolectric.shadows.ShadowPackageManager;
 import org.robolectric.util.ReflectionHelpers;
 
+import java.util.Arrays;
+
 @RunWith(RobolectricTestRunner.class)
 public class DevelopmentTilePreferenceControllerTest {
 
@@ -83,7 +85,6 @@
     }
 
     @Test
-    @Ignore("b/119829673")
     public void display_hasTileService_shouldDisplay() {
         final Intent tileProbe = new Intent(TileService.ACTION_QS_TILE)
                 .setPackage(mContext.getPackageName());
@@ -92,11 +93,11 @@
         info.serviceInfo.name = "abc";
         info.serviceInfo.icon = R.drawable.ic_settings_24dp;
         info.serviceInfo.packageName = mContext.getPackageName();
-        mShadowPackageManager.addResolveInfoForIntent(tileProbe, info);
+        mShadowPackageManager.setResolveInfosForIntent(tileProbe, Arrays.asList(info));
 
         mController.displayPreference(mScreen);
 
-        verify(mScreen).addPreference(any(Preference.class));
+        verify(mScreen, atLeastOnce()).addPreference(any(Preference.class));
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardLoaderTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardLoaderTest.java
index 101ca75..c62a6bb 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardLoaderTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/ContextualCardLoaderTest.java
@@ -145,7 +145,7 @@
         cards.add(new ContextualCard.Builder()
                 .setName("test_wifi")
                 .setCardType(ContextualCard.CardType.SLICE)
-                .setSliceUri(CustomSliceRegistry.WIFI_SLICE_URI)
+                .setSliceUri(CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI)
                 .build());
         cards.add(new ContextualCard.Builder()
                 .setName("test_flashlight")
diff --git a/tests/robotests/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProviderTest.java b/tests/robotests/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProviderTest.java
index 8f36ea5..d4b67f5 100644
--- a/tests/robotests/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProviderTest.java
+++ b/tests/robotests/src/com/android/settings/homepage/contextualcards/SettingsContextualCardProviderTest.java
@@ -70,11 +70,12 @@
     }
 
     @Test
-    public void getContextualCards_wifiSlice_shouldGetCorrectCategory() {
+    public void getContextualCards_wifiSlice_shouldGetImportantCategory() {
         final ContextualCardList cards = mProvider.getContextualCards();
         ContextualCard wifiCard = null;
         for (ContextualCard card : cards.getCardList()) {
-            if (card.getSliceUri().equals(CustomSliceRegistry.WIFI_SLICE_URI.toString())) {
+            if (card.getSliceUri().equals(
+                    CustomSliceRegistry.CONTEXTUAL_WIFI_SLICE_URI.toString())) {
                 wifiCard = card;
             }
         }
diff --git a/tests/robotests/src/com/android/settings/panel/FakePanelContent.java b/tests/robotests/src/com/android/settings/panel/FakePanelContent.java
index 60f0d5d..1d79952 100644
--- a/tests/robotests/src/com/android/settings/panel/FakePanelContent.java
+++ b/tests/robotests/src/com/android/settings/panel/FakePanelContent.java
@@ -29,7 +29,7 @@
  */
 public class FakePanelContent implements PanelContent {
 
-    public static final String FAKE_KEY = "fake_key";
+    public static final String FAKE_ACTION = "fake_action";
 
     public static final CharSequence TITLE = "title";
 
diff --git a/tests/robotests/src/com/android/settings/panel/FakeSettingsPanelActivity.java b/tests/robotests/src/com/android/settings/panel/FakeSettingsPanelActivity.java
index afd0bec..2a62b54 100644
--- a/tests/robotests/src/com/android/settings/panel/FakeSettingsPanelActivity.java
+++ b/tests/robotests/src/com/android/settings/panel/FakeSettingsPanelActivity.java
@@ -27,8 +27,7 @@
 
     @Override
     public Intent getIntent() {
-        final Intent intent = new Intent();
-        intent.putExtra(SettingsPanelActivity.EXTRA_PANEL_TYPE, FakePanelContent.FAKE_KEY);
+        final Intent intent = new Intent(FakePanelContent.FAKE_ACTION);
         return intent;
     }
 }
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/panel/PanelFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/panel/PanelFeatureProviderImplTest.java
index 754c937..99d5d6c 100644
--- a/tests/robotests/src/com/android/settings/panel/PanelFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/panel/PanelFeatureProviderImplTest.java
@@ -20,6 +20,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import android.content.Context;
+import android.provider.Settings;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -43,8 +44,16 @@
     @Test
     public void getPanel_internetConnectivityKey_returnsCorrectPanel() {
         final PanelContent panel = mProvider.getPanel(mContext,
-                SettingsPanelActivity.PANEL_TYPE_WIFI);
+                Settings.Panel.ACTION_INTERNET_CONNECTIVITY);
 
         assertThat(panel).isInstanceOf(InternetConnectivityPanel.class);
     }
+
+    @Test
+    public void getPanel_volume_returnsCorrectPanel() {
+        final PanelContent panel = mProvider.getPanel(mContext,
+                Settings.Panel.ACTION_VOLUME);
+
+        assertThat(panel).isInstanceOf(VolumePanel.class);
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java b/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
index b129267..7eae3e4 100644
--- a/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
+++ b/tests/robotests/src/com/android/settings/slices/SettingsSliceProviderTest.java
@@ -55,7 +55,7 @@
 import com.android.settings.testutils.shadow.ShadowThreadUtils;
 import com.android.settings.testutils.shadow.ShadowUserManager;
 import com.android.settings.testutils.shadow.ShadowUtils;
-import com.android.settings.wifi.WifiSlice;
+import com.android.settings.wifi.slice.WifiSlice;
 import com.android.settingslib.wifi.WifiTracker;
 
 import org.junit.After;
diff --git a/tests/robotests/src/com/android/settings/wifi/slice/ContextualWifiSliceTest.java b/tests/robotests/src/com/android/settings/wifi/slice/ContextualWifiSliceTest.java
new file mode 100644
index 0000000..bf5fba8
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/wifi/slice/ContextualWifiSliceTest.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2018 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.settings.wifi.slice;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiManager;
+
+import androidx.core.graphics.drawable.IconCompat;
+import androidx.slice.Slice;
+import androidx.slice.SliceItem;
+import androidx.slice.SliceMetadata;
+import androidx.slice.SliceProvider;
+import androidx.slice.core.SliceAction;
+import androidx.slice.widget.SliceLiveData;
+
+import com.android.settings.R;
+import com.android.settings.testutils.SliceTester;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
+
+import java.util.List;
+
+@RunWith(RobolectricTestRunner.class)
+public class ContextualWifiSliceTest {
+
+    private Context mContext;
+    private ContentResolver mResolver;
+    private WifiManager mWifiManager;
+    private ContextualWifiSlice mWifiSlice;
+
+    @Before
+    public void setUp() {
+        mContext = spy(RuntimeEnvironment.application);
+        mResolver = mock(ContentResolver.class);
+        doReturn(mResolver).when(mContext).getContentResolver();
+        mWifiManager = mContext.getSystemService(WifiManager.class);
+
+        // Set-up specs for SliceMetadata.
+        SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
+        mWifiManager.setWifiEnabled(true);
+
+        mWifiSlice = new ContextualWifiSlice(mContext);
+    }
+
+    @Test
+    public void getWifiSlice_hasActiveConnection_shouldReturnNull() {
+        final WifiConfiguration config = new WifiConfiguration();
+        config.SSID = "123";
+        mWifiManager.connect(config, null /* listener */);
+
+        final Slice wifiSlice = mWifiSlice.getSlice();
+
+        assertThat(wifiSlice).isNull();
+    }
+
+    @Test
+    public void getWifiSlice_previousDisplayed_hasActiveConnection_shouldHaveTitleAndToggle() {
+        mWifiSlice.mPreviouslyDisplayed = true;
+        final WifiConfiguration config = new WifiConfiguration();
+        config.SSID = "123";
+        mWifiManager.connect(config, null /* listener */);
+
+        final Slice wifiSlice = mWifiSlice.getSlice();
+        final SliceMetadata metadata = SliceMetadata.from(mContext, wifiSlice);
+
+        final List<SliceAction> toggles = metadata.getToggles();
+        assertThat(toggles).hasSize(1);
+
+        final SliceAction primaryAction = metadata.getPrimaryAction();
+        final IconCompat expectedToggleIcon = IconCompat.createWithResource(mContext,
+                R.drawable.ic_settings_wireless);
+        assertThat(primaryAction.getIcon().toString()).isEqualTo(expectedToggleIcon.toString());
+
+        final List<SliceItem> sliceItems = wifiSlice.getItems();
+        SliceTester.assertTitle(sliceItems, mContext.getString(R.string.wifi_settings));
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiSliceTest.java b/tests/robotests/src/com/android/settings/wifi/slice/WifiSliceTest.java
similarity index 96%
rename from tests/robotests/src/com/android/settings/wifi/WifiSliceTest.java
rename to tests/robotests/src/com/android/settings/wifi/slice/WifiSliceTest.java
index 2d4dd04..3c78749 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiSliceTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/slice/WifiSliceTest.java
@@ -12,16 +12,15 @@
  * 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.settings.wifi;
+package com.android.settings.wifi.slice;
 
 import static android.app.slice.Slice.HINT_LIST_ITEM;
 import static android.app.slice.SliceItem.FORMAT_SLICE;
 
 import static com.android.settings.slices.CustomSliceRegistry.WIFI_SLICE_URI;
-import static com.android.settings.wifi.WifiSlice.DEFAULT_EXPANDED_ROW_COUNT;
+import static com.android.settings.wifi.slice.WifiSlice.DEFAULT_EXPANDED_ROW_COUNT;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -29,7 +28,6 @@
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
 import android.content.ContentResolver;
 import android.content.Context;
