Import translations. DO NOT MERGE
am: b4e1d0073c  -s ours

* commit 'b4e1d0073c343e34f0ac96735184b4e2f6facfae':
  Import translations. DO NOT MERGE

Change-Id: Ide395994528a8f73930869c39474ad529ea534b1
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
old mode 100644
new mode 100755
index 95c8cf2..ff487ab
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -85,14 +85,14 @@
         </activity>
         <activity android:name="StkDialogActivity"
             android:configChanges="orientation|locale|screenSize|keyboardHidden"
-            android:theme="@android:style/Theme.Dialog"
+            android:theme="@android:style/Theme.DeviceDefault.Dialog"
             android:exported="false"
             android:taskAffinity="android.task.stk.StkLauncherActivity">
         </activity>
 
         <activity android:name="ToneDialog"
             android:exported="false"
-            android:theme="@android:style/Theme.Dialog">
+            android:theme="@android:style/Theme.DeviceDefault.Dialog">
         </activity>
 
         <receiver android:name="com.android.stk.StkCmdReceiver">
diff --git a/res/layout/stk_msg_dialog.xml b/res/layout/stk_msg_dialog.xml
old mode 100644
new mode 100755
index 1838337..731d74c
--- a/res/layout/stk_msg_dialog.xml
+++ b/res/layout/stk_msg_dialog.xml
@@ -46,15 +46,14 @@
         android:layout_height="wrap_content"
         android:minHeight="54dip"
         android:orientation="vertical" >
-        <LinearLayout
+        <LinearLayout style="?android:attr/buttonBarStyle"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="horizontal"
-            android:background="@color/ltgrey"
             android:paddingTop="4dip"
             android:paddingLeft="2dip"
             android:paddingRight="2dip" >
-            <Button
+            <Button style="?android:attr/buttonBarButtonStyle"
                 android:id="@+id/button_cancel"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
@@ -62,7 +61,7 @@
                 android:layout_weight="1"
                 android:maxLines="2"
                 android:text="@string/button_cancel" />
-            <Button
+            <Button style="?android:attr/buttonBarButtonStyle"
                 android:id="@+id/button_ok"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
