diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 6f80e11..61b12a6 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -2620,7 +2620,6 @@
             android:name="Settings$ConfigureNotificationSettingsActivity"
             android:label="@string/configure_notification_settings"
             android:exported="true"
-            android:taskAffinity="com.android.settings"
             android:parentActivityName="Settings">
             <intent-filter android:priority="1">
                 <action android:name="android.settings.NOTIFICATION_SETTINGS" />
@@ -2951,7 +2950,6 @@
         <activity
             android:name="Settings$AppDrawOverlaySettingsActivity"
             android:label="@string/draw_overlay"
-            android:taskAffinity="com.android.settings"
             android:parentActivityName="Settings">
             <intent-filter android:priority="1">
                 <action android:name="android.settings.action.MANAGE_OVERLAY_PERMISSION" />
diff --git a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
index e71c8d1..826254e 100755
--- a/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
+++ b/src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
@@ -67,6 +67,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+
 /**
  * Dashboard fragment to display application information from Settings. This activity presents
  * extended information associated with a package like code, data, total size, permissions
@@ -350,8 +351,10 @@
         final MenuItem uninstallUpdatesItem = menu.findItem(UNINSTALL_UPDATES);
         final boolean uninstallUpdateDisabled = getContext().getResources().getBoolean(
                 R.bool.config_disable_uninstall_update);
-        uninstallUpdatesItem.setVisible(
-                mUpdatedSysApp && !mAppsControlDisallowedBySystem && !uninstallUpdateDisabled);
+        uninstallUpdatesItem.setVisible(mUserManager.isAdminUser()
+                && mUpdatedSysApp
+                && !mAppsControlDisallowedBySystem
+                && !uninstallUpdateDisabled);
         if (uninstallUpdatesItem.isVisible()) {
             RestrictedLockUtils.setMenuItemAsDisabledByAdmin(getActivity(),
                     uninstallUpdatesItem, mAppsControlDisallowedAdmin);
diff --git a/src/com/android/settings/gestures/SwipeToNotificationSettings.java b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
index c18289c..7eb3d6c 100644
--- a/src/com/android/settings/gestures/SwipeToNotificationSettings.java
+++ b/src/com/android/settings/gestures/SwipeToNotificationSettings.java
@@ -70,5 +70,10 @@
                     sir.xmlResId = R.xml.swipe_to_notification_settings;
                     return Arrays.asList(sir);
                 }
+
+                @Override
+                protected boolean isPageSearchEnabled(Context context) {
+                    return SwipeToNotificationPreferenceController.isAvailable(context);
+                }
             };
 }
diff --git a/src/com/android/settings/wifi/WifiUtils.java b/src/com/android/settings/wifi/WifiUtils.java
index 99b77d9..fd9d27e 100644
--- a/src/com/android/settings/wifi/WifiUtils.java
+++ b/src/com/android/settings/wifi/WifiUtils.java
@@ -27,6 +27,7 @@
 import android.text.TextUtils;
 
 import com.android.settingslib.wrapper.PackageManagerWrapper;
+import java.nio.charset.StandardCharsets;
 
 public class WifiUtils {
 
@@ -40,7 +41,7 @@
         if (TextUtils.isEmpty(ssid)) {
             return false;
         }
-        return ssid.length() > SSID_ASCII_MAX_LENGTH;
+        return ssid.getBytes(StandardCharsets.UTF_8).length > SSID_ASCII_MAX_LENGTH;
     }
 
     public static boolean isSSIDTooShort(String ssid) {
@@ -61,8 +62,9 @@
 
     /**
      * This method is a stripped and negated version of WifiConfigStore.canModifyNetwork.
+     *
      * @param context Context of caller
-     * @param config The WiFi config.
+     * @param config  The WiFi config.
      * @return true if Settings cannot modify the config due to lockDown.
      */
     public static boolean isNetworkLockedDown(Context context, WifiConfiguration config) {
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
index 3128f30..909d574 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java
@@ -91,7 +91,9 @@
         doReturn(mActivity).when(mFragment).getActivity();
         doReturn(mShadowContext).when(mFragment).getContext();
         doReturn(mPackageManager).when(mActivity).getPackageManager();
+        when(mUserManager.isAdminUser()).thenReturn(true);
 
+        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
         // Default to not considering any apps to be instant (individual tests can override this).
         ReflectionHelpers.setStaticField(AppUtils.class, "sInstantAppDataProvider",
                 (InstantAppDataProvider) (i -> false));
@@ -102,7 +104,7 @@
         when(mDevicePolicyManager.packageHasActiveAdmins(nullable(String.class))).thenReturn(false);
         when(mUserManager.getUsers().size()).thenReturn(2);
         ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager);
-        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
+
         final ApplicationInfo info = new ApplicationInfo();
         info.enabled = true;
         final AppEntry appEntry = mock(AppEntry.class);
