Merge "Import translations. DO NOT MERGE ANYWHERE" into main
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 9722a85..fd6bcbf 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -7,13 +7,19 @@
       "name": "SettingsUnitTests",
       "options": [
         {
-          "include-filter": "com.android.settings.password"
-        },
-        {
           "include-filter": "com.android.settings.biometrics"
         },
         {
           "include-filter": "com.android.settings.biometrics2"
+        },
+        {
+          "include-filter": "com.android.settings.password"
+        },
+        {
+          "include-filter": "com.android.settings.safetycenter"
+        },
+        {
+          "include-filter": "com.android.settings.security"
         }
       ]
     }
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c5d000b..707bc69 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -11613,9 +11613,9 @@
       other   {# SIMs are available on this device, but only one can be used at a time}
     }</string>
     <!-- String indicating that we are activating the profile [CHAR LIMIT=NONE] -->
-    <string name="choose_sim_activating">Activating<xliff:g id="ellipsis" example="...">&#8230;</xliff:g></string>
+    <string name="choose_sim_activating">Turning on<xliff:g id="ellipsis" example="...">&#8230;</xliff:g></string>
     <!-- String indicating that we failed to activate the selected profile [CHAR LIMIT=NONE] -->
-    <string name="choose_sim_could_not_activate">Couldn\u2019t activate this SIM right now</string>
+    <string name="choose_sim_could_not_activate">Couldn\u2019t turn on this SIM right now</string>
 
     <!-- Strings for switch SIM confirmation dialog. -->
     <!--  The title text of switch SIM confirmation dialog. [CHAR LIMIT=NONE] -->
diff --git a/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java b/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
index 441c249..08e993b 100644
--- a/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
+++ b/src/com/android/settings/network/telephony/ConvertToEsimPreferenceController.java
@@ -20,6 +20,7 @@
 import static androidx.lifecycle.Lifecycle.Event.ON_STOP;
 
 import android.Manifest;
+import android.app.Activity;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -143,6 +144,7 @@
         Intent intent = new Intent(EuiccManager.ACTION_CONVERT_TO_EMBEDDED_SUBSCRIPTION);
         intent.putExtra("subId", mSubId);
         mContext.startActivity(intent);
+        ((Activity) mContext).finish();
         return true;
     }
 
diff --git a/src/com/android/settings/safetycenter/BiometricsSafetySource.java b/src/com/android/settings/safetycenter/BiometricsSafetySource.java
index 94db71f..8e1c786 100644
--- a/src/com/android/settings/safetycenter/BiometricsSafetySource.java
+++ b/src/com/android/settings/safetycenter/BiometricsSafetySource.java
@@ -62,6 +62,16 @@
         }
         final Context profileParentContext =
                 context.createContextAsUser(profileParentUserHandle, 0);
+        if (android.os.Flags.allowPrivateProfile() && userManager.isPrivateProfile()) {
+            // SC always expects a response from the source if the broadcast has been sent for this
+            // source, therefore, we need to send a null SafetySourceData.
+            SafetyCenterManagerWrapper.get().setSafetySourceData(
+                    context,
+                    SAFETY_SOURCE_ID,
+                    /* safetySourceData= */ null,
+                    safetyEvent);
+            return;
+        }
 
         final BiometricNavigationUtils biometricNavigationUtils =
                 new BiometricNavigationUtils(userId);
diff --git a/src/com/android/settings/safetycenter/SafetyCenterManagerWrapper.java b/src/com/android/settings/safetycenter/SafetyCenterManagerWrapper.java
index e720526..55eb4f1 100644
--- a/src/com/android/settings/safetycenter/SafetyCenterManagerWrapper.java
+++ b/src/com/android/settings/safetycenter/SafetyCenterManagerWrapper.java
@@ -22,6 +22,8 @@
 import android.safetycenter.SafetySourceData;
 import android.util.Log;
 
+import androidx.annotation.Nullable;
+
 import com.android.internal.annotations.VisibleForTesting;
 
 /** A wrapper for the SafetyCenterManager system service. */
@@ -49,7 +51,7 @@
 
     /** Sets the latest safety source data for Safety Center. */
     public void setSafetySourceData(Context context, String safetySourceId,
-            SafetySourceData safetySourceData,
+            @Nullable SafetySourceData safetySourceData,
             SafetyEvent safetyEvent) {
         SafetyCenterManager safetyCenterManager =
                 context.getSystemService(SafetyCenterManager.class);
diff --git a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
index bf2c84a..6c4c5b4 100644
--- a/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
+++ b/tests/unit/src/com/android/settings/testutils/FakeFeatureFactory.java
@@ -101,18 +101,20 @@
     public FastPairFeatureProvider mFastPairFeatureProvider;
     public PrivateSpaceLoginFeatureProvider mPrivateSpaceLoginFeatureProvider;
 
-    /**
-     * Call this in {@code @Before} method of the test class to use fake factory.
-     */
+    /** Call this in {@code @Before} method of the test class to use fake factory. */
     public static FakeFeatureFactory setupForTest() {
         FakeFeatureFactory factory = new FakeFeatureFactory();
-        setFactory(getAppContext(), factory);
+        try {
+            setFactory(getAppContext(), factory);
+        } catch (NoSuchMethodError ex) {
+            // The getAppContext() @JvmStatic method doesn't appear to generated in AOSP. Falling
+            // back to using the companion object method instead.
+            setFactory(FeatureFactory.Companion.getAppContext(), factory);
+        }
         return factory;
     }
 
-    /**
-     * FeatureFactory constructor.
-     */
+    /** FeatureFactory constructor. */
     public FakeFeatureFactory() {
         supportFeatureProvider = mock(SupportFeatureProvider.class);
         metricsFeatureProvider = mock(MetricsFeatureProvider.class);