Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c5788b5 authored by Peter Wang's avatar Peter Wang Committed by Android (Google) Code Review
Browse files

Merge "Use ICU style for choose_sim_text to handle special cases in RU" into sc-dev

parents fb359d18 3b03d484
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -12863,7 +12863,11 @@
    <!--  The title text of choose SIM activity. [CHAR LIMIT=NONE] -->
    <string name="choose_sim_title">Choose a number to use</string>
    <!--  The body text of choose SIM activity. [CHAR LIMIT=NONE] -->
    <string name="choose_sim_text"><xliff:g id="number" example="2">%1$d</xliff:g> numbers are available on this device, but only one can be used at a time</string>
    <string name="choose_sim_text">{count, plural,
      =1      {1 number is available on this device, but only one can be used at a time}
      =2      {2 numbers are available on this device, but only one can be used at a time}
      other   {# numbers 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 indicating that we failed to activate the selected profile [CHAR LIMIT=NONE] -->
+10 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.sim;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.icu.text.MessageFormat;
import android.os.Bundle;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
@@ -43,7 +44,10 @@ import com.google.android.setupdesign.items.ItemGroup;
import com.google.android.setupdesign.items.RecyclerItemAdapter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;

/** Activity to show a list of profiles for user to choose. */
public class ChooseSimActivity extends Activity
@@ -108,7 +112,12 @@ public class ChooseSimActivity extends Activity
            subscriptionCount++;
        }
        layout.setHeaderText(getString(R.string.choose_sim_title));
        layout.setDescriptionText(getString(R.string.choose_sim_text, subscriptionCount));
        MessageFormat msgFormat = new MessageFormat(
            getString(R.string.choose_sim_text),
            Locale.getDefault());
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("count", subscriptionCount);
        layout.setDescriptionText(msgFormat.format(arguments));

        displaySubscriptions();