diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 01015c5..e28aa15 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1590,10 +1590,6 @@
             android:permission="android.permission.MANAGE_FINGERPRINT"
             android:icon="@drawable/ic_suggestion_fingerprint"
             android:theme="@style/GlifTheme.Light">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="com.android.settings.suggested.category.FINGERPRINT_ENROLL" />
-            </intent-filter>
             <meta-data android:name="com.android.settings.require_feature"
                 android:value="android.hardware.fingerprint" />
             <meta-data android:name="com.android.settings.title"
@@ -1602,6 +1598,22 @@
                 android:resource="@string/suggestion_additional_fingerprints_summary" />
         </activity>
 
+        <activity-alias android:name=".SetupFingerprintSuggestionActivity"
+            android:enabled="false"
+            android:exported="true"
+            android:targetActivity=".biometrics.fingerprint.FingerprintSuggestionActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="com.android.settings.suggested.category.FINGERPRINT_ENROLL" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.require_feature"
+                       android:value="android.hardware.fingerprint" />
+            <meta-data android:name="com.android.settings.title"
+                       android:resource="@string/suggestion_additional_fingerprints" />
+            <meta-data android:name="com.android.settings.summary"
+                       android:resource="@string/suggestion_additional_fingerprints_summary" />
+        </activity-alias>
+
         <!-- Note this must not be exported since it returns the password in the intent -->
         <activity android:name=".password.ConfirmLockPattern$InternalActivity"
             android:exported="false"
diff --git a/res/drawable/settings_panel_background.xml b/res/drawable/settings_panel_background.xml
index 36c58e0..adb4646 100644
--- a/res/drawable/settings_panel_background.xml
+++ b/res/drawable/settings_panel_background.xml
@@ -16,7 +16,7 @@
 
 <inset xmlns:android="http://schemas.android.com/apk/res/android" android:inset="4dp">
     <shape android:shape="rectangle">
-        <corners android:radius="8dp" />
+        <corners android:radius="?android:attr/dialogCornerRadius" />
         <solid android:color="?android:attr/colorBackground" />
     </shape>
 </inset>
\ No newline at end of file
diff --git a/res/layout/settings_homepage_container.xml b/res/layout/settings_homepage_container.xml
index 225e177..c86bccf 100644
--- a/res/layout/settings_homepage_container.xml
+++ b/res/layout/settings_homepage_container.xml
@@ -46,7 +46,8 @@
                 android:id="@+id/main_content"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:animateLayoutChanges="true"/>
+                android:animateLayoutChanges="true"
+                android:background="?android:attr/windowBackground"/>
 
         </LinearLayout>
     </androidx.core.widget.NestedScrollView>
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
index 3f02b6f..05ee7be 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinish.java
@@ -17,11 +17,15 @@
 package com.android.settings.biometrics.fingerprint;
 
 import android.app.settings.SettingsEnums;
+import android.content.ComponentName;
 import android.content.Intent;
+import android.content.pm.PackageManager;
 import android.hardware.fingerprint.FingerprintManager;
 import android.os.Bundle;
 import android.view.View;
 
+import androidx.annotation.VisibleForTesting;
+
 import com.android.settings.R;
 import com.android.settings.Utils;
 import com.android.settings.biometrics.BiometricEnrollBase;