diff --git a/res/values-be-rBY/strings.xml b/res/values-be-rBY/strings.xml
deleted file mode 100644
index 3a3c907..0000000
--- a/res/values-be-rBY/strings.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2007 The Android Open Source Project
-
-     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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8396461461738434341">"Інструменты SIM"</string>
-    <string name="menu_end_session" msgid="7368541737750982217">"Скончыць сеанс"</string>
-    <string name="help" msgid="9209980881219397319">"Даведка"</string>
-    <string name="menu_back" msgid="301227740977453364">"Назад"</string>
-    <string name="service_name" msgid="6860303747999592491">"Імя службы"</string>
-    <string name="stk_no_service" msgid="5427773116839809131">"Абслугоўванне недаступна"</string>
-    <string name="button_ok" msgid="5760722312558549555">"ОК"</string>
-    <string name="button_cancel" msgid="1997847915560800261">"Скасаваць"</string>
-    <string name="button_yes" msgid="624420260648337203">"Так"</string>
-    <string name="button_no" msgid="1824959157582605627">"Не"</string>
-    <string name="alphabet" msgid="1583185545938805861">"Літары"</string>
-    <string name="digits" msgid="1746796679021682388">"Лічбы (0-9, *, #, +)"</string>
-    <string name="default_call_setup_msg" msgid="7960194995759849940">"Ідзе выклік..."</string>
-    <string name="default_setup_call_msg" msgid="6126904475461162162">"Выклік наладжваецца"</string>
-    <string name="stk_app_state" msgid="18582277302584082">"Стан прыкладання"</string>
-    <string name="enable_app" msgid="3701224550936728203">"Уключана"</string>
-    <string name="disable_app" msgid="6725081975611415214">"Адключана"</string>
-    <string name="stk_dialog_title" msgid="6954825385456886726">"Інструменты SIM"</string>
-    <string name="default_open_channel_msg" msgid="2216070254100295924">"Адкрыты канал?"</string>
-    <string name="default_send_data_msg" msgid="6011219698689931272">"Адпраўка дадзеных"</string>
-    <string name="default_receive_data_msg" msgid="618096941772010682">"Атрыманне дадзеных"</string>
-    <string name="default_close_channel_msg" msgid="765364262263839824">"Канал закрыты"</string>
-    <string name="stk_dialog_accept" msgid="8498901537508923727">"ТАК"</string>
-    <string name="stk_dialog_reject" msgid="921848059485746796">"НЕ"</string>
-    <string name="no_sim_card_inserted" msgid="5316620398365235988">"Калі ласка, устаўце SIM-карту, каб запусціць Інструменты SIM."</string>
-</resources>
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs-rBA/strings.xml
deleted file mode 100644
index d6a2bcd..0000000
--- a/res/values-bs-rBA/strings.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2007 The Android Open Source Project
-
-     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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8396461461738434341">"SIM Toolkit"</string>
-    <string name="menu_end_session" msgid="7368541737750982217">"Završiti sesiju"</string>
-    <string name="help" msgid="9209980881219397319">"Pomoć"</string>
-    <string name="menu_back" msgid="301227740977453364">"Nazad"</string>
-    <string name="service_name" msgid="6860303747999592491">"Ime usluge"</string>
-    <string name="stk_no_service" msgid="5427773116839809131">"Usluga nije dostupna"</string>
-    <string name="button_ok" msgid="5760722312558549555">"UREDU"</string>
-    <string name="button_cancel" msgid="1997847915560800261">"Otkaži"</string>
-    <string name="button_yes" msgid="624420260648337203">"Da"</string>
-    <string name="button_no" msgid="1824959157582605627">"Ne"</string>
-    <string name="alphabet" msgid="1583185545938805861">"Pisma"</string>
-    <string name="digits" msgid="1746796679021682388">"Znamenke (0-9, *, #, +)"</string>
-    <string name="default_call_setup_msg" msgid="7960194995759849940">"Poziv u toku"</string>
-    <string name="default_setup_call_msg" msgid="6126904475461162162">"Poziv se uspostavlja"</string>
-    <string name="stk_app_state" msgid="18582277302584082">"Stanje aplikacije"</string>
-    <string name="enable_app" msgid="3701224550936728203">"Omogućeno"</string>
-    <string name="disable_app" msgid="6725081975611415214">"Onemogućeno"</string>
-    <string name="stk_dialog_title" msgid="6954825385456886726">"SIM ToolKit"</string>
-    <string name="default_open_channel_msg" msgid="2216070254100295924">"Otvoriti kanal?"</string>
-    <string name="default_send_data_msg" msgid="6011219698689931272">"Slanje podataka"</string>
-    <string name="default_receive_data_msg" msgid="618096941772010682">"Primanje podataka"</string>
-    <string name="default_close_channel_msg" msgid="765364262263839824">"Kanal je zatvoren"</string>
-    <string name="stk_dialog_accept" msgid="8498901537508923727">"DA"</string>
-    <string name="stk_dialog_reject" msgid="921848059485746796">"NE"</string>
-    <string name="no_sim_card_inserted" msgid="5316620398365235988">"Ubacite SIM karticu kako biste pokrenuli SIM Toolkit."</string>
-</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 723eab4..5f1f98a 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -29,7 +29,7 @@
     <string name="alphabet" msgid="1583185545938805861">"الفبا"</string>
     <string name="digits" msgid="1746796679021682388">"ارقام (0-9، *، #، +)"</string>
     <string name="default_call_setup_msg" msgid="7960194995759849940">"تماس در حال انجام..."</string>
