summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values-fa/strings.xml22
-rw-r--r--res/values-ru/strings.xml20
-rw-r--r--res/values-sw/strings.xml2
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/xml/security_settings_misc.xml1
-rw-r--r--src/com/android/settings/CryptKeeper.java40
-rw-r--r--src/com/android/settings/fuelgauge/PowerUsageDetail.java8
-rw-r--r--src/com/android/settings/fuelgauge/Utils.java17
-rw-r--r--src/com/android/settings/users/UserSettings.java7
9 files changed, 61 insertions, 58 deletions
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index a7852ac..fd5e936 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -291,7 +291,7 @@
<string name="date_time_set_time" msgid="5716856602742530696">"تنظیم ساعت"</string>
<string name="date_time_set_timezone" msgid="5045627174274377814">"انتخاب منطقهٔ زمانی"</string>
<string name="date_time_set_date" msgid="7021491668550232105">"تنظیم تاریخ"</string>
- <string name="date_time_date_format" msgid="6951498879879281102">"فرمت تاریخ را انتخاب کنید"</string>
+ <string name="date_time_date_format" msgid="6951498879879281102">"انتخاب قالب تاریخ"</string>
<string name="zone_list_menu_sort_alphabetically" msgid="5683377702671088588">"ترتیب الفبایی"</string>
<string name="zone_list_menu_sort_by_timezone" msgid="2720190443744884114">"بر اساس منطقهٔ زمانی مرتب شود"</string>
<string name="date_picker_title" msgid="1338210036394128512">"تاریخ"</string>
@@ -758,8 +758,8 @@
<string name="device_info_settings" product="default" msgid="475872867864762157">"وضعیت تلفن"</string>
<string name="system_update_settings_list_item_title" msgid="3342887311059985961">"به‌روزرسانی‌های سیستم"</string>
<string name="system_update_settings_list_item_summary" msgid="3853057315907710747"></string>
- <string name="firmware_version" msgid="4801135784886859972">"نسخه Android"</string>
- <string name="model_number" msgid="3765737700545384794">"شماره مدل"</string>
+ <string name="firmware_version" msgid="4801135784886859972">"نسخهٔ Android"</string>
+ <string name="model_number" msgid="3765737700545384794">"شمارهٔ مدل"</string>
<string name="fcc_equipment_id" msgid="149114368246356737">"شناسه دستگاه"</string>
<string name="baseband_version" msgid="1848990160763524801">"نسخهٔ باند پایه"</string>
<string name="kernel_version" msgid="9192574954196167602">"نسخهٔ اصلی"</string>
@@ -781,8 +781,8 @@
<string name="status_prl_version" msgid="1007470446618081441">"نسخه PRL"</string>
<string name="status_meid_number" msgid="1751442889111731088">"MEID"</string>
<string name="status_icc_id" msgid="943368755577172747">"ICCID"</string>
- <string name="status_network_type" msgid="3279383550222116235">"نوع شبکه تلفن همراه"</string>
- <string name="status_data_state" msgid="5503181397066522950">"وضعیت شبکه تلفن همراه"</string>
+ <string name="status_network_type" msgid="3279383550222116235">"نوع شبکهٔ تلفن همراه"</string>
+ <string name="status_data_state" msgid="5503181397066522950">"وضعیت شبکهٔ تلفن همراه"</string>
<string name="status_service_state" msgid="2323931627519429503">"وضعیت سرویس"</string>
<string name="status_signal_strength" msgid="3732655254188304547">"قدرت سیگنال"</string>
<string name="status_roaming" msgid="2638800467430913403">"رومینگ"</string>
@@ -951,9 +951,9 @@
<string name="bluetooth_untether_blank" msgid="2871192409329334813">"<xliff:g id="DEVICE_NAME">%1$s</xliff:g> از اتصال اینترنتی با تلفن همراه قطع می‌شود."</string>
<string name="tethering_help_button_text" msgid="656117495547173630">"راهنمایی"</string>
<string name="network_settings_title" msgid="7967552516440151852">"شبکه‌های تلفن همراه"</string>
- <string name="location_title" msgid="1029961368397484576">"موقعیت مکانی من"</string>
- <string name="location_network_based" msgid="7472814266821714527">"مکان شبکه تلفن همراه و Wi-Fi"</string>
- <string name="location_neighborhood_level" msgid="5626515380188353712">"بگذارید برنامه‌ها از سرویس مکانی Google بسرعت مکان شما را تخمین بزنند. داده‌های ناشناس مکان، جمع‌آوری و به Google ارسال می‌شوند."</string>
+ <string name="location_title" msgid="1029961368397484576">"موقعیت مکانی شما"</string>
+ <string name="location_network_based" msgid="7472814266821714527">"مکان شبکهٔ تلفن همراه و Wi-Fi"</string>
+ <string name="location_neighborhood_level" msgid="5626515380188353712">"به برنامه‌ها اجازه داده شود با استفاده از خدمات مکانی Google مکان شما را سریع‌تر تخمین بزنند. داده‌های مکان به‌طور ناشناس جمع‌آوری شده و به Google ارسال خواهد شد."</string>
<string name="location_neighborhood_level_wifi" msgid="7457348712272184793">"موقعیت مکانی تعیین شده توسط Wi-Fi"</string>
<string name="location_gps" msgid="8392461023569708478">"ماهواره‌های GPS"</string>
<string name="location_street_level" product="tablet" msgid="1669562198260860802">"به برنامه‌های کاربردی اجازه داده شود برای مشخص کردن دقیق مکان شما از GPS رایانه لوحیتان استفاده کنند"</string>
@@ -963,8 +963,8 @@
<string name="assisted_gps_disabled" msgid="6982698333968010748">"استفاده از سرور برای کمک به GPS (برای ارتقای عملکرد GPS، علامت آن را حذف کنید)"</string>
<string name="use_location_title" msgid="5206937465504979977">"مکان و جستجوی Google"</string>
<string name="use_location_summary" msgid="3978805802386162520">"به Google اجازه داده شود از مکان شما برای بهبود نتایج جستجو و سایر سرویس‌ها استفاده کند"</string>
- <string name="location_access_title" msgid="7064108942964081243">"دسترسی به موقعیت مکانی من"</string>
- <string name="location_access_summary" msgid="69031404093194341">"بگذارید برنامه‌های کاربردی که اجازه شما را درخواست کرده‌اند از اطلاعات موقعیت مکانی شما استفاده کنند."</string>
+ <string name="location_access_title" msgid="7064108942964081243">"دسترسی به موقعیت مکانی شما"</string>
+ <string name="location_access_summary" msgid="69031404093194341">"به برنامه‌هایی که از شما اجازه گرفته‌اند اجازه داده شود از اطلاعات مکانی شما استفاده کنند"</string>
<string name="location_sources_heading" msgid="1278732419851088319">"منابع موقعیت مکانی"</string>
<string name="about_settings" product="tablet" msgid="593457295516533765">"دربارهٔ رایانهٔ لوحی"</string>
<string name="about_settings" product="default" msgid="1743378368185371685">"دربارهٔ گوشی"</string>
@@ -1350,7 +1350,7 @@
<string name="battery_stats_gps_on_label" msgid="1193657533641951256">"GPS در"</string>
<string name="battery_stats_wifi_running_label" msgid="3093545080361658269">"Wi-Fi"</string>
<string name="battery_stats_wake_lock_label" msgid="1908942681902324095">"بیدار"</string>
- <string name="battery_stats_phone_signal_label" msgid="4137799310329041341">"سیگنال شبکه تلفن همراه"</string>
+ <string name="battery_stats_phone_signal_label" msgid="4137799310329041341">"سیگنال شبکهٔ تلفن همراه"</string>
<!-- no translation found for battery_stats_last_duration (1535831453827905957) -->
<skip />
<string name="awake" msgid="387122265874485088">"زمان بیداری دستگاه"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 11da9fa..1e9d847 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -347,19 +347,19 @@
<string name="unlock_backup_info_summary" msgid="108524727803788172">"Выберите альтернативный способ разблокировки экрана."</string>
<string name="unlock_set_unlock_off_title" msgid="7117155352183088342">"Нет"</string>
<string name="unlock_set_unlock_off_summary" msgid="94361581669110415"></string>
- <string name="unlock_set_unlock_none_title" msgid="2871898266296656162">"Прокрутка"</string>
+ <string name="unlock_set_unlock_none_title" msgid="2871898266296656162">"Слайдер"</string>
<string name="unlock_set_unlock_none_summary" msgid="8914673583104628191">"Защита отключена"</string>
<string name="unlock_set_unlock_biometric_weak_title" msgid="2227215291604628670">"Фейсконтроль"</string>
<string name="unlock_set_unlock_biometric_weak_summary" msgid="180083326982058964">"Низкий уровень защиты (экспериментальная функция)"</string>
<string name="unlock_set_unlock_pattern_title" msgid="2912067603917311700">"Графический ключ"</string>
<string name="unlock_set_unlock_pattern_summary" msgid="7062696666227725593">"Средний уровень защиты"</string>
- <string name="unlock_set_unlock_pin_title" msgid="5846029709462329515">"PIN"</string>
+ <string name="unlock_set_unlock_pin_title" msgid="5846029709462329515">"PIN-код"</string>
<string name="unlock_set_unlock_pin_summary" msgid="907878650556383388">"Уровень безопасности от среднего до высокого"</string>
<string name="unlock_set_unlock_password_title" msgid="8775603825675090937">"Пароль"</string>
<string name="unlock_set_unlock_password_summary" msgid="8856220848940929546">"Высокий уровень защиты"</string>
<string name="unlock_set_unlock_disabled_summary" msgid="2120729867788851674">"Запрещено администратором, политикой шифрования или хранилищем учетных данных"</string>
<string name="unlock_set_unlock_mode_off" msgid="5881952274566013651">"Нет"</string>
- <string name="unlock_set_unlock_mode_none" msgid="5660014471997663139">"Перетащить значок блокировки"</string>
+ <string name="unlock_set_unlock_mode_none" msgid="5660014471997663139">"Для разблокировки экрана сдвиньте слайдер"</string>
<string name="unlock_set_unlock_mode_biometric_weak" msgid="3008473624490350142">"Фейсконтроль"</string>
<string name="unlock_set_unlock_mode_pattern" msgid="7837270780919299289">"Графический ключ"</string>
<string name="unlock_set_unlock_mode_pin" msgid="3541326261341386690">"PIN-код"</string>
@@ -996,16 +996,16 @@
<string name="lockpassword_pattern_set_toast" msgid="6867259621331406236">"Ключ был установлен"</string>
<string name="lock_settings_title" msgid="335025124489630932">"Блокировка экрана"</string>
<string name="lockpattern_change_lock_pattern_label" msgid="5679630792003440352">"Изменить ключ"</string>
- <string name="lockpattern_change_lock_pin_label" msgid="266707138486731661">"Изменить ПИН-код разблокировки"</string>
+ <string name="lockpattern_change_lock_pin_label" msgid="266707138486731661">"Изменить PIN-код"</string>
<string name="lockpattern_need_to_unlock" msgid="757935356911054465">"Начертите существующий ключ"</string>
<string name="lockpattern_need_to_unlock_wrong" msgid="4694973540770105678">"Повторите попытку"</string>
- <string name="lockpattern_recording_intro_header" msgid="308287052221942814">"Начертите графический ключ разблокировки"</string>
+ <string name="lockpattern_recording_intro_header" msgid="308287052221942814">"Начертите ключ разблокировки"</string>
<string name="lockpattern_recording_intro_footer" msgid="1118579101409152113">"Для справки нажмите \"Меню\"."</string>
- <string name="lockpattern_recording_inprogress" msgid="4622772178078818425">"По завершении отпустите палец."</string>
- <string name="lockpattern_recording_incorrect_too_short" msgid="3103250430366718996">"Соедините точки (как минимум <xliff:g id="NUMBER">%d</xliff:g>). Повторите попытку:"</string>
- <string name="lockpattern_pattern_entered_header" msgid="8378617839439987962">"Графический ключ сохранен."</string>
- <string name="lockpattern_need_to_confirm" msgid="5144676887162575050">"Для подтверждения начертите графический ключ повторно:"</string>
- <string name="lockpattern_pattern_confirmed_header" msgid="2223856038485537716">"Новый графический ключ разблокировки:"</string>
+ <string name="lockpattern_recording_inprogress" msgid="4622772178078818425">"По завершении отпустите палец"</string>
+ <string name="lockpattern_recording_incorrect_too_short" msgid="3103250430366718996">"Соедините не менее <xliff:g id="NUMBER">%d</xliff:g> точек"</string>
+ <string name="lockpattern_pattern_entered_header" msgid="8378617839439987962">"Графический ключ сохранен"</string>
+ <string name="lockpattern_need_to_confirm" msgid="5144676887162575050">"Начертите ключ еще раз"</string>
+ <string name="lockpattern_pattern_confirmed_header" msgid="2223856038485537716">"Новый ключ разблокировки"</string>
<string name="lockpattern_confirm_button_text" msgid="1128204343957002841">"Подтвердить"</string>
<string name="lockpattern_restart_button_text" msgid="3337574403350953926">"Воспроизвести повторно"</string>
<string name="lockpattern_retry_button_text" msgid="1949847413862309134">"Повтор"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index d146fe5..daa7b8d 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -748,7 +748,7 @@
<string name="sim_enter_cancel" msgid="6240422158517208036">"Ghairi"</string>
<string name="device_info_settings" product="tablet" msgid="1119755927536987178">"Hadhi ya kompyuta ndogo"</string>
<string name="device_info_settings" product="default" msgid="475872867864762157">"Hali ya simu"</string>
- <string name="system_update_settings_list_item_title" msgid="3342887311059985961">"Visasisho vya mfumo"</string>
+ <string name="system_update_settings_list_item_title" msgid="3342887311059985961">"Masasisho ya mfumo"</string>
<string name="system_update_settings_list_item_summary" msgid="3853057315907710747"></string>
<string name="firmware_version" msgid="4801135784886859972">"Toleo la Android"</string>
<string name="model_number" msgid="3765737700545384794">"Nambari ya mtindo"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d6abe94..97f2af3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2828,8 +2828,6 @@
<string name="auto_punctuate_summary">Press Space key twice to insert \u0022.\u0022</string>
<!-- On Security & location settings screen, setting check box name. Title of the checkbox to set whether password edit fields will show the most recent character typed and then hide it, or just hide it right away. By hide, I mean mask it out. -->
<string name="show_password">Make passwords visible</string>
- <!-- On Security & location settings screen, setting check box summary. Summary for the visible passwords setting. -->
- <string name="show_password_summary"></string>
<!-- Warning message about security implications of enabling an input method, displayed as a dialog
message when the user selects to enable an IME. -->
<string name="ime_security_warning">This input method may be able to collect
diff --git a/res/xml/security_settings_misc.xml b/res/xml/security_settings_misc.xml
index b0313eb..ee87e51 100644
--- a/res/xml/security_settings_misc.xml
+++ b/res/xml/security_settings_misc.xml
@@ -33,7 +33,6 @@
<CheckBoxPreference android:key="show_password"
android:title="@string/show_password"
- android:summary="@string/show_password_summary"
android:persistent="false"/>
</PreferenceCategory>
diff --git a/src/com/android/settings/CryptKeeper.java b/src/com/android/settings/CryptKeeper.java
index f07d6fa..94c793d 100644
--- a/src/com/android/settings/CryptKeeper.java
+++ b/src/com/android/settings/CryptKeeper.java
@@ -55,6 +55,7 @@ import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
+import com.android.internal.statusbar.StatusBarIcon;
import com.android.internal.telephony.ITelephony;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneConstants;
@@ -229,6 +230,16 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
};
private AudioManager mAudioManager;
+ /** The status bar where back/home/recent buttons are shown. */
+ private StatusBarManager mStatusBar;
+
+ /** All the widgets to disable in the status bar */
+ final private static int sWidgetsToDisable = StatusBarManager.DISABLE_EXPAND
+ | StatusBarManager.DISABLE_NOTIFICATION_ICONS
+ | StatusBarManager.DISABLE_NOTIFICATION_ALERTS
+ | StatusBarManager.DISABLE_SYSTEM_INFO
+ | StatusBarManager.DISABLE_HOME
+ | StatusBarManager.DISABLE_RECENT;
/** @return whether or not this Activity was started for debugging the UI only. */
private boolean isDebugView() {
@@ -269,6 +280,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
*/
@Override
public void onBackPressed() {
+ // In the rare case that something pressed back even though we were disabled.
if (mIgnoreBack)
return;
super.onBackPressed();
@@ -299,13 +311,8 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
// Disable the status bar, but do NOT disable back because the user needs a way to go
// from keyboard settings and back to the password screen.
- StatusBarManager sbm = (StatusBarManager) getSystemService(Context.STATUS_BAR_SERVICE);
- sbm.disable(StatusBarManager.DISABLE_EXPAND
- | StatusBarManager.DISABLE_NOTIFICATION_ICONS
- | StatusBarManager.DISABLE_NOTIFICATION_ALERTS
- | StatusBarManager.DISABLE_SYSTEM_INFO
- | StatusBarManager.DISABLE_HOME
- | StatusBarManager.DISABLE_RECENT);
+ mStatusBar = (StatusBarManager) getSystemService(Context.STATUS_BAR_SERVICE);
+ mStatusBar.disable(sWidgetsToDisable);
setAirplaneModeIfNecessary();
mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
@@ -403,7 +410,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
((ProgressBar) findViewById(R.id.progress_bar)).setIndeterminate(true);
// Ignore all back presses from now, both hard and soft keys.
- mIgnoreBack = true;
+ setBackFunctionality(false);
// Start the first run of progress manually. This method sets up messages to occur at
// repeated intervals.
updateProgress();
@@ -469,7 +476,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
if (mCooldown <= 0) {
// Re-enable the password entry and back presses.
mPasswordEntry.setEnabled(true);
- mIgnoreBack = false;
+ setBackFunctionality(true);
status.setText(R.string.enter_password);
} else {
CharSequence template = getText(R.string.crypt_keeper_cooldown);
@@ -481,6 +488,19 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
}
}
+ /**
+ * Sets the back status: enabled or disabled according to the parameter.
+ * @param isEnabled true if back is enabled, false otherwise.
+ */
+ private final void setBackFunctionality(boolean isEnabled) {
+ mIgnoreBack = !isEnabled;
+ if (isEnabled) {
+ mStatusBar.disable(sWidgetsToDisable);
+ } else {
+ mStatusBar.disable(sWidgetsToDisable | StatusBarManager.DISABLE_BACK);
+ }
+ }
+
private void passwordEntryInit() {
mPasswordEntry = (EditText) findViewById(R.id.passwordEntry);
mPasswordEntry.setOnEditorActionListener(this);
@@ -610,7 +630,7 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
// Disable the password entry and back keypress while checking the password. These
// we either be re-enabled if the password was wrong or after the cooldown period.
mPasswordEntry.setEnabled(false);
- mIgnoreBack = true;
+ setBackFunctionality(false);
Log.d(TAG, "Attempting to send command to decrypt");
new DecryptTask().execute(password);
diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
index 4f98163..753bf82 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
@@ -34,10 +34,10 @@ import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Process;
-import android.os.UserHandle;
import android.preference.PreferenceActivity;
import android.provider.Settings;
import android.text.TextUtils;
+import android.text.format.Formatter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -310,10 +310,12 @@ public class PowerUsageDetail extends Fragment implements Button.OnClickListener
switch (mTypes[i]) {
case R.string.usage_type_data_recv:
case R.string.usage_type_data_send:
- value = Utils.formatBytes(getActivity(), mValues[i]);
+ final long bytes = (long) (mValues[i]);
+ value = Formatter.formatFileSize(getActivity(), bytes);
break;
case R.string.usage_type_no_coverage:
- value = String.format("%d%%", (int) Math.floor(mValues[i]));
+ final int percentage = (int) Math.floor(mValues[i]);
+ value = getActivity().getString(R.string.percentage, percentage);
break;
case R.string.usage_type_gps:
mUsesGps = true;
diff --git a/src/com/android/settings/fuelgauge/Utils.java b/src/com/android/settings/fuelgauge/Utils.java
index 2ffc9de..5c99a86 100644
--- a/src/com/android/settings/fuelgauge/Utils.java
+++ b/src/com/android/settings/fuelgauge/Utils.java
@@ -64,21 +64,4 @@ public class Utils {
}
return sb.toString();
}
-
- /**
- * Formats data size in KB, MB, from the given bytes.
- * @param context the application context
- * @param bytes data size in bytes
- * @return the formatted size such as 4.52 MB or 245 KB or 332 bytes
- */
- public static String formatBytes(Context context, double bytes) {
- // TODO: I18N
- if (bytes > 1000 * 1000) {
- return String.format("%.2f MB", ((int) (bytes / 1000)) / 1000f);
- } else if (bytes > 1024) {
- return String.format("%.2f KB", ((int) (bytes / 10)) / 100f);
- } else {
- return String.format("%d bytes", (int) bytes);
- }
- }
}
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 632dfe5..dbaaf37 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -26,6 +26,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.UserInfo;
+import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
@@ -477,6 +478,7 @@ public class UserSettings extends SettingsPreferenceFragment
}
private void loadIconsAsync(List<Integer> missingIcons) {
+ final Resources resources = getResources();
new AsyncTask<List<Integer>, Void, Void>() {
@Override
protected void onPostExecute(Void result) {
@@ -485,17 +487,16 @@ public class UserSettings extends SettingsPreferenceFragment
@Override
protected Void doInBackground(List<Integer>... values) {
- if (getActivity() == null) return null;
for (int userId : values[0]) {
Bitmap bitmap = mUserManager.getUserIcon(userId);
- Drawable d = new BitmapDrawable(getResources(), bitmap);
+ Drawable d = new BitmapDrawable(resources, bitmap);
mUserIcons.append(userId, d);
}
return null;
}
}.execute(missingIcons);
-
}
+
private void assignProfilePhoto(final UserInfo user) {
if (!Utils.copyMeProfilePhoto(getActivity(), user)) {
assignDefaultPhoto(user);