@@ -34,7 +38,11 @@
  */
 public class FingerprintEnrollFinish extends BiometricEnrollBase {
 
-    private static final int REQUEST_ADD_ANOTHER = 1;
+    @VisibleForTesting
+    static final int REQUEST_ADD_ANOTHER = 1;
+    @VisibleForTesting
+    static final String FINGERPRINT_SUGGESTION_ACTIVITY =
+            "com.android.settings.SetupFingerprintSuggestionActivity";
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -85,16 +93,37 @@
 
     @Override
     protected void onNextButtonClick(View view) {
+        setFingerprintSuggestionEnabled();
         setResult(RESULT_FINISHED);
         finish();
     }
 
+    private void setFingerprintSuggestionEnabled() {
+        final FingerprintManager fpm = Utils.getFingerprintManagerOrNull(this);
+        if (fpm != null) {
+            int enrolled = fpm.getEnrolledFingerprints(mUserId).size();
+
+            // Only show "Add another fingerprint" if the user already enrolled one.
+            // "Add fingerprint" will be shown in the main flow if the user hasn't enrolled any
+            // fingerprints. If the user already added more than one fingerprint, they already know
+            // to add multiple fingerprints so we don't show the suggestion.
+            int flag = (enrolled == 1) ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
+                    : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
+
+            ComponentName componentName = new ComponentName(getApplicationContext(),
+                    FINGERPRINT_SUGGESTION_ACTIVITY);
+            getPackageManager().setComponentEnabledSetting(
+                    componentName, flag, PackageManager.DONT_KILL_APP);
+        }
+    }
+
     private void onAddAnotherButtonClick(View view) {
         startActivityForResult(getFingerprintEnrollingIntent(), REQUEST_ADD_ANOTHER);
     }
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        setFingerprintSuggestionEnabled();
         if (requestCode == REQUEST_ADD_ANOTHER && resultCode != RESULT_CANCELED) {
             setResult(resultCode, data);
             finish();
diff --git a/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java b/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java
index 9a651d2..d6a668e 100644
--- a/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java
+++ b/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderController.java
@@ -39,6 +39,7 @@
 import com.android.settings.R;
 import com.android.settings.core.BasePreferenceController;
 import com.android.settings.fuelgauge.BatteryMeterView;
+import com.android.settingslib.bluetooth.BluetoothUtils;
 import com.android.settingslib.bluetooth.CachedBluetoothDevice;
 import com.android.settingslib.core.lifecycle.LifecycleObserver;
 import com.android.settingslib.core.lifecycle.events.OnDestroy;
@@ -69,13 +70,12 @@
     @VisibleForTesting
     Handler mHandler = new Handler(Looper.getMainLooper());
     @VisibleForTesting
-    final BluetoothAdapter.MetadataListener mMetadataListener =
-            new BluetoothAdapter.MetadataListener() {
+    final BluetoothAdapter.OnMetadataChangedListener mMetadataListener =
+            new BluetoothAdapter.OnMetadataChangedListener() {
                 @Override
-                public void onMetadataChanged(BluetoothDevice device, int key, String value) {
-                    super.onMetadataChanged(device, key, value);
+                public void onMetadataChanged(BluetoothDevice device, int key, byte[] value) {
                     Log.i(TAG, String.format("Metadata updated in Device %s: %d = %s.", device, key,
-                            value));
+                            value == null ? null : new String(value)));
                     refresh();
                 }
             };
@@ -88,9 +88,9 @@
 
     @Override
     public int getAvailabilityStatus() {
-        final boolean unthetheredHeadset = Utils.getBooleanMetaData(mCachedDevice.getDevice(),
-                BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET);
-        return unthetheredHeadset ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
+        final boolean untetheredHeadset = BluetoothUtils.getBooleanMetaData(
+                mCachedDevice.getDevice(), BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET);
+        return untetheredHeadset ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
     }
 
     @Override
@@ -108,8 +108,8 @@
             return;
         }
         mCachedDevice.registerCallback(this::onDeviceAttributesChanged);
-        mBluetoothAdapter.registerMetadataListener(mCachedDevice.getDevice(), mMetadataListener,
-                mHandler);
+        mBluetoothAdapter.addOnMetadataChangedListener(mCachedDevice.getDevice(),
+                mContext.getMainExecutor(), mMetadataListener);
     }
 
     @Override
@@ -118,7 +118,8 @@
             return;
         }
         mCachedDevice.unregisterCallback(this::onDeviceAttributesChanged);
-        mBluetoothAdapter.unregisterMetadataListener(mCachedDevice.getDevice());
+        mBluetoothAdapter.removeOnMetadataChangedListener(mCachedDevice.getDevice(),
+                mMetadataListener);
     }
 
     @Override