@@ -118,7 +120,6 @@
         when(mDevicePolicyManager.packageHasActiveAdmins(nullable(String.class))).thenReturn(false);
         when(mUserManager.getUsers().size()).thenReturn(2);
         ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager);
-        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
         final ApplicationInfo info = new ApplicationInfo();
         info.flags = ApplicationInfo.FLAG_INSTALLED;
         info.enabled = true;
@@ -217,7 +218,6 @@
         final PackageInfo packageInfo = mock(PackageInfo.class);
 
         ReflectionHelpers.setField(mFragment, "mDpm", mDevicePolicyManager);
-        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
         ReflectionHelpers.setField(mFragment, "mPackageInfo", packageInfo);
 
         assertThat(mFragment.shouldShowUninstallForAll(appEntry)).isFalse();
@@ -258,7 +258,6 @@
         userInfos.add(new UserInfo(userID1, "User1", UserInfo.FLAG_PRIMARY));
         userInfos.add(new UserInfo(userID2, "yue", UserInfo.FLAG_GUEST));
         when(mUserManager.getUsers(true)).thenReturn(userInfos);
-        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
         final ApplicationInfo appInfo = new ApplicationInfo();
         appInfo.flags = ApplicationInfo.FLAG_INSTALLED;
         when(mPackageManager.getApplicationInfoAsUser(
@@ -282,7 +281,6 @@
         userInfos.add(new UserInfo(userID1, "User1", UserInfo.FLAG_PRIMARY));
         userInfos.add(new UserInfo(userID2, "yue", UserInfo.FLAG_GUEST));
         when(mUserManager.getUsers(true)).thenReturn(userInfos);
-        ReflectionHelpers.setField(mFragment, "mUserManager", mUserManager);
         final ApplicationInfo appInfo = new ApplicationInfo();
         appInfo.flags = ApplicationInfo.FLAG_INSTALLED;
         when(mPackageManager.getApplicationInfoAsUser(
diff --git a/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationSettingsTest.java b/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationSettingsTest.java
index 78e8603..de7b73c 100644
--- a/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/gestures/SwipeToNotificationSettingsTest.java
@@ -23,28 +23,33 @@
 
 import com.android.settings.R;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settings.testutils.shadow.ShadowUtils;
 
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
 
 import java.util.List;
 
 @RunWith(SettingsRobolectricTestRunner.class)
 public class SwipeToNotificationSettingsTest {
 
-    @Mock
     private Context mContext;
     private SwipeToNotificationSettings mFragment;
 
     @Before
     public void setUp() {
-        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
         mFragment = new SwipeToNotificationSettings();
+        ShadowUtils.reset();
+    }
+
+    @After
+    public void tearDown() {
+        ShadowUtils.reset();
     }
 
     @Test
@@ -56,10 +61,22 @@
     @Test
     public void testSearchIndexProvider_shouldIndexResource() {
         final List<SearchIndexableResource> indexRes =
-            SwipeToNotificationSettings.SEARCH_INDEX_DATA_PROVIDER
-                .getXmlResourcesToIndex(RuntimeEnvironment.application, true /* enabled */);
+                SwipeToNotificationSettings.SEARCH_INDEX_DATA_PROVIDER
+                        .getXmlResourcesToIndex(mContext, true /* enabled */);
 
         assertThat(indexRes).isNotNull();
         assertThat(indexRes.get(0).xmlResId).isEqualTo(mFragment.getPreferenceScreenResId());
     }
+
+    @Test
+    @Config(shadows = ShadowUtils.class)
+    public void getNonIndexableKeys_noFingerprintHardware_shouldSuppressPage() {
+        ShadowUtils.setFingerprintManager(null);
+
+        final List<String> niks = SwipeToNotificationSettings.SEARCH_INDEX_DATA_PROVIDER
+                .getNonIndexableKeys(mContext);
+
+        assertThat(niks).isNotEmpty();
+    }
+
 }
diff --git a/tests/robotests/src/com/android/settings/wifi/WifiUtilsTest.java b/tests/robotests/src/com/android/settings/wifi/WifiUtilsTest.java
index 1f49654..806399d 100644
--- a/tests/robotests/src/com/android/settings/wifi/WifiUtilsTest.java
+++ b/tests/robotests/src/com/android/settings/wifi/WifiUtilsTest.java
@@ -29,7 +29,7 @@
     @Test
     public void testSSID() {
         assertThat(WifiUtils.isSSIDTooLong("123")).isFalse();
-        assertThat(WifiUtils.isSSIDTooLong("☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎")).isTrue();
+        assertThat(WifiUtils.isSSIDTooLong("☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎☎")).isTrue();
 
         assertThat(WifiUtils.isSSIDTooShort("123")).isFalse();
         assertThat(WifiUtils.isSSIDTooShort("")).isTrue();
