Merge "Add extra null checks" into udc-dev
diff --git a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
index 2011725..1270671 100644
--- a/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
+++ b/src/com/android/settings/accessibility/ToggleScreenMagnificationPreferenceFragment.java
@@ -249,12 +249,18 @@
         super.onProcessArguments(arguments);
     }
 
-    private void addAlwaysOnSetting(PreferenceCategory generalCategory) {
-        if (!DeviceConfig.getBoolean(
+    private boolean isAlwaysOnSettingEnabled() {
+        final boolean defaultValue = getContext().getResources().getBoolean(
+                com.android.internal.R.bool.config_magnification_always_on_enabled);
+
+        return DeviceConfig.getBoolean(
                 DeviceConfig.NAMESPACE_WINDOW_MANAGER,
                 "AlwaysOnMagnifier__enable_always_on_magnifier",
-                false
-        )) {
+                defaultValue
+        );
+    }
+    private void addAlwaysOnSetting(PreferenceCategory generalCategory) {
+        if (!isAlwaysOnSettingEnabled()) {
             return;
         }
 
diff --git a/src/com/android/settings/applications/manageapplications/ManageApplications.java b/src/com/android/settings/applications/manageapplications/ManageApplications.java
index a6e6ac4..e0f1b5f 100644
--- a/src/com/android/settings/applications/manageapplications/ManageApplications.java
+++ b/src/com/android/settings/applications/manageapplications/ManageApplications.java
@@ -16,8 +16,6 @@
 
 package com.android.settings.applications.manageapplications;
 
-import static android.util.FeatureFlagUtils.SETTINGS_ENABLE_SPA;
-
 import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_DRAGGING;
 import static androidx.recyclerview.widget.RecyclerView.SCROLL_STATE_IDLE;
 
@@ -67,7 +65,6 @@
 import android.provider.Settings;
 import android.text.TextUtils;
 import android.util.ArraySet;
-import android.util.FeatureFlagUtils;
 import android.util.IconDrawableFactory;
 import android.util.Log;
 import android.view.LayoutInflater;
@@ -728,9 +725,6 @@
                         R.string.long_background_tasks_label);
                 break;
             case LIST_TYPE_CLONED_APPS:
-                if (!FeatureFlagUtils.isEnabled(getContext(), SETTINGS_ENABLE_SPA)) {
-                    return;
-                }
                 int userId = UserHandle.getUserId(mCurrentUid);
                 UserInfo userInfo = mUserManager.getUserInfo(userId);
                 if (userInfo != null && !userInfo.isCloneProfile()) {