@@ -154,21 +155,21 @@
             }
 
             updateSubLayout(mLayoutPreference.findViewById(R.id.layout_left),
-                    BluetoothDevice.METADATA_UNTHETHERED_LEFT_ICON,
-                    BluetoothDevice.METADATA_UNTHETHERED_LEFT_BATTERY,
-                    BluetoothDevice.METADATA_UNTHETHERED_LEFT_CHARGING,
+                    BluetoothDevice.METADATA_UNTETHERED_LEFT_ICON,
+                    BluetoothDevice.METADATA_UNTETHERED_LEFT_BATTERY,
+                    BluetoothDevice.METADATA_UNTETHERED_LEFT_CHARGING,
                     R.string.bluetooth_left_name);
 
             updateSubLayout(mLayoutPreference.findViewById(R.id.layout_middle),
-                    BluetoothDevice.METADATA_UNTHETHERED_CASE_ICON,
-                    BluetoothDevice.METADATA_UNTHETHERED_CASE_BATTERY,
-                    BluetoothDevice.METADATA_UNTHETHERED_CASE_CHARGING,
+                    BluetoothDevice.METADATA_UNTETHERED_CASE_ICON,
+                    BluetoothDevice.METADATA_UNTETHERED_CASE_BATTERY,
+                    BluetoothDevice.METADATA_UNTETHERED_CASE_CHARGING,
                     R.string.bluetooth_middle_name);
 
             updateSubLayout(mLayoutPreference.findViewById(R.id.layout_right),
-                    BluetoothDevice.METADATA_UNTHETHERED_RIGHT_ICON,
-                    BluetoothDevice.METADATA_UNTHETHERED_RIGHT_BATTERY,
-                    BluetoothDevice.METADATA_UNTHETHERED_RIGHT_CHARGING,
+                    BluetoothDevice.METADATA_UNTETHERED_RIGHT_ICON,
+                    BluetoothDevice.METADATA_UNTETHERED_RIGHT_BATTERY,
+                    BluetoothDevice.METADATA_UNTETHERED_RIGHT_CHARGING,
                     R.string.bluetooth_right_name);
         }
     }
@@ -194,15 +195,15 @@
             return;
         }
         final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice();
-        final String iconUri = Utils.getStringMetaData(bluetoothDevice, iconMetaKey);
+        final String iconUri = BluetoothUtils.getStringMetaData(bluetoothDevice, iconMetaKey);
         if (iconUri != null) {
             final ImageView imageView = linearLayout.findViewById(R.id.header_icon);
             updateIcon(imageView, iconUri);
         }
 
-        final int batteryLevel = Utils.getIntMetaData(bluetoothDevice, batteryMetaKey);
-        final boolean charging = Utils.getBooleanMetaData(bluetoothDevice, chargeMetaKey);
-        if (batteryLevel != Utils.META_INT_ERROR) {
+        final int batteryLevel = BluetoothUtils.getIntMetaData(bluetoothDevice, batteryMetaKey);
+        final boolean charging = BluetoothUtils.getBooleanMetaData(bluetoothDevice, chargeMetaKey);
+        if (batteryLevel != BluetoothUtils.META_INT_ERROR) {
             linearLayout.setVisibility(View.VISIBLE);
             final ImageView imageView = linearLayout.findViewById(R.id.bt_battery_icon);
             imageView.setImageDrawable(createBtBatteryIcon(mContext, batteryLevel, charging));
@@ -233,7 +234,7 @@
 
         // Only show bluetooth icon
         final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice();
-        final String iconUri = Utils.getStringMetaData(bluetoothDevice,
+        final String iconUri = BluetoothUtils.getStringMetaData(bluetoothDevice,
                 BluetoothDevice.METADATA_MAIN_ICON);
         if (iconUri != null) {
             final ImageView imageView = linearLayout.findViewById(R.id.header_icon);
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsHeaderController.java b/src/com/android/settings/bluetooth/BluetoothDetailsHeaderController.java
index 47d56bc..ee63045 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsHeaderController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsHeaderController.java
@@ -53,8 +53,8 @@
 
     @Override
     public boolean isAvailable() {
-        return !Utils.getBooleanMetaData(mCachedDevice.getDevice(),
-                BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET);
+        return !BluetoothUtils.getBooleanMetaData(mCachedDevice.getDevice(),
+                BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET);
     }
 
     @Override
diff --git a/src/com/android/settings/bluetooth/BluetoothFeatureProviderImpl.java b/src/com/android/settings/bluetooth/BluetoothFeatureProviderImpl.java
index e486b68..cd75951 100644
--- a/src/com/android/settings/bluetooth/BluetoothFeatureProviderImpl.java
+++ b/src/com/android/settings/bluetooth/BluetoothFeatureProviderImpl.java
@@ -33,8 +33,8 @@
 
     @Override
     public Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice) {
-        final String uriString = bluetoothDevice.getMetadata(
+        final byte[] uriByte = bluetoothDevice.getMetadata(
                 BluetoothDevice.METADATA_ENHANCED_SETTINGS_UI_URI);
-        return uriString != null ? Uri.parse(uriString) : null;
+        return uriByte == null ? null : Uri.parse(new String(uriByte));
     }
 }
diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java
index a86e1d5..d6e395e 100755
--- a/src/com/android/settings/bluetooth/Utils.java
+++ b/src/com/android/settings/bluetooth/Utils.java
@@ -47,8 +47,6 @@
     static final boolean V = BluetoothUtils.V; // verbose logging
     static final boolean D =  BluetoothUtils.D;  // regular logging
 
-    public static final int META_INT_ERROR = -1;
-
     private Utils() {
     }
 
@@ -154,30 +152,4 @@
         return Settings.Global.getInt(context.getContentResolver(),
                 Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, 0) == 1;
     }
-
-    public static boolean getBooleanMetaData(BluetoothDevice bluetoothDevice, int key) {
-        if (bluetoothDevice == null) {
-            return false;
-        }
-
-        return Boolean.parseBoolean(bluetoothDevice.getMetadata(key));
-    }
-
-    public static String getStringMetaData(BluetoothDevice bluetoothDevice, int key) {
-        if (bluetoothDevice == null) {
-            return null;
-        }
-        return bluetoothDevice.getMetadata(key);
-    }
-
-    public static int getIntMetaData(BluetoothDevice bluetoothDevice, int key) {
-        if (bluetoothDevice == null) {
-            return META_INT_ERROR;
-        }
-        try {
-            return Integer.parseInt(bluetoothDevice.getMetadata(key));
-        } catch (NumberFormatException e) {
-            return META_INT_ERROR;
-        }
-    }
 }
diff --git a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
index 488f930..7a131d7 100644
--- a/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
+++ b/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragment.java
@@ -99,7 +99,8 @@
                             mSubId);
                     String newName = mNameView.getText().toString();
                     if (currentInfo != null && !currentInfo.getDisplayName().equals(newName)) {
-                        mSubscriptionManager.setDisplayName(newName, mSubId);
+                        mSubscriptionManager.setDisplayName(newName, mSubId,
+                                SubscriptionManager.NAME_SOURCE_USER_INPUT);
                     }
                 })
                 .setNegativeButton(android.R.string.cancel, null);