-    <string name="default_setup_call_msg" msgid="6126904475461162162">"تماس درحال راه‌اندازی"</string>
+    <string name="default_setup_call_msg" msgid="6126904475461162162">"تماس در حال تنظیم"</string>
     <string name="stk_app_state" msgid="18582277302584082">"حالت برنامه"</string>
     <string name="enable_app" msgid="3701224550936728203">"فعال شد"</string>
     <string name="disable_app" msgid="6725081975611415214">"غیرفعال شد"</string>
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml
index 77052fe..bb1750c 100644
--- a/res/values-gu-rIN/strings.xml
+++ b/res/values-gu-rIN/strings.xml
@@ -22,7 +22,7 @@
     <string name="menu_back" msgid="301227740977453364">"પાછળ"</string>
     <string name="service_name" msgid="6860303747999592491">"સેવાનું નામ"</string>
     <string name="stk_no_service" msgid="5427773116839809131">"કોઈ સેવા ઉપલબ્ધ નથી"</string>
-    <string name="button_ok" msgid="5760722312558549555">"ઓકે"</string>
+    <string name="button_ok" msgid="5760722312558549555">"ઑકે"</string>
     <string name="button_cancel" msgid="1997847915560800261">"રદ કરો"</string>
     <string name="button_yes" msgid="624420260648337203">"હા"</string>
     <string name="button_no" msgid="1824959157582605627">"નહીં"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index e2b7a86..fa58f0e 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -22,7 +22,7 @@
     <string name="menu_back" msgid="301227740977453364">"Буцах"</string>
     <string name="service_name" msgid="6860303747999592491">"Үйлчилгээний нэр"</string>
     <string name="stk_no_service" msgid="5427773116839809131">"Ашиглах боломжтой үйлчилгээ байхгүй"</string>
-    <string name="button_ok" msgid="5760722312558549555">"OK"</string>
+    <string name="button_ok" msgid="5760722312558549555">"Тийм"</string>
     <string name="button_cancel" msgid="1997847915560800261">"Цуцлах"</string>
     <string name="button_yes" msgid="624420260648337203">"Тийм"</string>
     <string name="button_no" msgid="1824959157582605627">"Үгүй"</string>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 6314419..e66a882 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -22,10 +22,10 @@
     <string name="menu_back" msgid="301227740977453364">"နောက်ပြန်"</string>
     <string name="service_name" msgid="6860303747999592491">"ဝန်ဆောင်မှုအမည်"</string>
     <string name="stk_no_service" msgid="5427773116839809131">"ဆက်သွယ်ချိတ်ဆက်ရန် ဝန်ဆောင်မှု တစ်ခုမှမရှိပါ"</string>
-    <string name="button_ok" msgid="5760722312558549555">"အိုကေ"</string>
-    <string name="button_cancel" msgid="1997847915560800261">"မလုပ်တော့ပါ"</string>
+    <string name="button_ok" msgid="5760722312558549555">"ကောင်းပြီ"</string>
+    <string name="button_cancel" msgid="1997847915560800261">"ထားတော့"</string>
     <string name="button_yes" msgid="624420260648337203">"မှန်ပါသည်"</string>
-    <string name="button_no" msgid="1824959157582605627">"No"</string>
+    <string name="button_no" msgid="1824959157582605627">"မဟုတ်ပါ"</string>
     <string name="alphabet" msgid="1583185545938805861">"အက္ခရာများ"</string>
     <string name="digits" msgid="1746796679021682388">"ဂဏန်းများ (0-9, *, #, +)"</string>
     <string name="default_call_setup_msg" msgid="7960194995759849940">"ခေါ်ဆိုနေပါသည်"</string>
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa-rIN/strings.xml
index 14e2c14..240e175 100644
--- a/res/values-pa-rIN/strings.xml
+++ b/res/values-pa-rIN/strings.xml
@@ -18,7 +18,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_name" msgid="8396461461738434341">"SIM Toolkit"</string>
     <string name="menu_end_session" msgid="7368541737750982217">"ਸੈਸ਼ਨ ਖ਼ਤਮ ਕਰੋ"</string>