diff --git a/src/com/android/settings/nfc/OWNERS b/src/com/android/settings/nfc/OWNERS
index f11f74f..2017826 100644
--- a/src/com/android/settings/nfc/OWNERS
+++ b/src/com/android/settings/nfc/OWNERS
@@ -1,5 +1,5 @@
 # Default reviewers for this and subdirectories.
-eisenbach@google.com
-kandoiruchi@google.com
+rmojumder@google.com
 
-# Emergency approvers in case the above are not available
\ No newline at end of file
+# Emergency approvers in case the above are not available
+zachoverflow@google.com
diff --git a/src/com/android/settings/system/SystemUpdatePreferenceController.java b/src/com/android/settings/system/SystemUpdatePreferenceController.java
index dd04409..38a88b9 100644
--- a/src/com/android/settings/system/SystemUpdatePreferenceController.java
+++ b/src/com/android/settings/system/SystemUpdatePreferenceController.java
@@ -139,7 +139,8 @@
             }
             Log.d(TAG, "ciActionOnSysUpdate: broadcasting intent " + intentStr +
                     " with extra " + extra + ", " + extraVal);
+            intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
             mContext.getApplicationContext().sendBroadcast(intent);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/tests/robotests/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollFinishTest.java b/tests/robotests/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollFinishTest.java
new file mode 100644
index 0000000..74b35c9
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/biometrics/fingerprint/SetupFingerprintEnrollFinishTest.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2019 Google Inc.
+ *
+ * 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.fingerprint;
+
+import static com.android.settings.biometrics.fingerprint.FingerprintEnrollFinish.FINGERPRINT_SUGGESTION_ACTIVITY;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.robolectric.RuntimeEnvironment.application;
+
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.hardware.fingerprint.FingerprintManager;
+
+import com.android.settings.R;
+import com.android.settings.testutils.shadow.ShadowFingerprintManager;
+
+import com.google.android.setupcompat.PartnerCustomizationLayout;
+import com.google.android.setupcompat.template.FooterBarMixin;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.Robolectric;
+import org.robolectric.RobolectricTestRunner;
+import org.robolectric.Shadows;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadows.ShadowActivity;
+
+@RunWith(RobolectricTestRunner.class)
+@Config(shadows = {ShadowFingerprintManager.class})
+public class SetupFingerprintEnrollFinishTest {
+
+    private FingerprintEnrollFinish mActivity;
+    private ComponentName mComponentName;
+    private PartnerCustomizationLayout mLayout;
+    private FingerprintManager mFingerprintManager;
+
+    @Before
+    public void setUp() {
+        mActivity = Robolectric.buildActivity(FingerprintEnrollFinish.class).setup().get();
+        mLayout = mActivity.findViewById(R.id.setup_wizard_layout);
+        Shadows.shadowOf(application.getPackageManager())
+                .setSystemFeature(PackageManager.FEATURE_FINGERPRINT, true);
+
+        mFingerprintManager = (FingerprintManager) application.getSystemService(
+                Context.FINGERPRINT_SERVICE);
+        Shadows.shadowOf(mFingerprintManager).setIsHardwareDetected(true);
+
+        mComponentName = new ComponentName(
+                application, FINGERPRINT_SUGGESTION_ACTIVITY);
+    }
+
+    @Test
+    public void clickAddAnother_shouldLaunchEnrolling() {
+        final ComponentName enrollingComponent = new ComponentName(
+                application,
+                FingerprintEnrollEnrolling.class);
+
+        mLayout.getMixin(FooterBarMixin.class).getSecondaryButtonView().performClick();
+
+        ShadowActivity.IntentForResult startedActivity =
+                Shadows.shadowOf(mActivity).getNextStartedActivityForResult();
+        assertThat(startedActivity).named("Next activity").isNotNull();
+        assertThat(startedActivity.intent.getComponent())
+                .isEqualTo(enrollingComponent);
+    }
+
+    @Test
+    public void clickAddAnother_shouldPropagateResults() {
+        final ComponentName enrollingComponent = new ComponentName(
+                application,
+                FingerprintEnrollEnrolling.class);
+
+        mLayout.getMixin(FooterBarMixin.class).getSecondaryButtonView().performClick();
+
+        ShadowActivity.IntentForResult startedActivity =
+                Shadows.shadowOf(mActivity).getNextStartedActivityForResult();
+        assertThat(startedActivity).named("Next activity").isNotNull();
+        assertThat(startedActivity.intent.getComponent())
+                .isEqualTo(enrollingComponent);
+    }
+
+    @Test
+    public void clickNext_shouldFinish() {
+        mLayout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
+
+        assertThat(mActivity.isFinishing()).isTrue();
+    }
+
+    @Test
+    public void onActivityResult_fingerprintCountIsNotOne_fingerprintSuggestionActivityDisabled() {
+        Shadows.shadowOf((FingerprintManager) mFingerprintManager).setDefaultFingerprints(0);
+
+        mActivity.onActivityResult(0, 0, null);
+
+        assertThat(application.getPackageManager().getComponentEnabledSetting(
+                mComponentName)).isEqualTo(PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
+    }
+
+    @Test
+    public void onActivityResult_fingerprintCountIsOne_fingerprintSuggestionActivityEnabled() {
+        Shadows.shadowOf((FingerprintManager) mFingerprintManager).setDefaultFingerprints(1);
+
+        mActivity.onActivityResult(0, 0, null);
+
+        assertThat(application.getPackageManager().getComponentEnabledSetting(
+                mComponentName)).isEqualTo(PackageManager.COMPONENT_ENABLED_STATE_ENABLED);
+    }
+
+    @Test
+    public void clickNext_fingerprintCountIsNotOne_fingerprintSuggestionActivityDisabled() {
+        Shadows.shadowOf((FingerprintManager) mFingerprintManager).setDefaultFingerprints(2);
+
+        mLayout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
+
+        assertThat(application.getPackageManager().getComponentEnabledSetting(
+                mComponentName)).isEqualTo(PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
+    }
+
+    @Test
+    public void clickNext_fingerprintCountIsOne_fngerprintSuggestionActivityEnabled() {
+        Shadows.shadowOf((FingerprintManager) mFingerprintManager).setDefaultFingerprints(1);
+
+        mLayout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
+
+        assertThat(application.getPackageManager().getComponentEnabledSetting(
+                mComponentName)).isEqualTo(PackageManager.COMPONENT_ENABLED_STATE_ENABLED);
+    }
+}
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderControllerTest.java
index 3532bf8..362b003 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderControllerTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/AdvancedBluetoothDetailsHeaderControllerTest.java
@@ -104,14 +104,14 @@
     @Test
     public void refresh_connected_updateCorrectInfo() {
         when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_UNTHETHERED_LEFT_BATTERY)).thenReturn(
-                String.valueOf(BATTERY_LEVEL_LEFT));
+                BluetoothDevice.METADATA_UNTETHERED_LEFT_BATTERY)).thenReturn(
+                String.valueOf(BATTERY_LEVEL_LEFT).getBytes());
         when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_UNTHETHERED_RIGHT_BATTERY)).thenReturn(
-                String.valueOf(BATTERY_LEVEL_RIGHT));
+                BluetoothDevice.METADATA_UNTETHERED_RIGHT_BATTERY)).thenReturn(
+                String.valueOf(BATTERY_LEVEL_RIGHT).getBytes());
         when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_UNTHETHERED_CASE_BATTERY)).thenReturn(
-                String.valueOf(BATTERY_LEVEL_MAIN));
+                BluetoothDevice.METADATA_UNTETHERED_CASE_BATTERY)).thenReturn(
+                String.valueOf(BATTERY_LEVEL_MAIN).getBytes());
         when(mCachedDevice.isConnected()).thenReturn(true);
         mController.refresh();
 