-    <string name="help" msgid="9209980881219397319">"ਮਦਦ"</string>
+    <string name="help" msgid="9209980881219397319">"ਸਹਾਇਤਾ"</string>
     <string name="menu_back" msgid="301227740977453364">"ਪਿੱਛੇ"</string>
     <string name="service_name" msgid="6860303747999592491">"ਸੇਵਾ ਦਾ ਨਾਮ"</string>
     <string name="stk_no_service" msgid="5427773116839809131">"ਕੋਈ ਸੇਵਾ ਉਪਲਬਧ ਨਹੀਂ"</string>
@@ -32,11 +32,11 @@
     <string name="default_setup_call_msg" msgid="6126904475461162162">"ਕਾਲ ਸੈਟਅਪ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ"</string>
     <string name="stk_app_state" msgid="18582277302584082">"ਐਪਲੀਕੇਸ਼ਨ ਸਥਿਤੀ"</string>
     <string name="enable_app" msgid="3701224550936728203">"ਸਮਰੱਥ ਬਣਾਇਆ"</string>
-    <string name="disable_app" msgid="6725081975611415214">"ਅਯੋਗ ਬਣਾਇਆ"</string>
+    <string name="disable_app" msgid="6725081975611415214">"ਅਸਮਰੱਥ ਬਣਾਇਆ"</string>
     <string name="stk_dialog_title" msgid="6954825385456886726">"SIM ToolKit"</string>
     <string name="default_open_channel_msg" msgid="2216070254100295924">"ਕੀ ਚੈਨਲ ਖੋਲ੍ਹਣਾ ਹੈ?"</string>
-    <string name="default_send_data_msg" msgid="6011219698689931272">"ਡੈਟਾ ਭੇਜ ਰਿਹਾ ਹੈ"</string>
-    <string name="default_receive_data_msg" msgid="618096941772010682">"ਡੈਟਾ ਪ੍ਰਾਪਤ ਕਰ ਰਿਹਾ ਹੈ"</string>
+    <string name="default_send_data_msg" msgid="6011219698689931272">"ਡਾਟਾ ਭੇਜ ਰਿਹਾ ਹੈ"</string>
+    <string name="default_receive_data_msg" msgid="618096941772010682">"ਡਾਟਾ ਪ੍ਰਾਪਤ ਕਰ ਰਿਹਾ ਹੈ"</string>
     <string name="default_close_channel_msg" msgid="765364262263839824">"ਚੈਨਲ ਬੰਦ ਕੀਤਾ"</string>
     <string name="stk_dialog_accept" msgid="8498901537508923727">"ਹਾਂ"</string>
     <string name="stk_dialog_reject" msgid="921848059485746796">"ਨਹੀਂ"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index e8ef4bb..1e56049 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -17,7 +17,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_name" msgid="8396461461738434341">"SIM Toolkit"</string>
-    <string name="menu_end_session" msgid="7368541737750982217">"Sfârșitul sesiunii"</string>
+    <string name="menu_end_session" msgid="7368541737750982217">"Sfârşitul sesiunii"</string>
     <string name="help" msgid="9209980881219397319">"Ajutor"</string>
     <string name="menu_back" msgid="301227740977453364">"Înapoi"</string>
     <string name="service_name" msgid="6860303747999592491">"Nume serviciu"</string>
@@ -34,7 +34,7 @@
     <string name="enable_app" msgid="3701224550936728203">"Activat"</string>
     <string name="disable_app" msgid="6725081975611415214">"Dezactivat"</string>
     <string name="stk_dialog_title" msgid="6954825385456886726">"SIM Toolkit"</string>
-    <string name="default_open_channel_msg" msgid="2216070254100295924">"Deschideți canalul?"</string>
+    <string name="default_open_channel_msg" msgid="2216070254100295924">"Deschideţi canalul?"</string>
     <string name="default_send_data_msg" msgid="6011219698689931272">"Se trimit date"</string>
     <string name="default_receive_data_msg" msgid="618096941772010682">"Se primesc date"</string>
     <string name="default_close_channel_msg" msgid="765364262263839824">"Canal închis"</string>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index b1a0967..eab6544 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -16,7 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8396461461738434341">"SIM karta menyusi"</string>