@@ -141,18 +141,18 @@
     }
 
     @Test
-    public void getAvailabilityStatus_unthetheredHeadset_returnAvailable() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("true");
+    public void getAvailabilityStatus_untetheredHeadset_returnAvailable() {
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("true".getBytes());
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.AVAILABLE);
     }
 
     @Test
-    public void getAvailabilityStatus_notUnthetheredHeadset_returnUnavailable() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("false");
+    public void getAvailabilityStatus_notUntetheredHeadset_returnUnavailable() {
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("false".getBytes());
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(
                 BasePreferenceController.CONDITIONALLY_UNAVAILABLE);
@@ -169,50 +169,52 @@
 
     @Test
     public void onStart_isAvailable_registerCallback() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("true");
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("true".getBytes());
 
         mController.onStart();
 
-        verify(mBluetoothAdapter).registerMetadataListener(mBluetoothDevice,
-                mController.mMetadataListener, mController.mHandler);
+        verify(mBluetoothAdapter).addOnMetadataChangedListener(mBluetoothDevice,
+                mContext.getMainExecutor() ,mController.mMetadataListener);
     }
 
     @Test
     public void onStop_isAvailable_unregisterCallback() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("true");
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("true".getBytes());
 
         mController.onStop();
 
-        verify(mBluetoothAdapter).unregisterMetadataListener(mBluetoothDevice);
+        verify(mBluetoothAdapter).removeOnMetadataChangedListener(mBluetoothDevice,
+                mController.mMetadataListener);
     }
 
     @Test
     public void onStart_notAvailable_registerCallback() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("false");
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("false".getBytes());
 
         mController.onStart();
 
-        verify(mBluetoothAdapter, never()).registerMetadataListener(mBluetoothDevice,
-                mController.mMetadataListener, mController.mHandler);
+        verify(mBluetoothAdapter, never()).addOnMetadataChangedListener(mBluetoothDevice,
+                mContext.getMainExecutor() ,mController.mMetadataListener);
     }
 
     @Test
     public void onStop_notAvailable_unregisterCallback() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("false");
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("false".getBytes());
 
         mController.onStop();
 
-        verify(mBluetoothAdapter, never()).unregisterMetadataListener(mBluetoothDevice);
+        verify(mBluetoothAdapter, never()).removeOnMetadataChangedListener(mBluetoothDevice,
+                mController.mMetadataListener);
     }
 
     @Test
     public void onDestroy_isAvailable_recycleBitmap() {
-        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET))
-                .thenReturn("true");
+        when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET))
+                .thenReturn("true".getBytes());
         mController.mIconCache.put(ICON_URI, mBitmap);
 
         mController.onDestroy();
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java
index cf119ea..1ee1de6 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsHeaderControllerTest.java
@@ -123,9 +123,9 @@
     }
 
     @Test
-    public void isAvailable_unthetheredHeadset_returnFalse() {
+    public void isAvailable_untetheredHeadset_returnFalse() {
         when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET)).thenReturn("true");
+                BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)).thenReturn("true".getBytes());
 
         assertThat(mController.isAvailable()).isFalse();
     }
diff --git a/tests/robotests/src/com/android/settings/bluetooth/BluetoothFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/bluetooth/BluetoothFeatureProviderImplTest.java
index a921215..9ab1d87 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/BluetoothFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/BluetoothFeatureProviderImplTest.java
@@ -49,7 +49,8 @@
     @Test
     public void getBluetoothDeviceSettingsUri_containCorrectMacAddress() {
         when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_ENHANCED_SETTINGS_UI_URI)).thenReturn(SETTINGS_URI);
+                BluetoothDevice.METADATA_ENHANCED_SETTINGS_UI_URI)).thenReturn(
+                SETTINGS_URI.getBytes());
         final Uri uri = mBluetoothFeatureProvider.getBluetoothDeviceSettingsUri(mBluetoothDevice);
         assertThat(uri.toString()).isEqualTo(SETTINGS_URI);
     }
diff --git a/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java b/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
index ee79d61..1920019 100644
--- a/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
+++ b/tests/robotests/src/com/android/settings/bluetooth/UtilsTest.java
@@ -43,14 +43,8 @@
 @RunWith(RobolectricTestRunner.class)
 public class UtilsTest {
 
-    private static final String STRING_METADATA = "string_metadata";
-    private static final String BOOL_METADATA = "true";
-    private static final String INT_METADATA = "25";
-
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private Context mContext;
-    @Mock
-    private BluetoothDevice mBluetoothDevice;
 
     private MetricsFeatureProvider mMetricsFeatureProvider;
 
@@ -69,41 +63,4 @@
         verify(mMetricsFeatureProvider).visible(eq(mContext), anyInt(),
                 eq(MetricsEvent.ACTION_SETTINGS_BLUETOOTH_CONNECT_ERROR));
     }
-
-    @Test
-    public void getStringMetaData_hasMetaData_getCorrectMetaData() {
-        when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_UNTHETHERED_LEFT_ICON)).thenReturn(STRING_METADATA);
-
-        assertThat(Utils.getStringMetaData(mBluetoothDevice,
-                BluetoothDevice.METADATA_UNTHETHERED_LEFT_ICON)).isEqualTo(STRING_METADATA);
-    }
-
-    @Test
-    public void getIntMetaData_hasMetaData_getCorrectMetaData() {
-        when(mBluetoothDevice.getMetadata(
-            BluetoothDevice.METADATA_UNTHETHERED_LEFT_BATTERY)).thenReturn(INT_METADATA);
-
-        assertThat(Utils.getIntMetaData(mBluetoothDevice,
-            BluetoothDevice.METADATA_UNTHETHERED_LEFT_BATTERY))
-            .isEqualTo(Integer.parseInt(INT_METADATA));
-    }
-
-    @Test
-    public void getIntMetaData_invalidMetaData_getErrorCode() {
-        when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_UNTHETHERED_LEFT_BATTERY)).thenReturn(STRING_METADATA);
-
-        assertThat(Utils.getIntMetaData(mBluetoothDevice,
-                BluetoothDevice.METADATA_UNTHETHERED_LEFT_ICON)).isEqualTo(Utils.META_INT_ERROR);
-    }
-
-    @Test
-    public void getBooleanMetaData_hasMetaData_getCorrectMetaData() {
-        when(mBluetoothDevice.getMetadata(
-                BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET)).thenReturn(BOOL_METADATA);
-
-        assertThat(Utils.getBooleanMetaData(mBluetoothDevice,
-                BluetoothDevice.METADATA_IS_UNTHETHERED_HEADSET)).isEqualTo(true);
-    }
 }
diff --git a/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java b/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
index df52302..70816ea 100644
--- a/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/network/telephony/RenameMobileNetworkDialogFragmentTest.java
@@ -102,7 +102,7 @@
         final Button negativeButton = dialog.getButton(DialogInterface.BUTTON_NEGATIVE);
         negativeButton.performClick();
 
-        verify(mSubscriptionMgr, never()).setDisplayName(anyString(), anyInt());
+        verify(mSubscriptionMgr, never()).setDisplayName(anyString(), anyInt(), anyInt());
     }
 
     @Test
@@ -118,7 +118,8 @@
         positiveButton.performClick();
 
         final ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
-        verify(mSubscriptionMgr).setDisplayName(captor.capture(), eq(mSubscriptionId));
+        verify(mSubscriptionMgr).setDisplayName(captor.capture(), eq(mSubscriptionId),
+                eq(SubscriptionManager.NAME_SOURCE_USER_INPUT));
         assertThat(captor.getValue()).isEqualTo("test2");
     }
 