+    <string name="app_name" msgid="8396461461738434341">"SIM vositalar majmuasi"</string>
     <string name="menu_end_session" msgid="7368541737750982217">"Sessiyani yakunlash"</string>
     <string name="help" msgid="9209980881219397319">"Yordam"</string>
     <string name="menu_back" msgid="301227740977453364">"Orqaga"</string>
@@ -33,7 +33,7 @@
     <string name="stk_app_state" msgid="18582277302584082">"Ilova holati"</string>
     <string name="enable_app" msgid="3701224550936728203">"Yoniq"</string>
     <string name="disable_app" msgid="6725081975611415214">"O‘chiq"</string>
-    <string name="stk_dialog_title" msgid="6954825385456886726">"SIM karta menyusi"</string>
+    <string name="stk_dialog_title" msgid="6954825385456886726">"SIM vositalar majmuasi"</string>
     <string name="default_open_channel_msg" msgid="2216070254100295924">"Kanal ochilsinmi?"</string>
     <string name="default_send_data_msg" msgid="6011219698689931272">"Ma’lumot yuborilmoqda"</string>
     <string name="default_receive_data_msg" msgid="618096941772010682">"Ma’lumot qabul qilinmoqda"</string>
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 8019a0c..4a80c2a 100755
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -918,6 +918,13 @@
             launchEventMessage(slotId);
             break;
         case LAUNCH_BROWSER:
+            // The device setup process should not be interrupted by launching browser.
+            if (Settings.Global.getInt(mContext.getContentResolver(),
+                    Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
+                CatLog.d(this, "The command is not performed if the setup has not been completed.");
+                sendScreenBusyResponse(slotId);
+                break;
+            }
             TextMessage alphaId = mStkContext[slotId].mCurrentCmd.geTextMessage();
             if ((mStkContext[slotId].mCurrentCmd.getBrowserSettings().mode
                     == LaunchBrowserMode.LAUNCH_IF_NOT_ALREADY_LAUNCHED) &&
diff --git a/src/com/android/stk/StkDialogActivity.java b/src/com/android/stk/StkDialogActivity.java
index 24e1068..1d4fde3 100644
--- a/src/com/android/stk/StkDialogActivity.java
+++ b/src/com/android/stk/StkDialogActivity.java
@@ -210,6 +210,9 @@
         super.onStop();
         CatLog.d(LOG_TAG, "onStop - before Send CONFIRM false mIsResponseSent[" +
                 mIsResponseSent + "], sim id: " + mSlotId);
+        if (!mTextMsg.responseNeeded) {
+            return;
+        }
         if (!mIsResponseSent) {
             appService.getStkContext(mSlotId).setPendingDialogInstance(this);
         } else {
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java
index 73529e9..6c5b88c 100644
--- a/src/com/android/stk/StkLauncherActivity.java
+++ b/src/com/android/stk/StkLauncherActivity.java
@@ -161,6 +161,8 @@
 
     private int addStkMenuListItems() {
         String appName = mContext.getResources().getString(R.string.app_name);
+        StkAppService appService = StkAppService.getInstance();
+        String stkMenuTitle = null;
         String stkItemName = null;
         int simCount = TelephonyManager.from(mContext).getSimCount();
         mStkMenuList = new ArrayList<Item>();
@@ -171,8 +173,9 @@
             if (mTm.hasIccCard(i)) {
                 CatLog.d(LOG_TAG, "SIM " + i + " add to menu.");
                 mSingleSimId = i;
-                stkItemName = new StringBuilder(appName).append(" ")
-                        .append(Integer.toString(i + 1)).toString();
+                stkMenuTitle = appService.getMainMenu(i).title;
+                stkItemName = new StringBuilder(stkMenuTitle == null ? appName : stkMenuTitle)
+                    .append(" ").append(Integer.toString(i + 1)).toString();
                 Item item = new Item(i + 1, stkItemName, mBitMap);
                 item.id = i;
                 mStkMenuList.add(item);