Merge "Rename setDefaultDialerApplication for consistency" into mnc-dev
diff --git a/Android.mk b/Android.mk
index 81f04f7..7043ad4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -18,6 +18,11 @@
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+ifneq ($(INCREMENTAL_BUILDS),)
+ LOCAL_PROGUARD_ENABLED := disabled
+ LOCAL_JACK_ENABLED := incremental
+endif
+
include frameworks/opt/setupwizard/navigationbar/common.mk
include frameworks/opt/setupwizard/library/common.mk
include frameworks/base/packages/SettingsLib/common.mk
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0ea75cd..435236a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -75,6 +75,7 @@
<uses-permission android:name="android.permission.OVERRIDE_WIFI_CONFIG" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.MANAGE_FINGERPRINT" />
+ <uses-permission android:name="android.permission.USER_ACTIVITY" />
<application android:label="@string/settings_label"
android:icon="@mipmap/ic_launcher_settings"
diff --git a/res/drawable/ic_cancel.xml b/res/drawable/ic_cancel.xml
new file mode 100644
index 0000000..b90c18c
--- /dev/null
+++ b/res/drawable/ic_cancel.xml
@@ -0,0 +1,25 @@
+<!--
+ Copyright (C) 2015 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M24.0,4.0C12.9,4.0 4.0,12.9 4.0,24.0s8.9,20.0 20.0,20.0c11.1,0.0 20.0,-8.9 20.0,-20.0S35.1,4.0 24.0,4.0zM34.0,31.2L31.2,34.0L24.0,26.8L16.8,34.0L14.0,31.2l7.2,-7.2L14.0,16.8l2.8,-2.8l7.2,7.2l7.2,-7.2l2.8,2.8L26.8,24.0L34.0,31.2z"/>
+</vector>
diff --git a/res/drawable/ic_settings_memory.xml b/res/drawable/ic_settings_memory.xml
new file mode 100644
index 0000000..a459465
--- /dev/null
+++ b/res/drawable/ic_settings_memory.xml
@@ -0,0 +1,37 @@
+<!--
+ Copyright (C) 2015 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="32dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M6.0,4.0l0.0,16.0 12.0,0.0 0.0,-16.0 -12.0,0.0z
+ M6.0,5.25l0,1.5 -3,0 0,-1.5 3,0z
+ M6.0,9.25l0,1.5 -3,0 0,-1.5 3,0z
+ M6.0,13.25l0,1.5 -3,0 0,-1.5 3,0z
+ M6.0,17.25l0,1.5 -3,0 0,-1.5 3,0z
+ M21.0,5.25l0,1.5 -3,0 0,-1.5 3,0z
+ M21.0,9.25l0,1.5 -3,0 0,-1.5 3,0z
+ M21.0,13.25l0,1.5 -3,0 0,-1.5 3,0z
+ M21.0,17.25l0,1.5 -3,0 0,-1.5 3,0z
+
+ M11.5,14.5l1,0 0,3 -1,0 0,-3z
+ M13.25,14.5l1,0 0,3 -1,0 0,-3z
+ M15.0,14.5l1,0 0,3 -1,0 0,-3z
+ "
+ android:fillColor="#ff009587" />
+</vector>
diff --git a/res/layout/app_item_linear_color.xml b/res/layout/app_item_linear_color.xml
new file mode 100755
index 0000000..62eebb9
--- /dev/null
+++ b/res/layout/app_item_linear_color.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeight"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip">
+
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size"
+ android:layout_marginEnd="8dip"
+ android:scaleType="centerInside"
+ android:contentDescription="@null"
+ android:duplicateParentState="true" />
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:duplicateParentState="true">
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dip"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:textAppearance="@android:style/TextAppearance.Material.Subhead"
+ android:textAlignment="viewStart"
+ android:duplicateParentState="true" />
+
+ <TextView
+ android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textAlignment="viewStart"
+ android:duplicateParentState="true" />
+
+ </LinearLayout>
+
+ <com.android.settings.applications.LinearColorBar
+ android:id="@+id/linear_color_bar"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:duplicateParentState="true" />
+
+</LinearLayout>
diff --git a/res/layout/cancel_pref_widget.xml b/res/layout/cancel_pref_widget.xml
new file mode 100644
index 0000000..0b3ef21
--- /dev/null
+++ b/res/layout/cancel_pref_widget.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/cancel"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:clickable="true"
+ android:src="@drawable/ic_cancel"
+ />
diff --git a/res/layout/fingerprint_enroll_enrolling_content.xml b/res/layout/fingerprint_enroll_enrolling_content.xml
index 5570bdb..6da744e 100644
--- a/res/layout/fingerprint_enroll_enrolling_content.xml
+++ b/res/layout/fingerprint_enroll_enrolling_content.xml
@@ -38,6 +38,7 @@
android:max="10000"
android:progress="0"
android:indeterminate="false"
- android:progressDrawable="@drawable/fingerprint_progress_ring" />
+ android:progressDrawable="@drawable/fingerprint_progress_ring"
+ android:rotation="-90"/>
</RelativeLayout>
diff --git a/res/layout/memory_key.xml b/res/layout/memory_key.xml
new file mode 100644
index 0000000..62db2fc
--- /dev/null
+++ b/res/layout/memory_key.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical|end"
+ android:layout_marginBottom="5dp" >
+
+ <ImageView
+ android:layout_width="16dp"
+ android:layout_height="16dp"
+ android:scaleType="centerInside"
+ android:src="@color/memory_avg_use"
+ android:contentDescription="@null" />
+
+ <TextView
+ android:id="@+id/memory_avg"
+ android:text="@string/memory_avg_use"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="16dp" />
+
+ <ImageView
+ android:layout_width="16dp"
+ android:layout_height="16dp"
+ android:scaleType="centerInside"
+ android:src="@color/memory_max_use"
+ android:contentDescription="@null" />
+
+ <TextView
+ android:id="@+id/memory_max"
+ android:text="@string/memory_max_use"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:layout_marginEnd="16dp" />
+
+</LinearLayout>
diff --git a/res/layout/proc_stats_ui.xml b/res/layout/proc_stats_ui.xml
new file mode 100644
index 0000000..5f78178
--- /dev/null
+++ b/res/layout/proc_stats_ui.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/all_details"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/memory_state"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
+ android:layout_marginBottom="10dp"
+ android:textAppearance="@android:style/TextAppearance.Material.Subhead"
+ />
+
+ <com.android.settings.applications.LinearColorBar
+ android:id="@+id/color_bar"
+ android:layout_width="match_parent"
+ android:layout_height="30dp"
+ />
+
+ <TextView
+ android:id="@+id/memory_used"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dp"
+ android:layout_marginBottom="10dp"
+ android:textAppearance="@android:style/TextAppearance.Material.Small"
+ android:textColor="?android:attr/textColorSecondary"
+ />
+
+ <include layout="@layout/memory_key" />
+
+</LinearLayout>
+
diff --git a/res/layout/process_preference_category.xml b/res/layout/process_preference_category.xml
new file mode 100644
index 0000000..18ea23c
--- /dev/null
+++ b/res/layout/process_preference_category.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="16dip"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingTop="16dip">
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="@android:style/TextAppearance.Material.Body2"
+ android:textColor="?android:attr/colorAccent" />
+
+ <TextView
+ android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:textAppearance="@android:style/TextAppearance.Material.Body2"
+ android:textColor="?android:attr/colorAccent" />
+
+</RelativeLayout>
diff --git a/res/layout/process_stats_details.xml b/res/layout/process_stats_details.xml
index 738805a..aa402f6 100644
--- a/res/layout/process_stats_details.xml
+++ b/res/layout/process_stats_details.xml
@@ -14,68 +14,34 @@
limitations under the License.
-->
-<ScrollView
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/all_details"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:clipToPadding="false"
- android:scrollbarStyle="@integer/preference_scrollbar_style">
+ android:orientation="vertical"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
- <LinearLayout
- android:id="@+id/all_details"
+ <com.android.settings.applications.LinearColorBar
+ android:id="@+id/color_bar"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingTop="5dip"
- android:paddingBottom="5dip"
- android:orientation="vertical"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
+ android:layout_height="40dp"
+ android:layout_marginTop="12dp"
+ android:layout_marginBottom="10dp"
+ />
- <include layout="@layout/app_percentage_item" />
+ <include layout="@layout/memory_key" />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
+ <!-- Force stop and report buttons -->
+ <LinearLayout
+ android:id="@+id/two_buttons_panel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="6dip"
+ android:orientation="vertical">
- <!-- Force stop and report buttons -->
- <LinearLayout
- android:id="@+id/two_buttons_panel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingBottom="6dip"
- android:orientation="vertical">
-
- <include layout="@layout/two_buttons_panel"/>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/processes"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <!-- Insert process items here -->
-
- </LinearLayout>
-
- <TextView
- android:id="@+id/services_label"
- style="?android:attr/listSeparatorTextViewStyle"
- android:text="@string/services_subtitle" />
-
- <LinearLayout
- android:id="@+id/services"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <!-- Insert service items here -->
-
- </LinearLayout>
-
- </LinearLayout>
-
+ <include layout="@layout/two_buttons_panel"/>
</LinearLayout>
-</ScrollView>
+</LinearLayout>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index eff2b90..e7e3c27 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep, except when kept unlocked by <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Show owner info on lock screen"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Lock screen message"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Enable widgets"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Disabled by administrator"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"None"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"e.g. Joe\'s Android."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"User info"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Show profile info on lock screen"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Profile info"</string>
@@ -2445,8 +2441,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"text correction correct sound vibrate auto language gesture suggest suggestion theme offensive word type emoji international"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"reset preferences default"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"emergency ice app default"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"dialler default"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"apps download applications system"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"apps permissions security"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"apps default"</string>
@@ -2656,10 +2651,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"App data usage"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> used since <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Storage used"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Notifications"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Normal"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Block"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Sensitive"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Priority"</string>
@@ -2701,16 +2694,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Default Apps"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Browser app"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"No default Browser"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Dialler app"</string>
<string name="default_app" msgid="6864503001385843060">"(Default)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Apps storage"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Usage access"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Permit usage access"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"App usage preferences"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Usage access allows an app to track what other apps that you\'re using and how often, as well as your operator, language settings and other details."</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index eff2b90..e7e3c27 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep, except when kept unlocked by <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Show owner info on lock screen"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Lock screen message"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Enable widgets"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Disabled by administrator"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"None"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"e.g. Joe\'s Android."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"User info"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Show profile info on lock screen"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Profile info"</string>
@@ -2445,8 +2441,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"text correction correct sound vibrate auto language gesture suggest suggestion theme offensive word type emoji international"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"reset preferences default"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"emergency ice app default"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"dialler default"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"apps download applications system"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"apps permissions security"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"apps default"</string>
@@ -2656,10 +2651,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"App data usage"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> used since <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Storage used"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Notifications"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Normal"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Block"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Sensitive"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Priority"</string>
@@ -2701,16 +2694,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Default Apps"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Browser app"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"No default Browser"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Dialler app"</string>
<string name="default_app" msgid="6864503001385843060">"(Default)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Apps storage"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Usage access"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Permit usage access"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"App usage preferences"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Usage access allows an app to track what other apps that you\'re using and how often, as well as your operator, language settings and other details."</string>
</resources>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index eff2b90..e7e3c27 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> after sleep, except when kept unlocked by <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Show owner info on lock screen"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Lock screen message"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Enable widgets"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Disabled by administrator"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"None"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"e.g. Joe\'s Android."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"User info"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Show profile info on lock screen"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Profile info"</string>
@@ -2445,8 +2441,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"text correction correct sound vibrate auto language gesture suggest suggestion theme offensive word type emoji international"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"reset preferences default"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"emergency ice app default"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"dialler default"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"apps download applications system"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"apps permissions security"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"apps default"</string>
@@ -2656,10 +2651,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"App data usage"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> used since <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Storage used"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Notifications"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Normal"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Block"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Sensitive"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Priority"</string>
@@ -2701,16 +2694,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Default Apps"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Browser app"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"No default Browser"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Dialler app"</string>
<string name="default_app" msgid="6864503001385843060">"(Default)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Apps storage"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Usage access"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Permit usage access"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"App usage preferences"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Usage access allows an app to track what other apps that you\'re using and how often, as well as your operator, language settings and other details."</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 4a9289a..5bd28af 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> پس از خواب"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> بعد از حالت خواب، به جز زمانی که قفل صفحه توسط <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g> باز نگه داشته شود"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"نمایش اطلاعات مالک در صفحه قفل"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"پیام صفحه قفل"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"فعال کردن ابزارکها"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"توسط سرپرست غیرفعال شد"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"هیچکدام"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"مثلاً Android امیر."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"اطلاعات کاربر"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"نمایش اطلاعات نمایه در صفحه قفل"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"اطلاعات نمایه"</string>
@@ -2445,8 +2441,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"تصحیح نوشتار تصحیح صدا لرزش خودکار زبان اشاره پیشنهاد دادن پیشنهاد طرح زمینه کلمه توهینآمیز نوع ایموجی بینالمللی"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"بازنشانی پیشفرض تنظیمات ترجیحی"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"پیشفرض برنامه اضطراری در موارد اضطراری"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"پیشفرض شمارهگیر"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"برنامهها دانلود برنامهها سیستم"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"امنیت مجوزهای برنامهها"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"پیشفرض برنامهها"</string>
@@ -2656,10 +2651,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"میزان مصرف داده در برنامه"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> از <xliff:g id="DATE">%2$s</xliff:g> استفاده شد"</string>
<string name="storage_used" msgid="7128074132917008743">"فضای ذخیره استفاده شده"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"اعلانها"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"معمولی"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"مسدود"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"حساس"</string>
<string name="notifications_priority" msgid="1812498477331421719">"اولویتدار"</string>
@@ -2701,16 +2694,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"برنامههای پیشفرض"</string>
<string name="default_browser_title" msgid="8101772675085814670">"برنامه مرورگر"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"بدون مرورگر پیشفرض"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"برنامه شمارهگیر"</string>
<string name="default_app" msgid="6864503001385843060">"(پیشفرض)"</string>
<string name="apps_storage" msgid="4353308027210435513">"فضای ذخیرهسازی برنامهها"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"دسترسی به میزان استفاده"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"اجازه دسترسی به میزان استفاده"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"تنظیمات ترجیحی میزان مصرف برنامه"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"دسترسی به میزان استفاده، امکان ردیابی اینکه از چه برنامههای دیگری و چند وقت یکبار استفاده میکنید و همچنین شرکت مخابراتیتان، تنظیمات زبان و سایر جزئیات را به برنامه میدهد."</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 51ab12b..7f5afd6 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> setelah tidur"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> setelah tidur, kecuali jika tetap dikunci oleh <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Tampilkan info pemilik pada layar pengunci"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Pesan kunci layar"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Aktifkan widget"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Dinonaktifkan oleh administrator"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"Tidak ada"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"Misalnya, Android Joko."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"Info pengguna"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Tampilkan info profil di layar kunci"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Info profil"</string>
@@ -2454,8 +2450,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"teks koreksi benar suara getar otomatis bahasa isyarat sarankan saran tema menyinggung kata jenis emoji internasional"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"setel ulang preferensi default"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"aplikasi ice darurat default"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"pemanggil default"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"apl unduh aplikasi sistem"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"keamanan izin aplikasi"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"aplikasi default"</string>
@@ -2665,10 +2660,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"Penggunaan data aplikasi"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> digunakan sejak <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Penyimpanan yang terpakai"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Notifikasi"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Normal"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Blokir"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Sensitif"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Prioritas"</string>
@@ -2710,16 +2703,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Aplikasi Default"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Aplikasi browser"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"Tidak ada Browser default"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Aplikasi pemanggil"</string>
<string name="default_app" msgid="6864503001385843060">"(Default)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Penyimpanan aplikasi"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Akses penggunaan"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Izinkan akses penggunaan"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"Preferensi penggunaan aplikasi"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Akses penggunaan memungkinkan aplikasi melacak apa saja aplikasi lain yang Anda gunakan dan seberapa sering, serta operator, setelan bahasa, dan detail lain."</string>
</resources>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 565e40a..64103a6 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -572,7 +572,7 @@
<string name="wifi_display_options_forget" msgid="9119048225398894580">"Ұмыту"</string>
<string name="wifi_display_options_done" msgid="5703116500357822557">"Орындалды"</string>
<string name="wifi_display_options_name" msgid="4756080222307467898">"Есім"</string>
- <string name="wifi_alert_lockdown_by_device_owner" msgid="5063705929160653088">"<xliff:g id="APP_NAME">%1$s</xliff:g> құрылғыңызды басқарады және осы Wi-Fi желісін өзгертуді және жоюды өшірді. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз."</string>
+ <string name="wifi_alert_lockdown_by_device_owner" msgid="5063705929160653088">"Құрылғыңызды басқарып тұрған <xliff:g id="APP_NAME">%1$s</xliff:g> осы Wi-Fi желісін өзгерту және жою мүмкіндігін өшіріп қойды. Қосымша ақпарат алу үшін әкімшіге хабарласыңыз."</string>
<string name="nfc_quick_toggle_title" msgid="6769159366307299004">"ЖӨБ"</string>
<string name="nfc_quick_toggle_summary" product="tablet" msgid="8302974395787498915">"Планшет басқа құрылғымен қатынасқанда дерек алмастыруға рұқсат беру"</string>
<string name="nfc_quick_toggle_summary" product="default" msgid="5237208142892767592">"Телефон басқа құрылғымен қатынасқанда дерек алмастыру мүмкіндігін береді"</string>
@@ -2219,7 +2219,7 @@
<string name="vpn_connect_to" msgid="5965299358485793260">"<xliff:g id="PROFILE">%s</xliff:g> профайлына жалғау"</string>
<string name="vpn_disconnect_confirm" msgid="2555877026824771115">"Бұл VPN желісін ажырату"</string>
<string name="vpn_disconnect" msgid="7426570492642111171">"Ажырату"</string>
- <string name="vpn_version" msgid="1939804054179766249">"Нұсқа: <xliff:g id="VERSION">%s</xliff:g>"</string>
+ <string name="vpn_version" msgid="1939804054179766249">"Нұсқасы: <xliff:g id="VERSION">%s</xliff:g>"</string>
<string name="vpn_title" msgid="6317731879966640551">"VPN (Виртуалды жеке желі)"</string>
<string name="vpn_create" msgid="5628219087569761496">"ВЖЖ профайлы"</string>
<string name="vpn_menu_edit" msgid="408275284159243490">"Профайлды өзгерту"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index c4bb36d..32babe4 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"Идэвхгүй болсны дараа <xliff:g id="TIMEOUT_STRING">%1$s</xliff:g>"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> унтах горимд шилжсэний дараа, <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>-с түгжээг нь онгойлгоостой байлгаагүй үед"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Дэлгэц түгжигдэхэд эзэмшигчийн мэдээллийг харуулах"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Түгжээний дэлгэцийн зурвас"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Хэрэгсэл идэвхжүүлэх"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Админ идэвхгүй болгосон"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"Байхгүй"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"Жишээ нь Joe-ийн Андройд."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"Хэрэглэгчийн мэдээлэл"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Дэлгэц түгжигдэхэд профайлын мэдээллийг харуулах"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Профайлын мэдээлэл"</string>
@@ -350,16 +346,12 @@
<item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> хурууны хээг бүртгэсэн</item>
</plurals>
<string name="security_settings_fingerprint_enroll_onboard_title" msgid="4735546436672054254">"Хурууны хээний тохиргоо"</string>
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message (451317492588352122) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_1 (3118715258753165968) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_2 (4158160658182631304) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_onboard_message" msgid="451317492588352122">"Таны хурууны хээг ашиглан дэлгэцийн түгжээг тайлах эсвэл худалдан авалт баталгаажуулахын тулд бид дараах зүйлийг хийх шаардлагатай:"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_1" msgid="3118715258753165968">"Нөөцлөлтийн дэлгэц түгжих аргыг тохируулах"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_2" msgid="4158160658182631304">"Хурууны хээгээ нэмнэ үү"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_title" msgid="5877265753699187149">"Мэдрэгч хай"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_message" msgid="1959655161889313661">"Утасныхаа ард хурууны хээ мэдрэгчийг байршуул"</string>
- <!-- no translation found for security_settings_fingerprint_enroll_find_sensor_content_description (2058830032070449160) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_find_sensor_content_description" msgid="2058830032070449160">"Төхөөрөмж болон хурууны хээний мэдрэгчийн байршлын зураг"</string>
<string name="security_settings_fingerprint_enroll_dialog_name_label" msgid="7086763077909041106">"Нэр"</string>
<string name="security_settings_fingerprint_enroll_dialog_ok" msgid="4150384963879569750">"ТИЙМ"</string>
<string name="security_settings_fingerprint_enroll_dialog_delete" msgid="4114615413240707936">"Устгах"</string>
@@ -369,16 +361,11 @@
<string name="security_settings_fingerprint_enroll_repeat_message" msgid="8846866512704467036">"Хурууны хээ мэдрэгч дээр хурууны хээ нь орсон хурууг уншуулна уу мөн чичиргээг мэдэрсний дараа хурууг авна уу."</string>
<string name="security_settings_fingerprint_enroll_finish_title" msgid="4798692662828257300">"Хурууны хээг нэмж оруулсан болно!"</string>
<string name="security_settings_fingerprint_enroll_finish_message" msgid="835496875787664316">"Энэ тэмдэг гарч ирсэн тохиолдолд та өөрийн хурууны хээг оруулах эсвэл худалдан авалт хийх зөвшөөрөл олгох боломжтой болох юм."</string>
- <!-- no translation found for security_settings_fingerprint_enroll_setup_screen_lock (8205113627804480642) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_done (4014607378328187567) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_title (4360990635212143565) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_message (5053971232594165142) -->
- <skip />
- <!-- no translation found for fingerprint_enroll_button_add (6317978977419045463) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_setup_screen_lock" msgid="8205113627804480642">"Дэлгэцийн түгжээ тохируулах"</string>
+ <string name="security_settings_fingerprint_enroll_done" msgid="4014607378328187567">"Үйлдлийг гүйцэтгэсэн байна"</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_title" msgid="4360990635212143565">"Уучлаарай, энэ мэдрэгч биш байна"</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_message" msgid="5053971232594165142">"Төхөөрөмж дээрээ хурууны хээ мэдрэгчээ ашиглана уу"</string>
+ <string name="fingerprint_enroll_button_add" msgid="6317978977419045463">"Өөрийг нэмэх"</string>
<string name="fingerprint_enroll_button_next" msgid="6247009337616342759">"Дараах"</string>
<string name="crypt_keeper_settings_title" msgid="4219233835490520414">"Шифрлэлт"</string>
<string name="crypt_keeper_encrypt_title" product="tablet" msgid="1060273569887301457">"Таблетыг шифрлэх"</string>
@@ -2444,8 +2431,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"Текст залруулах дууг залруулах чичиргээ авто хэл дохио зөвлөх дэвсгэр доромжилсон үг бичих дүрс олон улс"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"Эрхэмлэх тохиргоог анхны хэлбэрт оруулах"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"Онцгой нөхцөлд ашиглах апп"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"залгагчийн тотмол тохиргоо"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"апп, апп татах, систем"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"апп-уудын зөвшөөрлийн аюулгүй байдал"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"үндсэн апликейшнүүд"</string>
@@ -2653,10 +2639,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"Апп дата ашиглалт"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="DATE">%2$s</xliff:g>-аас <xliff:g id="SIZE">%1$s</xliff:g> ашигласан"</string>
<string name="storage_used" msgid="7128074132917008743">"Санах ойн хэрэглээ"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Мэдэгдэл"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Энгийн"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Хориглох"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Нууц"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Чухал"</string>
@@ -2698,16 +2682,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Үндсэн Апликейшн"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Хөтөч апп"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"Үндсэн веб хөтөч байхгүй"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Залгагч апп"</string>
<string name="default_app" msgid="6864503001385843060">"(Үндсэн)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Апп-ны санах ой"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Ашиглалтын хандалт"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Зөвшөөрлийн ашиглалтын хандалт"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"Апп хэрэглээний тохиргоо"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Ашиглалтын хандалт нь таны хэрэглэж буй бусад апп болон хэрэглээний давтамж , мөн зөөгч, хэлний тохиргоо болон бусад мэдээллийг хянахад тусалдаг."</string>
</resources>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index ebece7d..ddca814 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> ပိတ်ပြီးနောက်"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> အိပ်ပြီးနောက်မှာ၊ <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>က သော့ဖွင့်ထားချိန်မှ လွဲပြီး"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"သော့ခတ်ထားသောမျက်နှာပြင်ပေါ်ပိုင်ရှင်အကြောင်းပြရန်"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"မျက်နှာပြင် သော့ချစာ"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"ဝဒ်ဂျက်များဖွင့်ရန်"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"အက်ဒ်မင်မှ အသုံးမပြုနိုင်ရန် ပိတ်ထားခြင်း"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"မရှိ"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"ဥပမာ၊ Joe ၏ Android"</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"သုံးစွဲသူအကြောင်း"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"သော့ခတ်ထားသောမျက်နှာပြင်ပေါ်သုံးစွဲသူ၏အကြောင်းပြရန်"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"ကိုယ်ရေးအချက်အလက်"</string>
@@ -2455,8 +2451,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"စာတို အမှားပြင်ဆင်ခြင်း အမှန် အသံ တုန်ခါခြင်း အလိုအလျောက် ဘာသာစကား အမူအရာ အကြံပေး အကြံပြုခြင်း ပုံစံ ထိခိုက်နစ်နာစေသော စကားလုံး စာရိုက် အီမိုဂျီရုပ်ပုံ အပြည်ပြည်ဆိုင်ရာ"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"ရွေးချယ်စရာများအား မူလအတိုင်း ပြန်ညှိရန်"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"မူလ အရေးပေါ် ice app"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"အလိုအလျောက် ဖုန်းခေါ်ကွက်"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"app များ ဒေါင်းလုပ်ရယူသော အပ္ပလီကေးရှင်းစနစ်"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"အပ်ဖ်များ ခွင့်ပြုချက်လုံခြုံရေး"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"apps များ ပုံမှန်"</string>
@@ -2666,10 +2661,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"App ဒေတာ သုံးစွဲမှု"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="DATE">%2$s</xliff:g> မှစ၍ <xliff:g id="SIZE">%1$s</xliff:g> အသုံးပြုခဲ့သည်။"</string>
<string name="storage_used" msgid="7128074132917008743">"အသုံးပြုပြီး သိုလှောင်ရုံ"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"အကြောင်းကြားချက်များ"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"ပုံမှန်"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"ပိတ်ဆို့ရန်"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"သိမ်မွေ့သော"</string>
<string name="notifications_priority" msgid="1812498477331421719">"ဦးစားပေးမှု"</string>
@@ -2711,16 +2704,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"ပုံမှန် app များ"</string>
<string name="default_browser_title" msgid="8101772675085814670">"ဘရောင်ဇာအပ်ဖ်"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"ပုံမှန် ဘရောင်ဇာ မရှိပါ"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"ဖုန်းခေါ် app"</string>
<string name="default_app" msgid="6864503001385843060">"(မူသေ)"</string>
<string name="apps_storage" msgid="4353308027210435513">"App များ သိုလှောင်မှု"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"သုံးစွဲမှုကို ရယူသုံးနိုင်"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"ဝင်ရောက်သုံးစွဲမှုအား ခွင့့်ပြုရန်"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"App သုံးစွဲမှု ရွေးချယ်စရာများ"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"သင့်ဖုန်း၏ ဝန်ဆောင်မှုဌာန၊ ဘာသာစကား ဆက်တင်နှင့် အခြားအသေးစိတ်များအပါအဝင်၊ သင် အကြိမ်မည်မျှသုံးစွဲသည်နှင့် သင်သုံးစွဲနေသော အခြား app များအား ခြေရာခံရန် app တစ်ခုအား ဝင်ရောက်သုံးစွဲမှုမှ ခွင့်ပြုသည်။"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 25911a6..c73f879 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -322,16 +322,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> po stanju pripravljenosti"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> po stanju pripravljenosti, razen ko <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g> poskrbi, da ostane odklenjen"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Prikaži lastnikove podatke na zaklenjenem zaslonu"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Spor. na zakl. zasl."</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Omogoči pripomočke"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Onemogočil skrbnik"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"Brez"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g>/<xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"Npr. Janezov Android"</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"Podatki o uporabniku"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Pokaži podatke o profilu na zaklenjenem zaslonu"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Podatki o profilu"</string>
@@ -354,16 +350,12 @@
<item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> včlanjenih prstnih odtisov</item>
</plurals>
<string name="security_settings_fingerprint_enroll_onboard_title" msgid="4735546436672054254">"Nast. prstnega odtisa"</string>
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message (451317492588352122) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_1 (3118715258753165968) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_2 (4158160658182631304) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_onboard_message" msgid="451317492588352122">"Če želite za odklepanje zaslona ali potrjevanje nakupov uporabljati prstni odtis, morate:"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_1" msgid="3118715258753165968">"Nastaviti nadomestni način zaklepanja zaslona"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_2" msgid="4158160658182631304">"Dodati prstni odtis"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_title" msgid="5877265753699187149">"Iskanje tipala"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_message" msgid="1959655161889313661">"Poiščite tipalo prstnih odtisov na hrbtni strani telefona."</string>
- <!-- no translation found for security_settings_fingerprint_enroll_find_sensor_content_description (2058830032070449160) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_find_sensor_content_description" msgid="2058830032070449160">"Ilustracija z napravo in lokacijo tipala prstnih odtisov"</string>
<string name="security_settings_fingerprint_enroll_dialog_name_label" msgid="7086763077909041106">"Ime"</string>
<string name="security_settings_fingerprint_enroll_dialog_ok" msgid="4150384963879569750">"V redu"</string>
<string name="security_settings_fingerprint_enroll_dialog_delete" msgid="4114615413240707936">"Izbriši"</string>
@@ -373,16 +365,11 @@
<string name="security_settings_fingerprint_enroll_repeat_message" msgid="8846866512704467036">"Položite isti prst na tipalo prstnih odtisov in ga dvignite, ko začutite vibriranje."</string>
<string name="security_settings_fingerprint_enroll_finish_title" msgid="4798692662828257300">"Prstni odtis dodan."</string>
<string name="security_settings_fingerprint_enroll_finish_message" msgid="835496875787664316">"Ko vidite to ikono, lahko za preverjanje istovetnosti ali odobritev nakupa uporabite prstni odtis."</string>
- <!-- no translation found for security_settings_fingerprint_enroll_setup_screen_lock (8205113627804480642) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_done (4014607378328187567) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_title (4360990635212143565) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_message (5053971232594165142) -->
- <skip />
- <!-- no translation found for fingerprint_enroll_button_add (6317978977419045463) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_setup_screen_lock" msgid="8205113627804480642">"Nastavi zaklepanje zaslona"</string>
+ <string name="security_settings_fingerprint_enroll_done" msgid="4014607378328187567">"Končano"</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_title" msgid="4360990635212143565">"Ups, to ni tipalo"</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_message" msgid="5053971232594165142">"Uporabite tipalo prstnih odtisov na napravi."</string>
+ <string name="fingerprint_enroll_button_add" msgid="6317978977419045463">"Dodaj še enega"</string>
<string name="fingerprint_enroll_button_next" msgid="6247009337616342759">"Naprej"</string>
<string name="crypt_keeper_settings_title" msgid="4219233835490520414">"Šifriranje"</string>
<string name="crypt_keeper_encrypt_title" product="tablet" msgid="1060273569887301457">"Šifriraj tablični računalnik"</string>
@@ -2472,8 +2459,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"popravljanje besedila pravilno zvok vibriranje samodejno jezik poteza predlaganje predlog tema žaljiva beseda vrsta znak emoji mednarodno"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"ponastavitev nastavitve privzeto"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"privzeta aplikacija za uporabo v sili"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"privzeta aplikacija za klicanje"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"aplikacije prenos sistem"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"varnost dovoljenj za aplikacije"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"aplikacije privzeto"</string>
@@ -2701,10 +2687,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"Poraba podatkov aplikacije"</string>
<string name="data_summary_format" msgid="6213211533341068366">"Porabljeno <xliff:g id="SIZE">%1$s</xliff:g> od <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Uporabljena shramba"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Obvestila"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Običajno"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Blokirano"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Občutljivo"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Prednostno"</string>
@@ -2752,16 +2736,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Privzete aplikacije"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Brskalnik"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"Ni privzetega brskalnika"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Aplikacija za klicanje"</string>
<string name="default_app" msgid="6864503001385843060">"(Privzeto)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Shramba za aplikacije"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Dostop do podatkov o uporabi"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Dovoli dostop do podatkov o uporabi"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"Nastavitve uporabe aplikacije"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Dostop do podatkov o uporabi aplikaciji omogoča, da spremlja, katere aplikacije še uporabljate in kako pogosto, ter da si ogleda podrobnosti o operaterju, nastavitvah jezika in drugem."</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 9134782..5fce043 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> pagkatapos ng sleep"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> pagkatapos ng pag-sleep, maliban na lang kung pinanatiling naka-unlock ng <xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Ipakita ang info ng may-ari sa lock screen"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Mensahe sa lock screen"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"I-enable ang widget"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Na-disable ng administrator"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"Wala"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"Hal., Android ni Joe."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"Impormasyon ng user"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Ipakita ang impormasyon ng profile sa lock screen"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Info ng profile"</string>
@@ -2454,8 +2450,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"pagwawasto ng text tama tunog i-vibrate awtomatiko wika galaw magmungkahi suhestyon tema nakakapanakit na salita i-type emoji international"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"i-reset ang mga kagustuhan sa default"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"default na ice app na pang-emergency"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"default ng dialer"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"system ng mga application ng pag-download ng mga app"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"seguridad ng mga pahintulot sa mga app"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"default ng mga app"</string>
@@ -2665,10 +2660,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"Paggamit ng data ng app"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> nagamit mula <xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Ginamit na storage"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Mga Notification"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Normal"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"I-block"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Sensitibo"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Priyoridad"</string>
@@ -2710,16 +2703,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Mga Default na App"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Browser app"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"Walang default na Browser"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Dialer app"</string>
<string name="default_app" msgid="6864503001385843060">"(Default)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Storage ng mga app"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Access sa paggamit"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Pahintulutan ang access sa paggamit"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"Mga kagustuhan sa paggamit ng app"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Nagbibigay-daan ang access sa paggamit sa isang app na subaybayan kung anong iba pang mga app ang ginagamit mo at kung gaano kadalas, gayundin ang iyong carrier, mga setting ng wika at iba pang mga detalye."</string>
</resources>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index ca8f062..e43a67e 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -350,16 +350,12 @@
<item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> ta barmoq izi qayd qilingan</item>
</plurals>
<string name="security_settings_fingerprint_enroll_onboard_title" msgid="4735546436672054254">"Barmoq izini sozlash"</string>
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message (451317492588352122) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_1 (3118715258753165968) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_onboard_message_2 (4158160658182631304) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_onboard_message" msgid="451317492588352122">"Ekraningizni qulfdan chiqarish yoki xaridlaringizni tasdiqlash uchun barmog‘ingiz izidan foydalanishda biz quyidagilarni amalga oshirishimiz lozim:"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_1" msgid="3118715258753165968">"Ekranni qulflash usulini zaxiralashni sozlang"</string>
+ <string name="security_settings_fingerprint_enroll_onboard_message_2" msgid="4158160658182631304">"Barmog‘ingiz izini qo‘shish"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_title" msgid="5877265753699187149">"Sensorni topish"</string>
<string name="security_settings_fingerprint_enroll_find_sensor_message" msgid="1959655161889313661">"Telefoningiz orqasidagi barmoq izi sensorini toping."</string>
- <!-- no translation found for security_settings_fingerprint_enroll_find_sensor_content_description (2058830032070449160) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_find_sensor_content_description" msgid="2058830032070449160">"Qurilma va barmoq izi sensori joylashuvi asosida tasvir"</string>
<string name="security_settings_fingerprint_enroll_dialog_name_label" msgid="7086763077909041106">"Nomi"</string>
<string name="security_settings_fingerprint_enroll_dialog_ok" msgid="4150384963879569750">"OK"</string>
<string name="security_settings_fingerprint_enroll_dialog_delete" msgid="4114615413240707936">"O‘chirish"</string>
@@ -369,16 +365,11 @@
<string name="security_settings_fingerprint_enroll_repeat_message" msgid="8846866512704467036">"O‘sha barmog‘ingizni barmoq izi sensori ustiga qo‘ying va tebranishni sezgandan so‘ng barmog‘ingizni oling."</string>
<string name="security_settings_fingerprint_enroll_finish_title" msgid="4798692662828257300">"Barmoq izi qo‘shildi!"</string>
<string name="security_settings_fingerprint_enroll_finish_message" msgid="835496875787664316">"Ushbu belgi ko‘rinsa, siz identifikatsiya yoki xaridni ma’qullash uchun barmoq izidan foydalanishingiz mumkin."</string>
- <!-- no translation found for security_settings_fingerprint_enroll_setup_screen_lock (8205113627804480642) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_done (4014607378328187567) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_title (4360990635212143565) -->
- <skip />
- <!-- no translation found for security_settings_fingerprint_enroll_touch_dialog_message (5053971232594165142) -->
- <skip />
- <!-- no translation found for fingerprint_enroll_button_add (6317978977419045463) -->
- <skip />
+ <string name="security_settings_fingerprint_enroll_setup_screen_lock" msgid="8205113627804480642">"Ekranni qulflashni sozlash"</string>
+ <string name="security_settings_fingerprint_enroll_done" msgid="4014607378328187567">"Tayyor"</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_title" msgid="4360990635212143565">"Obbo, bu sensor emas."</string>
+ <string name="security_settings_fingerprint_enroll_touch_dialog_message" msgid="5053971232594165142">"Qurilma barmoq izi sensoridan foydalaning."</string>
+ <string name="fingerprint_enroll_button_add" msgid="6317978977419045463">"Boshqa barmoq izini qo‘shish"</string>
<string name="fingerprint_enroll_button_next" msgid="6247009337616342759">"Keyingi"</string>
<string name="crypt_keeper_settings_title" msgid="4219233835490520414">"Shifrlash"</string>
<string name="crypt_keeper_encrypt_title" product="tablet" msgid="1060273569887301457">"Planshetni shifrlash"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 809e733..3c21434 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -572,8 +572,7 @@
<string name="wifi_display_options_forget" msgid="9119048225398894580">"取消保存"</string>
<string name="wifi_display_options_done" msgid="5703116500357822557">"完成"</string>
<string name="wifi_display_options_name" msgid="4756080222307467898">"名称"</string>
- <!-- no translation found for wifi_alert_lockdown_by_device_owner (5063705929160653088) -->
- <skip />
+ <string name="wifi_alert_lockdown_by_device_owner" msgid="5063705929160653088">"“<xliff:g id="APP_NAME">%1$s</xliff:g>”会对您设备进行管理,并且已停用修改和删除此 WLAN 网络的功能。要了解详情,请与您的管理员联系。"</string>
<string name="nfc_quick_toggle_title" msgid="6769159366307299004">"NFC"</string>
<string name="nfc_quick_toggle_summary" product="tablet" msgid="8302974395787498915">"允许平板电脑在接触其他设备时交换数据"</string>
<string name="nfc_quick_toggle_summary" product="default" msgid="5237208142892767592">"允许手机在接触其他设备时交换数据"</string>
@@ -2212,20 +2211,15 @@
<string name="vpn_no_ca_cert" msgid="2095005387500126113">"(不验证服务器)"</string>
<string name="vpn_no_server_cert" msgid="2167487440231913330">"(来自服务器)"</string>
<string name="vpn_cancel" msgid="1979937976123659332">"取消"</string>
- <!-- no translation found for vpn_done (8678655203910995914) -->
- <skip />
+ <string name="vpn_done" msgid="8678655203910995914">"关闭"</string>
<string name="vpn_save" msgid="4233484051644764510">"保存"</string>
<string name="vpn_connect" msgid="8469608541746132301">"连接"</string>
<string name="vpn_edit" msgid="8647191407179996943">"编辑VPN配置文件"</string>
- <!-- no translation found for vpn_forget (3684651372749415446) -->
- <skip />
+ <string name="vpn_forget" msgid="3684651372749415446">"取消保存"</string>
<string name="vpn_connect_to" msgid="5965299358485793260">"连接到<xliff:g id="PROFILE">%s</xliff:g>"</string>
- <!-- no translation found for vpn_disconnect_confirm (2555877026824771115) -->
- <skip />
- <!-- no translation found for vpn_disconnect (7426570492642111171) -->
- <skip />
- <!-- no translation found for vpn_version (1939804054179766249) -->
- <skip />
+ <string name="vpn_disconnect_confirm" msgid="2555877026824771115">"断开此 VPN 连接。"</string>
+ <string name="vpn_disconnect" msgid="7426570492642111171">"断开连接"</string>
+ <string name="vpn_version" msgid="1939804054179766249">"版本 <xliff:g id="VERSION">%s</xliff:g>"</string>
<string name="vpn_title" msgid="6317731879966640551">"VPN"</string>
<string name="vpn_create" msgid="5628219087569761496">"添加VPN配置文件"</string>
<string name="vpn_menu_edit" msgid="408275284159243490">"修改配置文件"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 387c828..a225861 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -320,16 +320,12 @@
<string name="lock_after_timeout_summary" msgid="6128431871360905631">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> ngemuva kokulala"</string>
<string name="lock_after_timeout_summary_with_exception" msgid="5579064842797188409">"<xliff:g id="TIMEOUT_STRING">%1$s</xliff:g> ngemva kokulala, ngaphandle kokugcina ivuliwe yi-<xliff:g id="TRUST_AGENT_NAME">%2$s</xliff:g>"</string>
<string name="show_owner_info_on_lockscreen_label" msgid="5074906168357568434">"Bonisa ulwazi lomnikazi ekuvaleni isikrini"</string>
- <!-- no translation found for owner_info_settings_title (5530285568897386122) -->
- <skip />
+ <string name="owner_info_settings_title" msgid="5530285568897386122">"Umlayezo wokukhiya isikrini"</string>
<string name="security_enable_widgets_title" msgid="2754833397070967846">"Nika amandla amawijethi"</string>
<string name="security_enable_widgets_disabled_summary" msgid="1557090442377855233">"Ikhutshazwe ngumlawuli"</string>
- <!-- no translation found for owner_info_settings_summary (7472393443779227052) -->
- <skip />
- <!-- no translation found for owner_info_settings_status (120407527726476378) -->
- <skip />
- <!-- no translation found for owner_info_settings_edit_text_hint (5605345988833943830) -->
- <skip />
+ <string name="owner_info_settings_summary" msgid="7472393443779227052">"Lutho"</string>
+ <string name="owner_info_settings_status" msgid="120407527726476378">"<xliff:g id="COUNT_0">%1$d</xliff:g> / <xliff:g id="COUNT_1">%2$d</xliff:g>"</string>
+ <string name="owner_info_settings_edit_text_hint" msgid="5605345988833943830">"Isb. I-Android ka-Joe."</string>
<string name="user_info_settings_title" msgid="1195015434996724736">"Ulwazi lomsebenzisi"</string>
<string name="show_profile_info_on_lockscreen_label" msgid="2741208907263877990">"Bonisa ulwazi lwephrofayela ekukhiyeni isikrini"</string>
<string name="profile_info_settings_title" msgid="3518603215935346604">"Ulwazi lwephrofayela"</string>
@@ -2452,8 +2448,7 @@
<string name="keywords_keyboard_and_ime" msgid="5251531893531063855">"ukulungiswa kombhalo ukulungisa imsindo ukudlidliza ulimi lokuzenzakalelayo ukuthinta ukuphakamisa isiphakamiso itimu igama elingalungile uhlobo i-emoji okwamazwe"</string>
<string name="keywords_reset_apps" msgid="6420313678620788457">"setha kabusha izintandokazi"</string>
<string name="keywords_emergency_app" msgid="6542122071127391103">"okuzenzakalelayo kohlelo lokusebenza lwe-ice lesimo esiphuthumayo"</string>
- <!-- no translation found for keywords_default_dialer_app (828319101140020370) -->
- <skip />
+ <string name="keywords_default_dialer_app" msgid="828319101140020370">"okuzenzakalelayo kokokudayela"</string>
<string name="keywords_all_apps" msgid="5377153522551809915">"izinhlelo zokusebenza zilanda isistimu yezinhleloz kusebenza"</string>
<string name="keywords_app_permissions" msgid="8677901415217188314">"ukuvikeleka kwezimvume zezinhlelo zokusebenza"</string>
<string name="keywords_default_apps" msgid="3581727483175522599">"okuzenzakalelayo kwezinhlelo zokusebenza"</string>
@@ -2663,10 +2658,8 @@
<string name="app_data_usage" msgid="7942375313697452803">"Ukusetshenziswa kwedatha yohlelo lokusebenza"</string>
<string name="data_summary_format" msgid="6213211533341068366">"<xliff:g id="SIZE">%1$s</xliff:g> esetshenzisiwe kusukela ngomhla ka-<xliff:g id="DATE">%2$s</xliff:g>"</string>
<string name="storage_used" msgid="7128074132917008743">"Isitoreji esisetshenzisiwe"</string>
- <!-- no translation found for notifications_label (2872668710589600731) -->
- <skip />
- <!-- no translation found for notifications_enabled (4386196629684749507) -->
- <skip />
+ <string name="notifications_label" msgid="2872668710589600731">"Izaziso"</string>
+ <string name="notifications_enabled" msgid="4386196629684749507">"Okujwayelekile"</string>
<string name="notifications_disabled" msgid="4326096527874762629">"Vimba"</string>
<string name="notifications_sensitive" msgid="3139432048186620878">"Ukuzwela"</string>
<string name="notifications_priority" msgid="1812498477331421719">"Okubalulekile"</string>
@@ -2708,16 +2701,11 @@
<string name="default_apps_title" msgid="1854974637597514435">"Izinhlelo zokusebenza ezizenzakalelayo"</string>
<string name="default_browser_title" msgid="8101772675085814670">"Uhlelo lokusebenza lwesiphequluli"</string>
<string name="default_browser_title_none" msgid="2124785489953628553">"Asikho isiphequluli esizenzakalelayo"</string>
- <!-- no translation found for default_dialer_title (5556538932548299581) -->
- <skip />
+ <string name="default_dialer_title" msgid="5556538932548299581">"Uhlelo lokusebenza lokokudayela"</string>
<string name="default_app" msgid="6864503001385843060">"(Okuzenzakalelayo)"</string>
<string name="apps_storage" msgid="4353308027210435513">"Isitoreji sezinhlelo zokusebenza"</string>
- <!-- no translation found for usage_access (5479504953931038165) -->
- <skip />
- <!-- no translation found for permit_usage_access (4012876269445832300) -->
- <skip />
- <!-- no translation found for app_usage_preference (7065701732733134991) -->
- <skip />
- <!-- no translation found for usage_access_description (1470042370563522270) -->
- <skip />
+ <string name="usage_access" msgid="5479504953931038165">"Ukufinyelela ukusebenzisa"</string>
+ <string name="permit_usage_access" msgid="4012876269445832300">"Nika amandla ukufinyelela kokusebenzisa"</string>
+ <string name="app_usage_preference" msgid="7065701732733134991">"Okuncanyelwayo kokusetshenziswa kohlelo lokusebenza"</string>
+ <string name="usage_access_description" msgid="1470042370563522270">"Ukufinyelela kokusebenzisa kuvumela uhlelo lokusebenza ukuthi lulandelele ukuthi yiziphi ezinye izinhlelo zokusebenza ozisebenzisayo nokuthi kaningi kangakanani, kanye nenkampani yakho yenethiwekhi, izilungiselelo zolimi neminye imininingwane."</string>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 25a7341..1fbfc18 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -86,4 +86,9 @@
<color name="voice_interaction_highlight">#33b5e5</color>
<drawable name="fp_enrollment_header_landscape">#009688</drawable>
+
+ <color name="memory_avg_use">#ff384248</color>
+ <color name="memory_max_use">#ff009587</color>
+ <color name="memory_remaining">#ffced7db</color>
+
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 41b96c2..0b98428 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -4188,8 +4188,13 @@
<!-- [CHAR LIMIT=NONE] Label for process stats, duration of time the stats are over;
timeDuration is a duration such as "1h 30m" -->
<string name="process_stats_total_duration"><xliff:g id="usedRam">%1$s</xliff:g>
- of <xliff:g id="totalRam">%2$s</xliff:g> used over
+ of <xliff:g id="totalRam">%2$s</xliff:g> used over last
<xliff:g id="timeDuration">%3$s</xliff:g></string>
+ <!-- [CHAR LIMIT=NONE] Label for process stats, duration of time the stats are over;
+ timeDuration is a duration such as "1h 30m" -->
+ <string name="process_stats_total_duration_percentage"><xliff:g id="percent" example="50%">%1$s</xliff:g>
+ of RAM used over
+ <xliff:g id="timeDuration">%2$s</xliff:g></string>
<!-- [CHAR LIMIT=NONE] Label for process stats, text for stats type -->
<string name="process_stats_type_background">Background</string>
<!-- [CHAR LIMIT=NONE] Label for process stats, text for stats type -->
@@ -4197,7 +4202,7 @@
<!-- [CHAR LIMIT=NONE] Label for process stats, text for stats type -->
<string name="process_stats_type_cached">Cached</string>
<!-- [CHAR LIMIT=NONE] Label for process stats, duration of time the stats are over -->
- <string name="process_stats_memory_status">Device memory is currently
+ <string name="process_stats_memory_status">Memory is
<xliff:g id="memstate">%1$s</xliff:g></string>
<!-- [CHAR LIMIT=NONE] Label OS "process" app -->
<string name="process_stats_os_label">Android OS</string>
@@ -4251,6 +4256,9 @@
<string name="menu_show_system">Show system</string>
<!-- [CHAR LIMIT=NONE] Menu for manage apps to control whether system processes are hidden -->
<string name="menu_hide_system">Hide system</string>
+ <!-- [CHAR LIMIT=NONE] Menu for process stats to control whether stats are shown
+ as percentages-->
+ <string name="menu_show_percentage">Show percentages</string>
<!-- [CHAR LIMIT=NONE] Menu for process stats to control whether computation should be based
on Uss (Unique Set Size) instead of Pss (Proportional Set Size) -->
<string name="menu_use_uss">Use Uss</string>
@@ -6498,4 +6506,40 @@
<!-- Description of the usage access setting [CHAR LIMIT=NONE] -->
<string name="usage_access_description">Usage access allows an app to track what other apps you\'re using and how often, as well as your carrier, language settings, and other details.</string>
+ <!-- Title for screen showing recent memory usage of device [CHAR LIMIT=30]-->
+ <string name="memory_settings_title">Memory</string>
+
+ <!-- Title for screen showing recent memory usage of specific app [CHAR LIMIT=30]-->
+ <string name="memory_details_title">Memory details</string>
+
+ <!-- Description of app always running [CHAR LIMIT=45] -->
+ <string name="always_running">Always running</string>
+
+ <!-- Description of app sometimes running [CHAR LIMIT=45] -->
+ <string name="sometimes_running">Sometimes running</string>
+
+ <!-- Description of app rarely running [CHAR LIMIT=45] -->
+ <string name="rarely_running">Rarely running</string>
+
+ <!-- Maximum memory usage key [CHAR LIMIT=25] -->
+ <string name="memory_max_use">Maximum</string>
+
+ <!-- Average memory usage key [CHAR LIMIT=25] -->
+ <string name="memory_avg_use">Average</string>
+
+ <!-- Maximum memory used by an app [CHAR LIMIT=25] -->
+ <string name="memory_max_desc">Maximum <xliff:g id="memory" example="30MB">%1$s</xliff:g></string>
+
+ <!-- Average memory used by an app [CHAR LIMIT=25] -->
+ <string name="memory_avg_desc">Average <xliff:g id="memory" example="30MB">%1$s</xliff:g></string>
+
+ <!-- Formatting for memory description [CHAR LIMIT=25] -->
+ <string name="memory_use_running_format"><xliff:g id="memory" example="30MB">%1$s</xliff:g> / <xliff:g id="running" example="Always running">%2$s</xliff:g></string>
+
+ <!-- Label for process (singular) [CHAR LIMIT=25] -->
+ <string name="process">Process</string>
+
+ <!-- Label for process [CHAR LIMIT=25] -->
+ <string name="process_format">Process <xliff:g id="count" example="3">%1$d</xliff:g></string>
+
</resources>
diff --git a/res/xml/app_memory_settings.xml b/res/xml/app_memory_settings.xml
new file mode 100644
index 0000000..2c3db21
--- /dev/null
+++ b/res/xml/app_memory_settings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/memory_details_title">
+
+ <com.android.settings.applications.LayoutPreference
+ android:key="details_header"
+ android:layout="@layout/process_stats_details" />
+
+</PreferenceScreen>
diff --git a/res/xml/dashboard_categories.xml b/res/xml/dashboard_categories.xml
index 78fe0e7..cdc1166 100644
--- a/res/xml/dashboard_categories.xml
+++ b/res/xml/dashboard_categories.xml
@@ -134,6 +134,14 @@
android:icon="@drawable/ic_settings_multiuser"
/>
+ <!-- Memory -->
+ <dashboard-tile
+ android:id="@+id/manage_memory"
+ android:title="@string/memory_settings_title"
+ android:fragment="com.android.settings.applications.ProcessStatsUi"
+ android:icon="@drawable/ic_settings_memory"
+ />
+
<!-- Manage NFC payment apps -->
<dashboard-tile
android:id="@+id/nfc_payment_settings"
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index c36b3e7..6911892 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -54,12 +54,6 @@
android:title="@string/oem_unlock_enable"
android:summary="@string/oem_unlock_enable_summary"/>
- <PreferenceScreen android:key="proc_stats"
- android:title="@string/process_stats_summary_title"
- android:summary="@string/process_stats_summary"
- android:fragment="com.android.settings.applications.ProcessStatsUi">
- </PreferenceScreen>
-
<PreferenceScreen
android:key="running_apps"
android:title="@string/runningservices_settings_title"
diff --git a/res/xml/process_stats_summary.xml b/res/xml/process_stats_summary.xml
index fbd87fd..46bb160 100644
--- a/res/xml/process_stats_summary.xml
+++ b/res/xml/process_stats_summary.xml
@@ -14,12 +14,11 @@
limitations under the License.
-->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/app_memory_use"
- android:key="app_list">
- <Preference
- style="?android:attr/preferenceInformationStyle"
- android:key="mem_status"
- android:persistent="false"
- />
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/app_memory_use"
+ android:key="app_list">
+ <com.android.settings.applications.LayoutPreference
+ android:key="status_header"
+ android:layout="@layout/proc_stats_ui" />
</PreferenceScreen>
diff --git a/src/com/android/settings/CancellablePreference.java b/src/com/android/settings/CancellablePreference.java
new file mode 100644
index 0000000..ab723ca
--- /dev/null
+++ b/src/com/android/settings/CancellablePreference.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+package com.android.settings;
+
+import android.content.Context;
+import android.preference.Preference;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageView;
+
+public class CancellablePreference extends Preference implements OnClickListener {
+
+ private boolean mCancellable;
+ private OnCancelListener mListener;
+
+ public CancellablePreference(Context context) {
+ super(context);
+ setWidgetLayoutResource(R.layout.cancel_pref_widget);
+ }
+
+ public CancellablePreference(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ setWidgetLayoutResource(R.layout.cancel_pref_widget);
+ }
+
+ public void setCancellable(boolean isCancellable) {
+ mCancellable = isCancellable;
+ notifyChanged();
+ }
+
+ public void setOnCancelListener(OnCancelListener listener) {
+ mListener = listener;
+ }
+
+ @Override
+ protected void onBindView(View view) {
+ super.onBindView(view);
+
+ ImageView cancel = (ImageView) view.findViewById(R.id.cancel);
+ cancel.setVisibility(mCancellable ? View.VISIBLE : View.INVISIBLE);
+ cancel.setOnClickListener(this);
+ }
+
+ @Override
+ public void onClick(View v) {
+ if (mListener != null) {
+ mListener.onCancel(this);
+ }
+ }
+
+ public interface OnCancelListener {
+ void onCancel(CancellablePreference preference);
+ }
+
+}
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 5c7e0e9..6c2f135 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -164,8 +164,6 @@
private static final String SHOW_ALL_ANRS_KEY = "show_all_anrs";
- private static final String PROCESS_STATS = "proc_stats";
-
private static final String PACKAGE_MIME_TYPE = "application/vnd.android.package-archive";
private static final String TERMINAL_APP_PACKAGE = "com.android.terminal";
@@ -246,7 +244,6 @@
private SwitchPreference mShowAllANRs;
- private PreferenceScreen mProcessStats;
private final ArrayList<Preference> mAllPrefs = new ArrayList<Preference>();
private final ArrayList<SwitchPreference> mResetSwitchPrefs
@@ -397,9 +394,6 @@
mAllPrefs.add(hdcpChecking);
removePreferenceForProduction(hdcpChecking);
}
-
- mProcessStats = (PreferenceScreen) findPreference(PROCESS_STATS);
- mAllPrefs.add(mProcessStats);
}
private ListPreference addListPreference(String prefKey) {
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index caf2491..ee2b1b4 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -340,6 +340,7 @@
ZenModePrioritySettings.class.getName(),
ZenModeScheduleRuleSettings.class.getName(),
ZenModeExternalRuleSettings.class.getName(),
+ ProcessStatsUi.class.getName(),
};
diff --git a/src/com/android/settings/SetupRedactionInterstitial.java b/src/com/android/settings/SetupRedactionInterstitial.java
index c6437e0..d3d841e 100644
--- a/src/com/android/settings/SetupRedactionInterstitial.java
+++ b/src/com/android/settings/SetupRedactionInterstitial.java
@@ -28,6 +28,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.Button;
/**
* Setup Wizard's version of RedactionInterstitial screen. It inherits the logic and basic structure
@@ -82,7 +83,8 @@
final NavigationBar navigationBar = layout.getNavigationBar();
navigationBar.setNavigationBarListener(this);
- navigationBar.getBackButton().setEnabled(false);
+ final Button backButton = navigationBar.getBackButton();
+ backButton.setVisibility(View.GONE);
SetupWizardUtils.setImmersiveMode(getActivity());
return layout;
}
diff --git a/src/com/android/settings/applications/ProcStatsData.java b/src/com/android/settings/applications/ProcStatsData.java
new file mode 100644
index 0000000..1e32cc9
--- /dev/null
+++ b/src/com/android/settings/applications/ProcStatsData.java
@@ -0,0 +1,408 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+
+package com.android.settings.applications;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.os.ParcelFileDescriptor;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
+import android.text.format.Formatter;
+import android.util.ArrayMap;
+import android.util.Log;
+import android.util.SparseArray;
+
+import com.android.internal.app.IProcessStats;
+import com.android.internal.app.ProcessMap;
+import com.android.internal.app.ProcessStats;
+import com.android.internal.app.ProcessStats.ProcessDataCollection;
+import com.android.internal.app.ProcessStats.TotalMemoryUseCollection;
+import com.android.internal.util.MemInfoReader;
+import com.android.settings.R;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+
+public class ProcStatsData {
+
+ private static final String TAG = "ProcStatsManager";
+
+ private static final boolean DEBUG = ProcessStatsUi.DEBUG;
+
+ private static ProcessStats sStatsXfer;
+
+ private PackageManager mPm;
+ private Context mContext;
+ private long memTotalTime;
+
+ private IProcessStats mProcessStats;
+ private ProcessStats mStats;
+
+ private int mMemState;
+
+ private boolean mUseUss;
+ private long mDuration;
+
+ private int[] mMemStates;
+
+ private int[] mStates;
+
+ private MemInfo mMemInfo;
+
+ private ArrayList<ProcStatsPackageEntry> pkgEntries;
+
+ public ProcStatsData(Context context, boolean useXfer) {
+ mContext = context;
+ mPm = context.getPackageManager();
+ mProcessStats = IProcessStats.Stub.asInterface(
+ ServiceManager.getService(ProcessStats.SERVICE_NAME));
+ mMemStates = ProcessStats.ALL_MEM_ADJ;
+ mStates = ProcessStats.BACKGROUND_PROC_STATES;
+ if (useXfer) {
+ mStats = sStatsXfer;
+ }
+ }
+
+ public void setTotalTime(int totalTime) {
+ memTotalTime = totalTime;
+ }
+
+ public void xferStats() {
+ sStatsXfer = mStats;
+ }
+
+ public void setMemStates(int[] memStates) {
+ mMemStates = memStates;
+ refreshStats(false);
+ }
+
+ public void setStats(int[] stats) {
+ this.mStates = stats;
+ refreshStats(false);
+ }
+
+ public int getMemState() {
+ return mMemState;
+ }
+
+ public MemInfo getMemInfo() {
+ return mMemInfo;
+ }
+
+ public long getElapsedTime() {
+ return mStats.mTimePeriodEndRealtime - mStats.mTimePeriodStartRealtime;
+ }
+
+ public void setDuration(long duration) {
+ if (duration != mDuration) {
+ mDuration = duration;
+ refreshStats(true);
+ }
+ }
+
+ public long getDuration() {
+ return mDuration;
+ }
+
+ public List<ProcStatsPackageEntry> getEntries() {
+ return pkgEntries;
+ }
+
+ public void refreshStats(boolean forceLoad) {
+ if (mStats == null || forceLoad) {
+ load();
+ }
+
+ pkgEntries = new ArrayList<>();
+
+ long now = SystemClock.uptimeMillis();
+
+ memTotalTime = ProcessStats.dumpSingleTime(null, null, mStats.mMemFactorDurations,
+ mStats.mMemFactor, mStats.mStartTime, now);
+
+ ProcessStats.TotalMemoryUseCollection totalMem = new ProcessStats.TotalMemoryUseCollection(
+ ProcessStats.ALL_SCREEN_ADJ, mMemStates);
+ mStats.computeTotalMemoryUse(totalMem, now);
+
+ mMemInfo = new MemInfo(mContext, totalMem, memTotalTime);
+
+ ProcessDataCollection bgTotals = new ProcessDataCollection(
+ ProcessStats.ALL_SCREEN_ADJ, mMemStates, mStates);
+ ProcessDataCollection runTotals = new ProcessDataCollection(
+ ProcessStats.ALL_SCREEN_ADJ, mMemStates, ProcessStats.NON_CACHED_PROC_STATES);
+
+ createPkgMap(getProcs(bgTotals, runTotals), bgTotals, runTotals);
+
+ ProcStatsPackageEntry osPkg = createOsEntry(bgTotals, runTotals, totalMem,
+ mMemInfo.baseCacheRam);
+ pkgEntries.add(osPkg);
+ }
+
+ private void createPkgMap(ArrayList<ProcStatsEntry> procEntries, ProcessDataCollection bgTotals,
+ ProcessDataCollection runTotals) {
+ // Combine processes into packages.
+ ArrayMap<String, ProcStatsPackageEntry> pkgMap = new ArrayMap<>();
+ for (int i = procEntries.size() - 1; i >= 0; i--) {
+ ProcStatsEntry proc = procEntries.get(i);
+ proc.evaluateTargetPackage(mPm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
+ ProcStatsPackageEntry pkg = pkgMap.get(proc.mBestTargetPackage);
+ if (pkg == null) {
+ pkg = new ProcStatsPackageEntry(proc.mBestTargetPackage, memTotalTime);
+ pkgMap.put(proc.mBestTargetPackage, pkg);
+ pkgEntries.add(pkg);
+ }
+ pkg.addEntry(proc);
+ }
+ }
+
+ private ProcStatsPackageEntry createOsEntry(ProcessDataCollection bgTotals,
+ ProcessDataCollection runTotals, TotalMemoryUseCollection totalMem, long baseCacheRam) {
+ // Add in fake entry representing the OS itself.
+ ProcStatsPackageEntry osPkg = new ProcStatsPackageEntry("os", memTotalTime);
+ ProcStatsEntry osEntry;
+ if (totalMem.sysMemNativeWeight > 0) {
+ osEntry = new ProcStatsEntry("os", 0,
+ mContext.getString(R.string.process_stats_os_native), memTotalTime,
+ (long) (totalMem.sysMemNativeWeight / memTotalTime));
+ osEntry.evaluateTargetPackage(mPm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
+ osPkg.addEntry(osEntry);
+ }
+ if (totalMem.sysMemKernelWeight > 0) {
+ osEntry = new ProcStatsEntry("os", 0,
+ mContext.getString(R.string.process_stats_os_kernel), memTotalTime,
+ (long) (totalMem.sysMemKernelWeight / memTotalTime));
+ osEntry.evaluateTargetPackage(mPm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
+ osPkg.addEntry(osEntry);
+ }
+ if (totalMem.sysMemZRamWeight > 0) {
+ osEntry = new ProcStatsEntry("os", 0,
+ mContext.getString(R.string.process_stats_os_zram), memTotalTime,
+ (long) (totalMem.sysMemZRamWeight / memTotalTime));
+ osEntry.evaluateTargetPackage(mPm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
+ osPkg.addEntry(osEntry);
+ }
+ if (baseCacheRam > 0) {
+ osEntry = new ProcStatsEntry("os", 0,
+ mContext.getString(R.string.process_stats_os_cache), memTotalTime,
+ baseCacheRam / 1024);
+ osEntry.evaluateTargetPackage(mPm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
+ osPkg.addEntry(osEntry);
+ }
+ return osPkg;
+ }
+
+ private ArrayList<ProcStatsEntry> getProcs(ProcessDataCollection bgTotals,
+ ProcessDataCollection runTotals) {
+ final ArrayList<ProcStatsEntry> procEntries = new ArrayList<>();
+ if (DEBUG) Log.d(TAG, "-------------------- PULLING PROCESSES");
+
+ final ProcessMap<ProcStatsEntry> entriesMap = new ProcessMap<ProcStatsEntry>();
+ for (int ipkg = 0, N = mStats.mPackages.getMap().size(); ipkg < N; ipkg++) {
+ final SparseArray<SparseArray<ProcessStats.PackageState>> pkgUids = mStats.mPackages
+ .getMap().valueAt(ipkg);
+ for (int iu = 0; iu < pkgUids.size(); iu++) {
+ final SparseArray<ProcessStats.PackageState> vpkgs = pkgUids.valueAt(iu);
+ for (int iv = 0; iv < vpkgs.size(); iv++) {
+ final ProcessStats.PackageState st = vpkgs.valueAt(iv);
+ for (int iproc = 0; iproc < st.mProcesses.size(); iproc++) {
+ final ProcessStats.ProcessState pkgProc = st.mProcesses.valueAt(iproc);
+ final ProcessStats.ProcessState proc = mStats.mProcesses.get(pkgProc.mName,
+ pkgProc.mUid);
+ if (proc == null) {
+ Log.w(TAG, "No process found for pkg " + st.mPackageName
+ + "/" + st.mUid + " proc name " + pkgProc.mName);
+ continue;
+ }
+ ProcStatsEntry ent = entriesMap.get(proc.mName, proc.mUid);
+ if (ent == null) {
+ ent = new ProcStatsEntry(proc, st.mPackageName, bgTotals, runTotals,
+ mUseUss);
+ if (ent.mRunWeight > 0) {
+ if (DEBUG) Log.d(TAG, "Adding proc " + proc.mName + "/"
+ + proc.mUid + ": time="
+ + ProcessStatsUi.makeDuration(ent.mRunDuration) + " ("
+ + ((((double) ent.mRunDuration) / memTotalTime) * 100)
+ + "%)"
+ + " pss=" + ent.mAvgRunMem);
+ entriesMap.put(proc.mName, proc.mUid, ent);
+ procEntries.add(ent);
+ }
+ } else {
+ ent.addPackage(st.mPackageName);
+ }
+ }
+ }
+ }
+ }
+
+ if (DEBUG) Log.d(TAG, "-------------------- MAPPING SERVICES");
+
+ // Add in service info.
+ for (int ip = 0, N = mStats.mPackages.getMap().size(); ip < N; ip++) {
+ SparseArray<SparseArray<ProcessStats.PackageState>> uids = mStats.mPackages.getMap()
+ .valueAt(ip);
+ for (int iu = 0; iu < uids.size(); iu++) {
+ SparseArray<ProcessStats.PackageState> vpkgs = uids.valueAt(iu);
+ for (int iv = 0; iv < vpkgs.size(); iv++) {
+ ProcessStats.PackageState ps = vpkgs.valueAt(iv);
+ for (int is = 0, NS = ps.mServices.size(); is < NS; is++) {
+ ProcessStats.ServiceState ss = ps.mServices.valueAt(is);
+ if (ss.mProcessName != null) {
+ ProcStatsEntry ent = entriesMap.get(ss.mProcessName,
+ uids.keyAt(iu));
+ if (ent != null) {
+ if (DEBUG) Log.d(TAG, "Adding service " + ps.mPackageName
+ + "/" + ss.mName + "/" + uids.keyAt(iu) + " to proc "
+ + ss.mProcessName);
+ ent.addService(ss);
+ } else {
+ Log.w(TAG, "No process " + ss.mProcessName + "/" + uids.keyAt(iu)
+ + " for service " + ss.mName);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return procEntries;
+ }
+
+ private void load() {
+ try {
+ mMemState = mProcessStats.getCurrentMemoryState();
+ ParcelFileDescriptor pfd = mProcessStats.getStatsOverTime(mDuration);
+ mStats = new ProcessStats(false);
+ InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
+ mStats.read(is);
+ try {
+ is.close();
+ } catch (IOException e) {
+ }
+ if (mStats.mReadError != null) {
+ Log.w(TAG, "Failure reading process stats: " + mStats.mReadError);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "RemoteException:", e);
+ }
+ }
+
+ public static class MemInfo {
+ double realUsedRam;
+ double realFreeRam;
+ double realTotalRam;
+ long baseCacheRam;
+
+ double[] mMemStateWeights = new double[ProcessStats.STATE_COUNT];
+ double freeWeight;
+ double usedWeight;
+ double weightToRam;
+ double totalRam;
+ double totalScale;
+
+ private MemInfo(Context context, ProcessStats.TotalMemoryUseCollection totalMem,
+ long memTotalTime) {
+ calculateWeightInfo(context, totalMem, memTotalTime);
+
+ double usedRam = (usedWeight * 1024) / memTotalTime;
+ double freeRam = (freeWeight * 1024) / memTotalTime;
+ totalRam = usedRam + freeRam;
+ totalScale = realTotalRam / totalRam;
+ weightToRam = totalScale / memTotalTime * 1024;
+
+ realUsedRam = usedRam * totalScale;
+ realFreeRam = freeRam * totalScale;
+ if (DEBUG) {
+ Log.i(TAG, "Scaled Used RAM: " + Formatter.formatShortFileSize(context,
+ (long) realUsedRam));
+ Log.i(TAG, "Scaled Free RAM: " + Formatter.formatShortFileSize(context,
+ (long) realFreeRam));
+ }
+ if (DEBUG) {
+ Log.i(TAG, "Adj Scaled Used RAM: " + Formatter.formatShortFileSize(context,
+ (long) realUsedRam));
+ Log.i(TAG, "Adj Scaled Free RAM: " + Formatter.formatShortFileSize(context,
+ (long) realFreeRam));
+ }
+
+ ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
+ ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(
+ memInfo);
+ if (memInfo.hiddenAppThreshold >= realFreeRam) {
+ realUsedRam = freeRam;
+ realFreeRam = 0;
+ baseCacheRam = (long) realFreeRam;
+ } else {
+ realUsedRam += memInfo.hiddenAppThreshold;
+ realFreeRam -= memInfo.hiddenAppThreshold;
+ baseCacheRam = memInfo.hiddenAppThreshold;
+ }
+ }
+
+ private void calculateWeightInfo(Context context, TotalMemoryUseCollection totalMem,
+ long memTotalTime) {
+ MemInfoReader memReader = new MemInfoReader();
+ memReader.readMemInfo();
+ realTotalRam = memReader.getTotalSize();
+ freeWeight = totalMem.sysMemFreeWeight + totalMem.sysMemCachedWeight;
+ usedWeight = totalMem.sysMemKernelWeight + totalMem.sysMemNativeWeight
+ + totalMem.sysMemZRamWeight;
+ for (int i = 0; i < ProcessStats.STATE_COUNT; i++) {
+ if (i == ProcessStats.STATE_SERVICE_RESTARTING) {
+ // These don't really run.
+ mMemStateWeights[i] = 0;
+ } else {
+ mMemStateWeights[i] = totalMem.processStateWeight[i];
+ if (i >= ProcessStats.STATE_HOME) {
+ freeWeight += totalMem.processStateWeight[i];
+ } else {
+ usedWeight += totalMem.processStateWeight[i];
+ }
+ }
+ }
+ if (DEBUG) {
+ Log.i(TAG, "Used RAM: " + Formatter.formatShortFileSize(context,
+ (long) ((usedWeight * 1024) / memTotalTime)));
+ Log.i(TAG, "Free RAM: " + Formatter.formatShortFileSize(context,
+ (long) ((freeWeight * 1024) / memTotalTime)));
+ Log.i(TAG, "Total RAM: " + Formatter.formatShortFileSize(context,
+ (long) (((freeWeight + usedWeight) * 1024) / memTotalTime)));
+ }
+ }
+ }
+
+ final static Comparator<ProcStatsEntry> sEntryCompare = new Comparator<ProcStatsEntry>() {
+ @Override
+ public int compare(ProcStatsEntry lhs, ProcStatsEntry rhs) {
+ if (lhs.mRunWeight < rhs.mRunWeight) {
+ return 1;
+ } else if (lhs.mRunWeight > rhs.mRunWeight) {
+ return -1;
+ } else if (lhs.mRunDuration < rhs.mRunDuration) {
+ return 1;
+ } else if (lhs.mRunDuration > rhs.mRunDuration) {
+ return -1;
+ }
+ return 0;
+ }
+ };
+}
diff --git a/src/com/android/settings/applications/ProcStatsEntry.java b/src/com/android/settings/applications/ProcStatsEntry.java
index 41f7a53..637003c 100644
--- a/src/com/android/settings/applications/ProcStatsEntry.java
+++ b/src/com/android/settings/applications/ProcStatsEntry.java
@@ -36,6 +36,7 @@
final String mPackage;
final int mUid;
final String mName;
+ public CharSequence mLabel;
final ArrayList<String> mPackages = new ArrayList<String>();
final long mBgDuration;
final long mAvgBgMem;
diff --git a/src/com/android/settings/applications/ProcStatsPackageEntry.java b/src/com/android/settings/applications/ProcStatsPackageEntry.java
index 3925d1d..feb11d8 100644
--- a/src/com/android/settings/applications/ProcStatsPackageEntry.java
+++ b/src/com/android/settings/applications/ProcStatsPackageEntry.java
@@ -30,6 +30,9 @@
private static final String TAG = "ProcStatsEntry";
private static boolean DEBUG = ProcessStatsUi.DEBUG;
+ private static final float ALWAYS_THRESHOLD = .95f;
+ private static final float SOMETIMES_THRESHOLD = .25f;
+
final String mPackage;
final ArrayList<ProcStatsEntry> mEntries = new ArrayList<ProcStatsEntry>();
@@ -44,9 +47,11 @@
public ApplicationInfo mUiTargetApp;
public String mUiLabel;
+ private long mWindowLength;
- public ProcStatsPackageEntry(String pkg) {
+ public ProcStatsPackageEntry(String pkg, long windowLength) {
mPackage = pkg;
+ mWindowLength = windowLength;
}
public ProcStatsPackageEntry(Parcel in) {
@@ -62,6 +67,16 @@
mRunWeight = in.readDouble();
}
+ public CharSequence getRunningFrequency(Context context) {
+ float amountRunning = mRunDuration / (float) mWindowLength;
+ return getFrequency(amountRunning, context);
+ }
+
+ public CharSequence getBackgroundFrequency(Context context) {
+ float amountRunning = mBgDuration / (float) mWindowLength;
+ return getFrequency(amountRunning, context);
+ }
+
public void addEntry(ProcStatsEntry entry) {
mEntries.add(entry);
}
@@ -72,23 +87,28 @@
mRunDuration = mAvgRunMem = mMaxRunMem = 0;
mRunWeight = 0;
final int N = mEntries.size();
- for (int i=0; i<N; i++) {
+ for (int i=0; i < N; i++) {
ProcStatsEntry entry = mEntries.get(i);
mBgDuration += entry.mBgDuration;
- mAvgBgMem += entry.mAvgBgMem;
- if (entry.mMaxBgMem > mMaxBgMem) {
- mMaxBgMem = entry.mMaxBgMem;
- }
+ mAvgBgMem += entry.mAvgBgMem * entry.mBgDuration;
mBgWeight += entry.mBgWeight;
mRunDuration += entry.mRunDuration;
- mAvgRunMem += entry.mAvgRunMem;
- if (entry.mMaxRunMem > mMaxRunMem) {
- mMaxRunMem = entry.mMaxRunMem;
- }
+ mAvgRunMem += entry.mAvgRunMem * entry.mRunDuration;
mRunWeight += entry.mRunWeight;
+
+ // Each entry is generally a process or something similar. Since it is extremely
+ // unlikely that any apps are going to avoid running processes at the same time
+ // to avoid memory usage, we will sum the maximum memory usage to create a
+ // hypothetical worst case scenario of memory.
+ mMaxBgMem += entry.mMaxBgMem;
+ mMaxRunMem += entry.mMaxRunMem;
}
- mAvgBgMem /= N;
- mAvgRunMem /= N;
+ if (mBgDuration != 0) {
+ mAvgBgMem = mAvgBgMem * N / mBgDuration;
+ }
+ if (mRunDuration != 0) {
+ mAvgRunMem = mAvgRunMem * N / mRunDuration;
+ }
}
public void retrieveUiData(Context context, PackageManager pm) {
@@ -142,4 +162,15 @@
return new ProcStatsPackageEntry[size];
}
};
+
+ // TODO: Find better place for this.
+ public static CharSequence getFrequency(float amount, Context context) {
+ if (amount> ALWAYS_THRESHOLD) {
+ return context.getString(R.string.always_running);
+ } else if (amount> SOMETIMES_THRESHOLD) {
+ return context.getString(R.string.sometimes_running);
+ } else {
+ return context.getString(R.string.rarely_running);
+ }
+ }
}
diff --git a/src/com/android/settings/applications/ProcessStatsDetail.java b/src/com/android/settings/applications/ProcessStatsDetail.java
index 1e7cf09..191e7e9 100644
--- a/src/com/android/settings/applications/ProcessStatsDetail.java
+++ b/src/com/android/settings/applications/ProcessStatsDetail.java
@@ -17,60 +17,77 @@
package com.android.settings.applications;
import android.app.ActivityManager;
+import android.app.ActivityManager.RunningServiceInfo;
+import android.app.AlertDialog;
import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.ServiceInfo;
+import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.os.Process;
+import android.preference.PreferenceCategory;
import android.text.format.Formatter;
-import android.view.LayoutInflater;
+import android.util.ArrayMap;
+import android.util.Log;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.ProgressBar;
import android.widget.TextView;
+
import com.android.internal.logging.MetricsLogger;
-import com.android.settings.InstrumentedFragment;
+import com.android.settings.AppHeader;
+import com.android.settings.CancellablePreference;
+import com.android.settings.CancellablePreference.OnCancelListener;
import com.android.settings.R;
-import com.android.settings.Utils;
+import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.applications.ProcStatsEntry.Service;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
+import java.util.List;
-import static com.android.settings.Utils.prepareCustomPreferencesList;
+public class ProcessStatsDetail extends SettingsPreferenceFragment
+ implements Button.OnClickListener {
-public class ProcessStatsDetail extends InstrumentedFragment implements Button.OnClickListener {
private static final String TAG = "ProcessStatsDetail";
public static final int ACTION_FORCE_STOP = 1;
public static final String EXTRA_PACKAGE_ENTRY = "package_entry";
public static final String EXTRA_USE_USS = "use_uss";
- public static final String EXTRA_MAX_WEIGHT = "max_weight";
public static final String EXTRA_WEIGHT_TO_RAM = "weight_to_ram";
public static final String EXTRA_TOTAL_TIME = "total_time";
+ public static final String EXTRA_MAX_MEMORY_USAGE = "max_memory_usage";
+ public static final String EXTRA_TOTAL_SCALE = "total_scale";
+
+ private static final String KEY_DETAILS_HEADER = "details_header";
+
+ private final ArrayMap<ComponentName, CancellablePreference> mServiceMap = new ArrayMap<>();
private PackageManager mPm;
private DevicePolicyManager mDpm;
private ProcStatsPackageEntry mApp;
private boolean mUseUss;
- private double mMaxWeight;
private double mWeightToRam;
private long mTotalTime;
private long mOnePercentTime;
- private View mRootView;
- private TextView mTitleView;
- private ViewGroup mTwoButtonsPanel;
private Button mForceStopButton;
private Button mReportButton;
- private ViewGroup mProcessesParent;
- private ViewGroup mServicesParent;
+
+ private LinearColorBar mColorBar;
+
+ private float mMaxMemoryUsage;
+
+ private double mTotalScale;
@Override
public void onCreate(Bundle icicle) {
@@ -81,21 +98,23 @@
mApp = args.getParcelable(EXTRA_PACKAGE_ENTRY);
mApp.retrieveUiData(getActivity(), mPm);
mUseUss = args.getBoolean(EXTRA_USE_USS);
- mMaxWeight = args.getDouble(EXTRA_MAX_WEIGHT);
mWeightToRam = args.getDouble(EXTRA_WEIGHT_TO_RAM);
mTotalTime = args.getLong(EXTRA_TOTAL_TIME);
+ mMaxMemoryUsage = args.getFloat(EXTRA_MAX_MEMORY_USAGE);
+ mTotalScale = args.getDouble(EXTRA_TOTAL_SCALE);
mOnePercentTime = mTotalTime/100;
+
+ mServiceMap.clear();
+ createDetails();
}
@Override
- public View onCreateView(
- LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- final View view = inflater.inflate(R.layout.process_stats_details, container, false);
- prepareCustomPreferencesList(container, view, view, false);
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
- mRootView = view;
- createDetails();
- return view;
+ AppHeader.createAppHeader(getActivity(),
+ mApp.mUiTargetApp != null ? mApp.mUiTargetApp.loadIcon(mPm) : new ColorDrawable(0),
+ mApp.mUiLabel, null);
}
@Override
@@ -107,56 +126,88 @@
public void onResume() {
super.onResume();
checkForceStop();
+
+ updateRunningServices();
}
- @Override
- public void onPause() {
- super.onPause();
+ private void updateRunningServices() {
+ ActivityManager activityManager = (ActivityManager)
+ getActivity().getSystemService(Context.ACTIVITY_SERVICE);
+ List<RunningServiceInfo> runningServices =
+ activityManager.getRunningServices(Integer.MAX_VALUE);
+
+ // Set all services as not running, then turn back on the ones we find.
+ int N = mServiceMap.size();
+ for (int i = 0; i < N; i++) {
+ mServiceMap.valueAt(i).setCancellable(false);
+ }
+
+ N = runningServices.size();
+ for (int i = 0; i < N; i++) {
+ RunningServiceInfo runningService = runningServices.get(i);
+ if (!runningService.started && runningService.clientLabel == 0) {
+ continue;
+ }
+ if ((runningService.flags & RunningServiceInfo.FLAG_PERSISTENT_PROCESS) != 0) {
+ continue;
+ }
+ final ComponentName service = runningService.service;
+ CancellablePreference pref = mServiceMap.get(service);
+ if (pref != null) {
+ pref.setOnCancelListener(new OnCancelListener() {
+ @Override
+ public void onCancel(CancellablePreference preference) {
+ stopService(service.getPackageName(), service.getClassName());
+ }
+ });
+ pref.setCancellable(true);
+ }
+ }
}
private void createDetails() {
- final double percentOfWeight = (mApp.mBgWeight / mMaxWeight) * 100;
-
- int appLevel = (int) Math.ceil(percentOfWeight);
- String appLevelText = Formatter.formatShortFileSize(getActivity(),
- (long)(mApp.mRunWeight * mWeightToRam));
-
- // Set all values in the header.
- mTitleView = (TextView) mRootView.findViewById(android.R.id.title);
- mTitleView.setText(mApp.mUiLabel);
- final TextView text1 = (TextView)mRootView.findViewById(android.R.id.text1);
- text1.setText(appLevelText);
- final ProgressBar progress = (ProgressBar) mRootView.findViewById(android.R.id.progress);
- progress.setProgress(appLevel);
- final ImageView icon = (ImageView) mRootView.findViewById(android.R.id.icon);
- if (mApp.mUiTargetApp != null) {
- icon.setImageDrawable(mApp.mUiTargetApp.loadIcon(mPm));
- }
-
- mTwoButtonsPanel = (ViewGroup)mRootView.findViewById(R.id.two_buttons_panel);
- mForceStopButton = (Button)mRootView.findViewById(R.id.right_button);
- mReportButton = (Button)mRootView.findViewById(R.id.left_button);
- mForceStopButton.setEnabled(false);
- mReportButton.setVisibility(View.INVISIBLE);
-
- mProcessesParent = (ViewGroup)mRootView.findViewById(R.id.processes);
- mServicesParent = (ViewGroup)mRootView.findViewById(R.id.services);
+ addPreferencesFromResource(R.xml.app_memory_settings);
fillProcessesSection();
- fillServicesSection();
- if (mServicesParent.getChildCount() <= 0) {
- mServicesParent.setVisibility(View.GONE);
- mRootView.findViewById(R.id.services_label).setVisibility(View.GONE);
- }
+
+ LayoutPreference headerLayout = (LayoutPreference) findPreference(KEY_DETAILS_HEADER);
+
+ TextView avgUsed = (TextView) headerLayout.findViewById(R.id.memory_avg);
+ TextView maxUsed = (TextView) headerLayout.findViewById(R.id.memory_max);
+ avgUsed.setText(getString(R.string.memory_avg_desc,
+ Formatter.formatShortFileSize(getActivity(),
+ (long) (Math.max(mApp.mBgWeight, mApp.mRunWeight) * mWeightToRam))));
+ maxUsed.setText(getString(R.string.memory_max_desc,
+ Formatter.formatShortFileSize(getActivity(),
+ (long) (Math.max(mApp.mMaxBgMem, mApp.mMaxRunMem) * 1024 * mTotalScale))));
+
+ mForceStopButton = (Button) headerLayout.findViewById(R.id.right_button);
+ mReportButton = (Button) headerLayout.findViewById(R.id.left_button);
if (mApp.mEntries.get(0).mUid >= android.os.Process.FIRST_APPLICATION_UID) {
+ mForceStopButton.setEnabled(false);
+ mReportButton.setVisibility(View.INVISIBLE);
+
mForceStopButton.setText(R.string.force_stop);
mForceStopButton.setTag(ACTION_FORCE_STOP);
mForceStopButton.setOnClickListener(this);
- mTwoButtonsPanel.setVisibility(View.VISIBLE);
} else {
- mTwoButtonsPanel.setVisibility(View.GONE);
+ mReportButton.setVisibility(View.GONE);
+ mForceStopButton.setVisibility(View.GONE);
}
+
+ // TODO: Find way to share this code with ProcessStatsPreference.
+ boolean statsForeground = mApp.mRunWeight > mApp.mBgWeight;
+ float mAvgRatio = (statsForeground ? mApp.mAvgRunMem : mApp.mAvgBgMem) / mMaxMemoryUsage;
+ float mMaxRatio = (statsForeground ? mApp.mMaxRunMem : mApp.mMaxBgMem) / mMaxMemoryUsage
+ - mAvgRatio;
+ float mRemainingRatio = 1 - mAvgRatio - mMaxRatio;
+ mColorBar = (LinearColorBar) headerLayout.findViewById(R.id.color_bar);
+ Context context = getActivity();
+ mColorBar.setColors(context.getColor(R.color.memory_avg_use),
+ context.getColor(R.color.memory_max_use),
+ context.getColor(R.color.memory_remaining));
+ mColorBar.setRatios(mAvgRatio, mMaxRatio, mRemainingRatio);
}
public void onClick(View v) {
@@ -171,34 +222,6 @@
}
}
- private void addPackageHeaderItem(ViewGroup parent, String packageName) {
- LayoutInflater inflater = getActivity().getLayoutInflater();
- ViewGroup item = (ViewGroup) inflater.inflate(R.layout.running_processes_item,
- null);
- parent.addView(item);
- final ImageView icon = (ImageView) item.findViewById(R.id.icon);
- TextView nameView = (TextView) item.findViewById(R.id.name);
- TextView descriptionView = (TextView) item.findViewById(R.id.description);
- try {
- ApplicationInfo ai = mPm.getApplicationInfo(packageName, 0);
- icon.setImageDrawable(ai.loadIcon(mPm));
- nameView.setText(ai.loadLabel(mPm));
- } catch (PackageManager.NameNotFoundException e) {
- }
- descriptionView.setText(packageName);
- }
-
- private void addDetailsItem(ViewGroup parent, CharSequence label, CharSequence value) {
- LayoutInflater inflater = getActivity().getLayoutInflater();
- ViewGroup item = (ViewGroup) inflater.inflate(R.layout.power_usage_detail_item_text,
- null);
- parent.addView(item);
- TextView labelView = (TextView) item.findViewById(R.id.label);
- TextView valueView = (TextView) item.findViewById(R.id.value);
- labelView.setText(label);
- valueView.setText(value);
- }
-
final static Comparator<ProcStatsEntry> sEntryCompare = new Comparator<ProcStatsEntry>() {
@Override
public int compare(ProcStatsEntry lhs, ProcStatsEntry rhs) {
@@ -213,28 +236,35 @@
private void fillProcessesSection() {
final ArrayList<ProcStatsEntry> entries = new ArrayList<>();
- for (int ie=0; ie<mApp.mEntries.size(); ie++) {
+ for (int ie = 0; ie < mApp.mEntries.size(); ie++) {
ProcStatsEntry entry = mApp.mEntries.get(ie);
+ if (entry.mPackage.equals("os")) {
+ entry.mLabel = entry.mName;
+ } else {
+ if (mApp.mEntries.size() > 1) {
+ entry.mLabel = getString(R.string.process_format, (ie + 1));
+ } else {
+ entry.mLabel = getString(R.string.process);
+ }
+ }
entries.add(entry);
}
Collections.sort(entries, sEntryCompare);
- for (int ie=0; ie<entries.size(); ie++) {
+ for (int ie = 0; ie < entries.size(); ie++) {
ProcStatsEntry entry = entries.get(ie);
- LayoutInflater inflater = getActivity().getLayoutInflater();
- ViewGroup item = (ViewGroup) inflater.inflate(R.layout.process_stats_proc_details,
- null);
- mProcessesParent.addView(item);
- ((TextView)item.findViewById(R.id.processes_name)).setText(entry.mName);
- addDetailsItem(item, getResources().getText(R.string.process_stats_ram_use),
- Formatter.formatShortFileSize(getActivity(),
- (long)(entry.mRunWeight * mWeightToRam)));
- if (entry.mBgWeight > 0) {
- addDetailsItem(item, getResources().getText(R.string.process_stats_bg_ram_use),
- Formatter.formatShortFileSize(getActivity(),
- (long)(entry.mBgWeight * mWeightToRam)));
- }
- addDetailsItem(item, getResources().getText(R.string.process_stats_run_time),
- Utils.formatPercentage(entry.mRunDuration, mTotalTime));
+ PreferenceCategory processPref = new PreferenceCategory(getActivity());
+ processPref.setLayoutResource(R.layout.process_preference_category);
+ processPref.setTitle(entry.mLabel);
+
+ long memoryUse = Math.max((long)(entry.mRunWeight * mWeightToRam),
+ (long)(entry.mBgWeight * mWeightToRam));
+ String memoryString = Formatter.formatShortFileSize(getActivity(), memoryUse);
+ CharSequence frequency = ProcStatsPackageEntry.getFrequency(entry.mRunDuration
+ / (float)mTotalTime, getActivity());
+ processPref.setSummary(
+ getString(R.string.memory_use_running_format, memoryString, frequency));
+ getPreferenceScreen().addPreference(processPref);
+ fillServicesSection(entry, processPref);
}
}
@@ -268,52 +298,97 @@
long mDuration;
}
- private void fillServicesSection() {
+ private void fillServicesSection(ProcStatsEntry entry, PreferenceCategory processPref) {
final HashMap<String, PkgService> pkgServices = new HashMap<>();
final ArrayList<PkgService> pkgList = new ArrayList<>();
- for (int ie=0; ie< mApp.mEntries.size(); ie++) {
- ProcStatsEntry ent = mApp.mEntries.get(ie);
- for (int ip=0; ip<ent.mServices.size(); ip++) {
- String pkg = ent.mServices.keyAt(ip);
- PkgService psvc = null;
- ArrayList<ProcStatsEntry.Service> services = ent.mServices.valueAt(ip);
- for (int is=services.size()-1; is>=0; is--) {
- ProcStatsEntry.Service pent = services.get(is);
- if (pent.mDuration >= mOnePercentTime) {
+ for (int ip = 0; ip < entry.mServices.size(); ip++) {
+ String pkg = entry.mServices.keyAt(ip);
+ PkgService psvc = null;
+ ArrayList<ProcStatsEntry.Service> services = entry.mServices.valueAt(ip);
+ for (int is=services.size()-1; is>=0; is--) {
+ ProcStatsEntry.Service pent = services.get(is);
+ if (pent.mDuration >= mOnePercentTime) {
+ if (psvc == null) {
+ psvc = pkgServices.get(pkg);
if (psvc == null) {
- psvc = pkgServices.get(pkg);
- if (psvc == null) {
- psvc = new PkgService();
- pkgServices.put(pkg, psvc);
- pkgList.add(psvc);
- }
+ psvc = new PkgService();
+ pkgServices.put(pkg, psvc);
+ pkgList.add(psvc);
}
- psvc.mServices.add(pent);
- psvc.mDuration += pent.mDuration;
}
+ psvc.mServices.add(pent);
+ psvc.mDuration += pent.mDuration;
}
}
}
Collections.sort(pkgList, sServicePkgCompare);
- for (int ip=0; ip<pkgList.size(); ip++) {
+ for (int ip = 0; ip < pkgList.size(); ip++) {
ArrayList<ProcStatsEntry.Service> services = pkgList.get(ip).mServices;
Collections.sort(services, sServiceCompare);
- if (pkgList.size() > 1) {
- addPackageHeaderItem(mServicesParent, services.get(0).mPackage);
- }
for (int is=0; is<services.size(); is++) {
- ProcStatsEntry.Service service = services.get(is);
- String label = service.mName;
- int tail = label.lastIndexOf('.');
- if (tail >= 0 && tail < (label.length()-1)) {
- label = label.substring(tail+1);
- }
- String percentage = Utils.formatPercentage(service.mDuration, mTotalTime);
- addDetailsItem(mServicesParent, label, percentage);
+ final ProcStatsEntry.Service service = services.get(is);
+ CharSequence label = getLabel(service);
+ CancellablePreference servicePref = new CancellablePreference(getActivity());
+ servicePref.setSelectable(false);
+ servicePref.setTitle(label);
+ servicePref.setSummary(ProcStatsPackageEntry.getFrequency(
+ service.mDuration / (float) mTotalTime, getActivity()));
+ processPref.addPreference(servicePref);
+ mServiceMap.put(new ComponentName(service.mPackage, service.mName), servicePref);
}
}
}
+ private CharSequence getLabel(Service service) {
+ // Try to get the service label, on the off chance that one exists.
+ try {
+ ServiceInfo serviceInfo = getPackageManager().getServiceInfo(
+ new ComponentName(service.mPackage, service.mName), 0);
+ if (serviceInfo.labelRes != 0) {
+ return serviceInfo.loadLabel(getPackageManager());
+ }
+ } catch (NameNotFoundException e) {
+ }
+ String label = service.mName;
+ int tail = label.lastIndexOf('.');
+ if (tail >= 0 && tail < (label.length()-1)) {
+ label = label.substring(tail+1);
+ }
+ return label;
+ }
+
+ private void stopService(String pkg, String name) {
+ try {
+ ApplicationInfo appInfo = getActivity().getPackageManager().getApplicationInfo(pkg, 0);
+ if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ showStopServiceDialog(pkg, name);
+ return;
+ }
+ } catch (NameNotFoundException e) {
+ Log.e(TAG, "Can't find app " + pkg, e);
+ return;
+ }
+ doStopService(pkg, name);
+ }
+
+ private void showStopServiceDialog(final String pkg, final String name) {
+ new AlertDialog.Builder(getActivity())
+ .setTitle(R.string.runningservicedetails_stop_dlg_title)
+ .setMessage(R.string.runningservicedetails_stop_dlg_text)
+ .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ doStopService(pkg, name);
+ }
+ })
+ .setNegativeButton(R.string.dlg_cancel, null)
+ .show();
+ }
+
+ private void doStopService(String pkg, String name) {
+ getActivity().stopService(new Intent().setClassName(pkg, name));
+ updateRunningServices();
+ }
+
private void killProcesses() {
ActivityManager am = (ActivityManager)getActivity().getSystemService(
Context.ACTIVITY_SERVICE);
diff --git a/src/com/android/settings/applications/ProcessStatsPreference.java b/src/com/android/settings/applications/ProcessStatsPreference.java
index 182cf0e..a1725e3 100644
--- a/src/com/android/settings/applications/ProcessStatsPreference.java
+++ b/src/com/android/settings/applications/ProcessStatsPreference.java
@@ -17,20 +17,25 @@
package com.android.settings.applications;
import android.content.Context;
+import android.content.pm.PackageManager;
import android.graphics.drawable.ColorDrawable;
-import android.graphics.drawable.Drawable;
import android.preference.Preference;
-import android.text.format.Formatter;
+import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.View;
-import android.widget.ProgressBar;
-import android.widget.TextView;
+
import com.android.settings.R;
public class ProcessStatsPreference extends Preference {
+
private ProcStatsPackageEntry mEntry;
- private int mProgress;
- private CharSequence mProgressText;
+ private final int mAvgColor;
+ private final int mMaxColor;
+ private final int mRemainingColor;
+ private float mAvgRatio;
+ private float mMaxRatio;
+ private float mRemainingRatio;
public ProcessStatsPreference(Context context) {
this(context, null);
@@ -47,33 +52,38 @@
public ProcessStatsPreference(Context context, AttributeSet attrs, int defStyleAttr,
int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
- setLayoutResource(R.layout.preference_app_percentage);
+ setLayoutResource(R.layout.app_item_linear_color);
+ mAvgColor = context.getColor(R.color.memory_avg_use);
+ mMaxColor = context.getColor(R.color.memory_max_use);
+ mRemainingColor = context.getColor(R.color.memory_remaining);
}
- public void init(Drawable icon, ProcStatsPackageEntry entry) {
+ public void init(ProcStatsPackageEntry entry, PackageManager pm, float maxMemory) {
mEntry = entry;
- setIcon(icon != null ? icon : new ColorDrawable(0));
+ setTitle(TextUtils.isEmpty(entry.mUiLabel) ? entry.mPackage : entry.mUiLabel);
+ if (entry.mUiTargetApp != null) {
+ setIcon(entry.mUiTargetApp.loadIcon(pm));
+ } else {
+ setIcon(new ColorDrawable(0));
+ }
+ boolean statsForeground = entry.mRunWeight > entry.mBgWeight;
+ setSummary(statsForeground ? entry.getRunningFrequency(getContext())
+ : entry.getBackgroundFrequency(getContext()));
+ mAvgRatio = (statsForeground ? entry.mAvgRunMem : entry.mAvgBgMem) / maxMemory;
+ mMaxRatio = (statsForeground ? entry.mMaxRunMem : entry.mMaxBgMem) / maxMemory - mAvgRatio;
+ mRemainingRatio = 1 - mAvgRatio - mMaxRatio;
}
public ProcStatsPackageEntry getEntry() {
return mEntry;
}
- public void setPercent(double percentOfWeight, double percentOfTime, long memory) {
- mProgress = (int) Math.ceil(percentOfWeight);
- //mProgressText = Utils.formatPercentage((int) percentOfTime);
- mProgressText = Formatter.formatShortFileSize(getContext(), memory);
- notifyChanged();
- }
-
@Override
protected void onBindView(View view) {
super.onBindView(view);
- final ProgressBar progress = (ProgressBar) view.findViewById(android.R.id.progress);
- progress.setProgress(mProgress);
-
- final TextView text1 = (TextView) view.findViewById(android.R.id.text1);
- text1.setText(mProgressText);
+ LinearColorBar linearColorBar = (LinearColorBar) view.findViewById(R.id.linear_color_bar);
+ linearColorBar.setColors(mAvgColor, mMaxColor, mRemainingColor);
+ linearColorBar.setRatios(mAvgRatio, mMaxRatio, mRemainingRatio);
}
}
diff --git a/src/com/android/settings/applications/ProcessStatsUi.java b/src/com/android/settings/applications/ProcessStatsUi.java
index 45e24dd..96f76c0 100644
--- a/src/com/android/settings/applications/ProcessStatsUi.java
+++ b/src/com/android/settings/applications/ProcessStatsUi.java
@@ -16,82 +16,59 @@
package com.android.settings.applications;
-import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.PackageManager;
-import android.content.res.Resources;
import android.os.Bundle;
-import android.os.ParcelFileDescriptor;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.SystemClock;
-import android.os.UserManager;
import android.preference.Preference;
-import android.preference.PreferenceFragment;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.text.format.Formatter;
import android.util.Log;
-import android.util.SparseArray;
import android.util.TimeUtils;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.SubMenu;
-import com.android.internal.app.IProcessStats;
-import com.android.internal.app.ProcessMap;
+import android.widget.TextView;
+
import com.android.internal.app.ProcessStats;
import com.android.internal.logging.MetricsLogger;
-import com.android.internal.util.MemInfoReader;
import com.android.settings.InstrumentedPreferenceFragment;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.Utils;
+import com.android.settings.applications.ProcStatsData.MemInfo;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
-import java.util.HashMap;
+import java.util.List;
-public class ProcessStatsUi extends InstrumentedPreferenceFragment
- implements LinearColorBar.OnRegionTappedListener {
+public class ProcessStatsUi extends InstrumentedPreferenceFragment {
+ private static final String MEM_REGION = "mem_region";
+ private static final String STATS_TYPE = "stats_type";
+ private static final String USE_USS = "use_uss";
+ private static final String SHOW_SYSTEM = "show_system";
+ private static final String SHOW_PERCENTAGE = "show_percentage";
+ private static final String DURATION = "duration";
static final String TAG = "ProcessStatsUi";
static final boolean DEBUG = false;
private static final String KEY_APP_LIST = "app_list";
- private static final String KEY_MEM_STATUS = "mem_status";
+ private static final String KEY_STATUS_HEADER = "status_header";
private static final int NUM_DURATIONS = 4;
private static final int MENU_STATS_REFRESH = Menu.FIRST;
private static final int MENU_DURATION = Menu.FIRST + 1;
- private static final int MENU_SHOW_SYSTEM = MENU_DURATION + NUM_DURATIONS;
+ private static final int MENU_SHOW_PERCENTAGE = MENU_DURATION + NUM_DURATIONS;
+ private static final int MENU_SHOW_SYSTEM = MENU_SHOW_PERCENTAGE + 1;
private static final int MENU_USE_USS = MENU_SHOW_SYSTEM + 1;
private static final int MENU_TYPE_BACKGROUND = MENU_USE_USS + 1;
private static final int MENU_TYPE_FOREGROUND = MENU_TYPE_BACKGROUND + 1;
private static final int MENU_TYPE_CACHED = MENU_TYPE_FOREGROUND + 1;
- private static final int MENU_HELP = MENU_TYPE_CACHED + 1;
static final int MAX_ITEMS_TO_LIST = 60;
- final static Comparator<ProcStatsEntry> sEntryCompare = new Comparator<ProcStatsEntry>() {
- @Override
- public int compare(ProcStatsEntry lhs, ProcStatsEntry rhs) {
- if (lhs.mRunWeight < rhs.mRunWeight) {
- return 1;
- } else if (lhs.mRunWeight > rhs.mRunWeight) {
- return -1;
- } else if (lhs.mRunDuration < rhs.mRunDuration) {
- return 1;
- } else if (lhs.mRunDuration > rhs.mRunDuration) {
- return -1;
- }
- return 0;
- }
- };
-
final static Comparator<ProcStatsPackageEntry> sPackageEntryCompare
= new Comparator<ProcStatsPackageEntry>() {
@Override
@@ -109,21 +86,13 @@
}
};
- private static ProcessStats sStatsXfer;
-
- IProcessStats mProcessStats;
- UserManager mUm;
- ProcessStats mStats;
- int mMemState;
-
- private long mDuration;
- private long mLastDuration;
+ private boolean mShowPercentage;
private boolean mShowSystem;
private boolean mUseUss;
- private int mStatsType;
private int mMemRegion;
private MenuItem[] mDurationMenus = new MenuItem[NUM_DURATIONS];
+ private MenuItem mShowPercentageMenu;
private MenuItem mShowSystemMenu;
private MenuItem mUseUssMenu;
private MenuItem mTypeBackgroundMenu;
@@ -131,20 +100,18 @@
private MenuItem mTypeCachedMenu;
private PreferenceGroup mAppListGroup;
- private Preference mMemStatusPref;
+ private TextView mMemStatus;
- double mMaxWeight;
- long mTotalTime;
+ private long mTotalTime;
- long[] mMemTimes = new long[ProcessStats.ADJ_MEM_FACTOR_COUNT];
- double[] mMemStateWeights = new double[ProcessStats.STATE_COUNT];
- double mMemCachedWeight;
- double mMemFreeWeight;
- double mMemZRamWeight;
- double mMemKernelWeight;
- double mMemNativeWeight;
- double mMemTotalWeight;
- double mWeightToRam;
+ private long[] mMemTimes = new long[ProcessStats.ADJ_MEM_FACTOR_COUNT];
+ private LinearColorBar mColors;
+ private TextView mMemUsed;
+ private LayoutPreference mHeader;
+ private PackageManager mPm;
+ private long memTotalTime;
+
+ private int mStatsType;
// The actual duration value to use for each duration option. Note these
// are lower than the actual duration, since our durations are computed in
@@ -161,26 +128,31 @@
R.string.menu_duration_12h, R.string.menu_duration_1d
};
+ private ProcStatsData mStatsManager;
+ private float mMaxMemoryUsage;
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- if (icicle != null) {
- mStats = sStatsXfer;
- }
+ mStatsManager = new ProcStatsData(getActivity(), icicle != null);
+
+ mPm = getActivity().getPackageManager();
addPreferencesFromResource(R.xml.process_stats_summary);
- mProcessStats = IProcessStats.Stub.asInterface(
- ServiceManager.getService(ProcessStats.SERVICE_NAME));
- mUm = (UserManager)getActivity().getSystemService(Context.USER_SERVICE);
mAppListGroup = (PreferenceGroup) findPreference(KEY_APP_LIST);
- mMemStatusPref = mAppListGroup.findPreference(KEY_MEM_STATUS);
- mDuration = icicle != null ? icicle.getLong("duration", sDurations[0]) : sDurations[0];
- mShowSystem = icicle != null ? icicle.getBoolean("show_system") : false;
- mUseUss = icicle != null ? icicle.getBoolean("use_uss") : false;
- mStatsType = icicle != null ? icicle.getInt("stats_type", MENU_TYPE_BACKGROUND)
+ mHeader = (LayoutPreference)mAppListGroup.findPreference(KEY_STATUS_HEADER);
+ mMemStatus = (TextView) mHeader.findViewById(R.id.memory_state);
+ mColors = (LinearColorBar) mHeader.findViewById(R.id.color_bar);
+ mMemUsed = (TextView) mHeader.findViewById(R.id.memory_used);
+ mStatsManager.setDuration(icicle != null
+ ? icicle.getLong(DURATION, sDurations[0]) : sDurations[0]);
+ mShowPercentage = icicle != null ? icicle.getBoolean(SHOW_PERCENTAGE) : true;
+ mShowSystem = icicle != null ? icicle.getBoolean(SHOW_SYSTEM) : false;
+ mUseUss = icicle != null ? icicle.getBoolean(USE_USS) : false;
+ mStatsType = icicle != null ? icicle.getInt(STATS_TYPE, MENU_TYPE_BACKGROUND)
: MENU_TYPE_BACKGROUND;
- mMemRegion = icicle != null ? icicle.getInt("mem_region", LinearColorBar.REGION_GREEN)
+ mMemRegion = icicle != null ? icicle.getInt(MEM_REGION, LinearColorBar.REGION_GREEN)
: LinearColorBar.REGION_GREEN;
setHasOptionsMenu(true);
}
@@ -193,47 +165,31 @@
@Override
public void onResume() {
super.onResume();
- refreshStats();
+ mStatsManager.refreshStats(false);
+ refreshUi();
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
- outState.putLong("duration", mDuration);
- outState.putBoolean("show_system", mShowSystem);
- outState.putBoolean("use_uss", mUseUss);
- outState.putInt("stats_type", mStatsType);
- outState.putInt("mem_region", mMemRegion);
+ outState.putLong(DURATION, mStatsManager.getDuration());
+ outState.putBoolean(SHOW_PERCENTAGE, mShowPercentage);
+ outState.putBoolean(SHOW_SYSTEM, mShowSystem);
+ outState.putBoolean(USE_USS, mUseUss);
+ outState.putInt(STATS_TYPE, mStatsType);
+ outState.putInt(MEM_REGION, mMemRegion);
}
@Override
public void onDestroy() {
super.onDestroy();
if (getActivity().isChangingConfigurations()) {
- sStatsXfer = mStats;
+ mStatsManager.xferStats();
}
}
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- if (preference instanceof LinearColorPreference) {
- Bundle args = new Bundle();
- args.putLongArray(ProcessStatsMemDetail.EXTRA_MEM_TIMES, mMemTimes);
- args.putDoubleArray(ProcessStatsMemDetail.EXTRA_MEM_STATE_WEIGHTS, mMemStateWeights);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_CACHED_WEIGHT, mMemCachedWeight);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_FREE_WEIGHT, mMemFreeWeight);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_ZRAM_WEIGHT, mMemZRamWeight);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_KERNEL_WEIGHT, mMemKernelWeight);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_NATIVE_WEIGHT, mMemNativeWeight);
- args.putDouble(ProcessStatsMemDetail.EXTRA_MEM_TOTAL_WEIGHT, mMemTotalWeight);
- args.putBoolean(ProcessStatsMemDetail.EXTRA_USE_USS, mUseUss);
- args.putLong(ProcessStatsMemDetail.EXTRA_TOTAL_TIME, mTotalTime);
- ((SettingsActivity) getActivity()).startPreferencePanel(
- ProcessStatsMemDetail.class.getName(), args, R.string.mem_details_title,
- null, null, 0);
- return true;
- }
-
if (!(preference instanceof ProcessStatsPreference)) {
return false;
}
@@ -242,9 +198,11 @@
Bundle args = new Bundle();
args.putParcelable(ProcessStatsDetail.EXTRA_PACKAGE_ENTRY, pgp.getEntry());
args.putBoolean(ProcessStatsDetail.EXTRA_USE_USS, mUseUss);
- args.putDouble(ProcessStatsDetail.EXTRA_MAX_WEIGHT, mMaxWeight);
- args.putDouble(ProcessStatsDetail.EXTRA_WEIGHT_TO_RAM, mWeightToRam);
+ args.putDouble(ProcessStatsDetail.EXTRA_WEIGHT_TO_RAM,
+ mStatsManager.getMemInfo().weightToRam);
args.putLong(ProcessStatsDetail.EXTRA_TOTAL_TIME, mTotalTime);
+ args.putFloat(ProcessStatsDetail.EXTRA_MAX_MEMORY_USAGE, mMaxMemoryUsage);
+ args.putDouble(ProcessStatsDetail.EXTRA_TOTAL_SCALE, mStatsManager.getMemInfo().totalScale);
((SettingsActivity) getActivity()).startPreferencePanel(
ProcessStatsDetail.class.getName(), args, R.string.details_title, null, null, 0);
@@ -263,41 +221,37 @@
mDurationMenus[i] = subMenu.add(0, MENU_DURATION+i, 0, sDurationLabels[i])
.setCheckable(true);
}
- mShowSystemMenu = menu.add(0, MENU_SHOW_SYSTEM, 0, R.string.menu_show_system)
- .setAlphabeticShortcut('s')
- .setCheckable(true);
- mUseUssMenu = menu.add(0, MENU_USE_USS, 0, R.string.menu_use_uss)
- .setAlphabeticShortcut('u')
- .setCheckable(true);
- subMenu = menu.addSubMenu(R.string.menu_proc_stats_type);
- mTypeBackgroundMenu = subMenu.add(0, MENU_TYPE_BACKGROUND, 0,
- R.string.menu_proc_stats_type_background)
- .setAlphabeticShortcut('b')
- .setCheckable(true);
- mTypeForegroundMenu = subMenu.add(0, MENU_TYPE_FOREGROUND, 0,
- R.string.menu_proc_stats_type_foreground)
- .setAlphabeticShortcut('f')
- .setCheckable(true);
- mTypeCachedMenu = subMenu.add(0, MENU_TYPE_CACHED, 0,
- R.string.menu_proc_stats_type_cached)
- .setCheckable(true);
+ // Hide these for now, until their need is determined.
+// mShowPercentageMenu = menu.add(0, MENU_SHOW_PERCENTAGE, 0, R.string.menu_show_percentage)
+// .setAlphabeticShortcut('p')
+// .setCheckable(true);
+// mShowSystemMenu = menu.add(0, MENU_SHOW_SYSTEM, 0, R.string.menu_show_system)
+// .setAlphabeticShortcut('s')
+// .setCheckable(true);
+// mUseUssMenu = menu.add(0, MENU_USE_USS, 0, R.string.menu_use_uss)
+// .setAlphabeticShortcut('u')
+// .setCheckable(true);
+// subMenu = menu.addSubMenu(R.string.menu_proc_stats_type);
+// mTypeBackgroundMenu = subMenu.add(0, MENU_TYPE_BACKGROUND, 0,
+// R.string.menu_proc_stats_type_background)
+// .setAlphabeticShortcut('b')
+// .setCheckable(true);
+// mTypeForegroundMenu = subMenu.add(0, MENU_TYPE_FOREGROUND, 0,
+// R.string.menu_proc_stats_type_foreground)
+// .setAlphabeticShortcut('f')
+// .setCheckable(true);
+// mTypeCachedMenu = subMenu.add(0, MENU_TYPE_CACHED, 0,
+// R.string.menu_proc_stats_type_cached)
+// .setCheckable(true);
updateMenus();
-
- /*
- String helpUrl;
- if (!TextUtils.isEmpty(helpUrl = getResources().getString(R.string.help_url_battery))) {
- final MenuItem help = menu.add(0, MENU_HELP, 0, R.string.help_label);
- HelpUtils.prepareHelpMenuItem(getActivity(), help, helpUrl);
- }
- */
}
void updateMenus() {
int closestIndex = 0;
- long closestDelta = Math.abs(sDurations[0]-mDuration);
- for (int i=1; i<NUM_DURATIONS; i++) {
- long delta = Math.abs(sDurations[i]-mDuration);
+ long closestDelta = Math.abs(sDurations[0] - mStatsManager.getDuration());
+ for (int i = 1; i < NUM_DURATIONS; i++) {
+ long delta = Math.abs(sDurations[i] - mStatsManager.getDuration());
if (delta < closestDelta) {
closestDelta = delta;
closestIndex = i;
@@ -308,7 +262,10 @@
mDurationMenus[i].setChecked(i == closestIndex);
}
}
- mDuration = sDurations[closestIndex];
+ mStatsManager.setDuration(sDurations[closestIndex]);
+ if (mShowPercentageMenu != null) {
+ mShowPercentageMenu.setChecked(mShowPercentage);
+ }
if (mShowSystemMenu != null) {
mShowSystemMenu.setChecked(mShowSystem);
mShowSystemMenu.setEnabled(mStatsType == MENU_TYPE_BACKGROUND);
@@ -332,46 +289,44 @@
final int id = item.getItemId();
switch (id) {
case MENU_STATS_REFRESH:
- mStats = null;
- refreshStats();
+ mStatsManager.refreshStats(false);
+ refreshUi();
+ return true;
+ case MENU_SHOW_PERCENTAGE:
+ mShowPercentage = !mShowPercentage;
+ refreshUi();
return true;
case MENU_SHOW_SYSTEM:
mShowSystem = !mShowSystem;
- refreshStats();
+ refreshUi();
return true;
case MENU_USE_USS:
mUseUss = !mUseUss;
- refreshStats();
+ refreshUi();
return true;
case MENU_TYPE_BACKGROUND:
case MENU_TYPE_FOREGROUND:
case MENU_TYPE_CACHED:
mStatsType = item.getItemId();
- refreshStats();
+ if (mStatsType == MENU_TYPE_FOREGROUND) {
+ mStatsManager.setStats(FOREGROUND_PROC_STATES);
+ } else if (mStatsType == MENU_TYPE_CACHED) {
+ mStatsManager.setStats(CACHED_PROC_STATES);
+ } else {
+ mStatsManager.setStats(mShowSystem ? BACKGROUND_AND_SYSTEM_PROC_STATES
+ : ProcessStats.BACKGROUND_PROC_STATES);
+ }
+ refreshUi();
return true;
default:
- if (id >= MENU_DURATION && id < (MENU_DURATION+NUM_DURATIONS)) {
- mDuration = sDurations[id-MENU_DURATION];
- refreshStats();
+ if (id >= MENU_DURATION && id < (MENU_DURATION + NUM_DURATIONS)) {
+ mStatsManager.setDuration(sDurations[id - MENU_DURATION]);
+ refreshUi();
}
return false;
}
}
- @Override
- public void onRegionTapped(int region) {
- if (mMemRegion != region) {
- mMemRegion = region;
- refreshStats();
- }
- }
-
- private void addNotAvailableMessage() {
- Preference notAvailable = new Preference(getActivity());
- notAvailable.setTitle(R.string.power_usage_not_available);
- mAppListGroup.addPreference(notAvailable);
- }
-
/**
* All states in which we consider a process to be actively running (rather than
* something that can be freely killed to reclaim RAM). Note this also includes
@@ -396,385 +351,75 @@
ProcessStats.STATE_CACHED_EMPTY
};
- public static final int[] RED_MEM_STATES = new int[] {
- ProcessStats.ADJ_MEM_FACTOR_CRITICAL
- };
-
- public static final int[] YELLOW_MEM_STATES = new int[] {
- ProcessStats.ADJ_MEM_FACTOR_CRITICAL, ProcessStats.ADJ_MEM_FACTOR_LOW,
- ProcessStats.ADJ_MEM_FACTOR_MODERATE
- };
-
- private String makeDuration(long time) {
+ public static String makeDuration(long time) {
StringBuilder sb = new StringBuilder(32);
TimeUtils.formatDuration(time, sb);
return sb.toString();
}
- private void refreshStats() {
+ private void refreshUi() {
updateMenus();
- if (mStats == null || mLastDuration != mDuration) {
- load();
- }
-
- int[] stats;
- int statsLabel;
- if (mStatsType == MENU_TYPE_FOREGROUND) {
- stats = FOREGROUND_PROC_STATES;
- statsLabel = R.string.process_stats_type_foreground;
- } else if (mStatsType == MENU_TYPE_CACHED) {
- stats = CACHED_PROC_STATES;
- statsLabel = R.string.process_stats_type_cached;
- } else {
- stats = mShowSystem ? BACKGROUND_AND_SYSTEM_PROC_STATES
- : ProcessStats.BACKGROUND_PROC_STATES;
- statsLabel = R.string.process_stats_type_background;
- }
mAppListGroup.removeAll();
mAppListGroup.setOrderingAsAdded(false);
+ mHeader.setOrder(-1);
+ mAppListGroup.addPreference(mHeader);
- final long elapsedTime = mStats.mTimePeriodEndRealtime-mStats.mTimePeriodStartRealtime;
+ final long elapsedTime = mStatsManager.getElapsedTime();
- long now = SystemClock.uptimeMillis();
-
- final PackageManager pm = getActivity().getPackageManager();
-
- mTotalTime = ProcessStats.dumpSingleTime(null, null, mStats.mMemFactorDurations,
- mStats.mMemFactor, mStats.mStartTime, now);
- if (DEBUG) Log.d(TAG, "Total time of stats: " + makeDuration(mTotalTime));
-
- for (int i=0; i<mMemTimes.length; i++) {
- mMemTimes[i] = 0;
- }
- for (int iscreen=0; iscreen<ProcessStats.ADJ_COUNT; iscreen+=ProcessStats.ADJ_SCREEN_MOD) {
- for (int imem=0; imem<ProcessStats.ADJ_MEM_FACTOR_COUNT; imem++) {
- int state = imem+iscreen;
- mMemTimes[imem] += mStats.mMemFactorDurations[state];
- }
- }
-
- long memTotalTime;
- int[] memStates;
-
- LinearColorPreference colors = new LinearColorPreference(getActivity());
- colors.setOrder(-1);
- switch (mMemRegion) {
- case LinearColorBar.REGION_RED:
- memTotalTime = mMemTimes[ProcessStats.ADJ_MEM_FACTOR_CRITICAL];
- memStates = RED_MEM_STATES;
- break;
- case LinearColorBar.REGION_YELLOW:
- memTotalTime = mMemTimes[ProcessStats.ADJ_MEM_FACTOR_CRITICAL]
- + mMemTimes[ProcessStats.ADJ_MEM_FACTOR_LOW]
- + mMemTimes[ProcessStats.ADJ_MEM_FACTOR_MODERATE];
- memStates = YELLOW_MEM_STATES;
- break;
- default:
- memTotalTime = mTotalTime;
- memStates = ProcessStats.ALL_MEM_ADJ;
- break;
- }
+ memTotalTime = mTotalTime;
final Context context = getActivity();
- colors.setColors(context.getColor(R.color.running_processes_apps_ram),
+ // TODO: More Colors.
+ mColors.setColors(context.getColor(R.color.running_processes_apps_ram),
context.getColor(R.color.running_processes_apps_ram),
context.getColor(R.color.running_processes_free_ram));
- // Compute memory badness for chart color.
- /*
- int[] badColors = com.android.settings.Utils.BADNESS_COLORS;
- long timeGood = mMemTimes[ProcessStats.ADJ_MEM_FACTOR_NORMAL];
- timeGood += (mMemTimes[ProcessStats.ADJ_MEM_FACTOR_MODERATE]*2)/3;
- timeGood += mMemTimes[ProcessStats.ADJ_MEM_FACTOR_LOW]/3;
- float memBadness = ((float)timeGood)/mTotalTime;
- int badnessColor = badColors[1 + Math.round(memBadness*(badColors.length-2))];
- colors.setColors(badnessColor, badnessColor, badnessColor);
- */
-
- // We are now going to scale the mMemTimes to match the total elapsed time.
- // These are in uptime, so they will often be smaller than the elapsed time,
- // but if the user taps on the bar we want to show the times to them. It is confusing
- // to see them be smaller than what we told them the measured duration is, so just
- // scaling them up with make things look reasonable with them none the wiser.
- for (int i=0; i<ProcessStats.ADJ_MEM_FACTOR_COUNT; i++) {
- mMemTimes[i] = (long)((mMemTimes[i]*(double)elapsedTime)/mTotalTime);
- }
-
- ProcessStats.TotalMemoryUseCollection totalMem = new ProcessStats.TotalMemoryUseCollection(
- ProcessStats.ALL_SCREEN_ADJ, memStates);
- mStats.computeTotalMemoryUse(totalMem, now);
- double freeWeight = totalMem.sysMemFreeWeight + totalMem.sysMemCachedWeight;
- double usedWeight = totalMem.sysMemKernelWeight + totalMem.sysMemNativeWeight
- + totalMem.sysMemZRamWeight;
- double backgroundWeight = 0, persBackgroundWeight = 0;
- mMemCachedWeight = totalMem.sysMemCachedWeight;
- mMemFreeWeight = totalMem.sysMemFreeWeight;
- mMemZRamWeight = totalMem.sysMemZRamWeight;
- mMemKernelWeight = totalMem.sysMemKernelWeight;
- mMemNativeWeight = totalMem.sysMemNativeWeight;
- for (int i=0; i<ProcessStats.STATE_COUNT; i++) {
- if (i == ProcessStats.STATE_SERVICE_RESTARTING) {
- // These don't really run.
- mMemStateWeights[i] = 0;
- } else {
- mMemStateWeights[i] = totalMem.processStateWeight[i];
- if (i >= ProcessStats.STATE_HOME) {
- freeWeight += totalMem.processStateWeight[i];
- } else {
- usedWeight += totalMem.processStateWeight[i];
- }
- if (i >= ProcessStats.STATE_IMPORTANT_FOREGROUND) {
- backgroundWeight += totalMem.processStateWeight[i];
- persBackgroundWeight += totalMem.processStateWeight[i];
- }
- if (i == ProcessStats.STATE_PERSISTENT) {
- persBackgroundWeight += totalMem.processStateWeight[i];
- }
- }
- }
- if (DEBUG) {
- Log.i(TAG, "Used RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)((usedWeight * 1024) / memTotalTime)));
- Log.i(TAG, "Free RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)((freeWeight * 1024) / memTotalTime)));
- Log.i(TAG, "Total RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)(((freeWeight+usedWeight) * 1024) / memTotalTime)));
- Log.i(TAG, "Background+Cached RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)((backgroundWeight * 1024) / memTotalTime)));
- }
- mMemTotalWeight = freeWeight + usedWeight;
-
// For computing the ratio to show, we want to count the baseline cached RAM we
// need (at which point we start killing processes) as used RAM, so that if we
// reach the point of thrashing due to no RAM for any background processes we
// report that as RAM being full. To do this, we need to first convert the weights
// back to actual RAM... and since the RAM values we compute here won't exactly
// match the real physical RAM, scale those to the actual physical RAM. No problem!
- double usedRam = (usedWeight*1024)/memTotalTime;
- double freeRam = (freeWeight*1024)/memTotalTime;
- double totalRam = usedRam + freeRam;
- MemInfoReader memReader = new MemInfoReader();
- memReader.readMemInfo();
- double realTotalRam = memReader.getTotalSize();
- double totalScale = realTotalRam / totalRam;
- mWeightToRam = totalScale / memTotalTime * 1024;
- mMaxWeight = totalRam / mWeightToRam;
- double realUsedRam = usedRam * totalScale;
- double realFreeRam = freeRam * totalScale;
- if (DEBUG) {
- Log.i(TAG, "Scaled Used RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)realUsedRam));
- Log.i(TAG, "Scaled Free RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)realFreeRam));
- }
- ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo();
- ((ActivityManager)getActivity().getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(
- memInfo);
- long baseCacheRam;
- if (memInfo.hiddenAppThreshold >= realFreeRam) {
- realUsedRam = realFreeRam;
- realFreeRam = 0;
- baseCacheRam = (long)realFreeRam;
- } else {
- realUsedRam += memInfo.hiddenAppThreshold;
- realFreeRam -= memInfo.hiddenAppThreshold;
- baseCacheRam = memInfo.hiddenAppThreshold;
- }
- if (DEBUG) {
- Log.i(TAG, "Adj Scaled Used RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)realUsedRam));
- Log.i(TAG, "Adj Scaled Free RAM: " + Formatter.formatShortFileSize(getActivity(),
- (long)realFreeRam));
- }
+ MemInfo memInfo = mStatsManager.getMemInfo();
- mMemStatusPref.setOrder(-2);
- mAppListGroup.addPreference(mMemStatusPref);
- String durationString = Utils.formatElapsedTime(getActivity(), elapsedTime, false);
- String usedString = Formatter.formatShortFileSize(getActivity(), (long) realUsedRam);
- String totalString = Formatter.formatShortFileSize(getActivity(), (long)realTotalRam);
+ String durationString = Utils.formatElapsedTime(context, elapsedTime, false);
+ String usedString = Formatter.formatShortFileSize(context, (long) memInfo.realUsedRam);
+ String totalString = Formatter.formatShortFileSize(context, (long) memInfo.realTotalRam);
CharSequence memString;
CharSequence[] memStatesStr = getResources().getTextArray(R.array.ram_states);
- if (mMemState >= 0 && mMemState < memStatesStr.length) {
- memString = memStatesStr[mMemState];
+ int memState = mStatsManager.getMemState();
+ if (memState >= 0 && memState < memStatesStr.length) {
+ memString = memStatesStr[memState];
} else {
memString = "?";
}
- mMemStatusPref.setTitle(getActivity().getString(R.string.process_stats_total_duration,
- usedString, totalString, durationString));
- mMemStatusPref.setSummary(getActivity().getString(R.string.process_stats_memory_status,
- memString));
- float usedRatio = (float)(realUsedRam/(realFreeRam+realUsedRam));
- colors.setRatios(usedRatio, 0, 1-usedRatio);
-
- if (false) {
- colors.setOnRegionTappedListener(this);
- switch (mMemRegion) {
- case LinearColorBar.REGION_RED:
- colors.setColoredRegions(LinearColorBar.REGION_RED);
- memTotalTime = mMemTimes[ProcessStats.ADJ_MEM_FACTOR_CRITICAL];
- memStates = RED_MEM_STATES;
- break;
- case LinearColorBar.REGION_YELLOW:
- colors.setColoredRegions(LinearColorBar.REGION_RED
- | LinearColorBar.REGION_YELLOW);
- memTotalTime = mMemTimes[ProcessStats.ADJ_MEM_FACTOR_CRITICAL]
- + mMemTimes[ProcessStats.ADJ_MEM_FACTOR_LOW]
- + mMemTimes[ProcessStats.ADJ_MEM_FACTOR_MODERATE];
- memStates = YELLOW_MEM_STATES;
- break;
- default:
- colors.setColoredRegions(LinearColorBar.REGION_ALL);
- memTotalTime = mTotalTime;
- memStates = ProcessStats.ALL_MEM_ADJ;
- break;
- }
- colors.setRatios(mMemTimes[ProcessStats.ADJ_MEM_FACTOR_CRITICAL] / (float)mTotalTime,
- (mMemTimes[ProcessStats.ADJ_MEM_FACTOR_LOW]
- + mMemTimes[ProcessStats.ADJ_MEM_FACTOR_MODERATE]) / (float)mTotalTime,
- mMemTimes[ProcessStats.ADJ_MEM_FACTOR_NORMAL] / (float)mTotalTime);
+ if (mShowPercentage) {
+ mMemUsed.setText(context.getString(
+ R.string.process_stats_total_duration_percentage,
+ Utils.formatPercentage((long) memInfo.realUsedRam, (long) memInfo.realTotalRam),
+ durationString));
+ } else {
+ mMemUsed.setText(context.getString(R.string.process_stats_total_duration,
+ usedString, totalString, durationString));
}
+ mMemStatus.setText(context.getString(R.string.process_stats_memory_status,
+ memString));
+ float usedRatio = (float)(memInfo.realUsedRam
+ / (memInfo.realFreeRam + memInfo.realUsedRam));
+ mColors.setRatios(usedRatio, 0, 1-usedRatio);
- mAppListGroup.addPreference(colors);
+ List<ProcStatsPackageEntry> pkgEntries = mStatsManager.getEntries();
- ProcessStats.ProcessDataCollection bgTotals = new ProcessStats.ProcessDataCollection(
- ProcessStats.ALL_SCREEN_ADJ, memStates, stats);
- ProcessStats.ProcessDataCollection runTotals = new ProcessStats.ProcessDataCollection(
- ProcessStats.ALL_SCREEN_ADJ, memStates, ProcessStats.NON_CACHED_PROC_STATES);
-
- final ArrayList<ProcStatsEntry> procEntries = new ArrayList<>();
- final ArrayList<ProcStatsPackageEntry> pkgEntries = new ArrayList<>();
-
- /*
- ArrayList<ProcessStats.ProcessState> rawProcs = mStats.collectProcessesLocked(
- ProcessStats.ALL_SCREEN_ADJ, ProcessStats.ALL_MEM_ADJ,
- ProcessStats.BACKGROUND_PROC_STATES, now, null);
- for (int i=0, N=(rawProcs != null ? rawProcs.size() : 0); i<N; i++) {
- procs.add(new ProcStatsEntry(rawProcs.get(i), bgTotals));
- }
- */
-
- if (DEBUG) Log.d(TAG, "-------------------- PULLING PROCESSES");
-
- final ProcessMap<ProcStatsEntry> entriesMap = new ProcessMap<ProcStatsEntry>();
- for (int ipkg=0, N=mStats.mPackages.getMap().size(); ipkg<N; ipkg++) {
- final SparseArray<SparseArray<ProcessStats.PackageState>> pkgUids
- = mStats.mPackages.getMap().valueAt(ipkg);
- for (int iu=0; iu<pkgUids.size(); iu++) {
- final SparseArray<ProcessStats.PackageState> vpkgs = pkgUids.valueAt(iu);
- for (int iv=0; iv<vpkgs.size(); iv++) {
- final ProcessStats.PackageState st = vpkgs.valueAt(iv);
- for (int iproc=0; iproc<st.mProcesses.size(); iproc++) {
- final ProcessStats.ProcessState pkgProc = st.mProcesses.valueAt(iproc);
- final ProcessStats.ProcessState proc = mStats.mProcesses.get(pkgProc.mName,
- pkgProc.mUid);
- if (proc == null) {
- Log.w(TAG, "No process found for pkg " + st.mPackageName
- + "/" + st.mUid + " proc name " + pkgProc.mName);
- continue;
- }
- ProcStatsEntry ent = entriesMap.get(proc.mName, proc.mUid);
- if (ent == null) {
- ent = new ProcStatsEntry(proc, st.mPackageName, bgTotals, runTotals,
- mUseUss);
- if (ent.mRunWeight > 0) {
- if (DEBUG) Log.d(TAG, "Adding proc " + proc.mName + "/"
- + proc.mUid + ": time=" + makeDuration(ent.mRunDuration) + " ("
- + ((((double)ent.mRunDuration) / memTotalTime) * 100) + "%)"
- + " pss=" + ent.mAvgRunMem);
- entriesMap.put(proc.mName, proc.mUid, ent);
- procEntries.add(ent);
- }
- } else {
- ent.addPackage(st.mPackageName);
- }
- }
- }
- }
- }
-
- if (DEBUG) Log.d(TAG, "-------------------- MAPPING SERVICES");
-
- // Add in service info.
- if (mStatsType == MENU_TYPE_BACKGROUND) {
- for (int ip=0, N=mStats.mPackages.getMap().size(); ip<N; ip++) {
- SparseArray<SparseArray<ProcessStats.PackageState>> uids
- = mStats.mPackages.getMap().valueAt(ip);
- for (int iu=0; iu<uids.size(); iu++) {
- SparseArray<ProcessStats.PackageState> vpkgs = uids.valueAt(iu);
- for (int iv=0; iv<vpkgs.size(); iv++) {
- ProcessStats.PackageState ps = vpkgs.valueAt(iv);
- for (int is=0, NS=ps.mServices.size(); is<NS; is++) {
- ProcessStats.ServiceState ss = ps.mServices.valueAt(is);
- if (ss.mProcessName != null) {
- ProcStatsEntry ent = entriesMap.get(ss.mProcessName,
- uids.keyAt(iu));
- if (ent != null) {
- if (DEBUG) Log.d(TAG, "Adding service " + ps.mPackageName
- + "/" + ss.mName + "/" + uids.keyAt(iu) + " to proc "
- + ss.mProcessName);
- ent.addService(ss);
- } else {
- Log.w(TAG, "No process " + ss.mProcessName + "/" + uids.keyAt(iu)
- + " for service " + ss.mName);
- }
- }
- }
- }
- }
- }
- }
-
- // Combine processes into packages.
- HashMap<String, ProcStatsPackageEntry> pkgMap = new HashMap<>();
- for (int i=procEntries.size()-1; i>=0; i--) {
- ProcStatsEntry proc = procEntries.get(i);
- proc.evaluateTargetPackage(pm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
- ProcStatsPackageEntry pkg = pkgMap.get(proc.mBestTargetPackage);
- if (pkg == null) {
- pkg = new ProcStatsPackageEntry(proc.mBestTargetPackage);
- pkgMap.put(proc.mBestTargetPackage, pkg);
- pkgEntries.add(pkg);
- }
- pkg.addEntry(proc);
- }
-
- // Add in fake entry representing the OS itself.
- ProcStatsPackageEntry osPkg = new ProcStatsPackageEntry("os");
- pkgMap.put("os", osPkg);
- pkgEntries.add(osPkg);
- ProcStatsEntry osEntry;
- if (totalMem.sysMemNativeWeight > 0) {
- osEntry = new ProcStatsEntry("os", 0,
- getString(R.string.process_stats_os_native), memTotalTime,
- (long)(totalMem.sysMemNativeWeight/memTotalTime));
- osEntry.evaluateTargetPackage(pm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
- osPkg.addEntry(osEntry);
- }
- if (totalMem.sysMemKernelWeight > 0) {
- osEntry = new ProcStatsEntry("os", 0,
- getString(R.string.process_stats_os_kernel), memTotalTime,
- (long)(totalMem.sysMemKernelWeight/memTotalTime));
- osEntry.evaluateTargetPackage(pm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
- osPkg.addEntry(osEntry);
- }
- if (totalMem.sysMemZRamWeight > 0) {
- osEntry = new ProcStatsEntry("os", 0,
- getString(R.string.process_stats_os_zram), memTotalTime,
- (long)(totalMem.sysMemZRamWeight/memTotalTime));
- osEntry.evaluateTargetPackage(pm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
- osPkg.addEntry(osEntry);
- }
- if (baseCacheRam > 0) {
- osEntry = new ProcStatsEntry("os", 0,
- getString(R.string.process_stats_os_cache), memTotalTime, baseCacheRam/1024);
- osEntry.evaluateTargetPackage(pm, mStats, bgTotals, runTotals, sEntryCompare, mUseUss);
- osPkg.addEntry(osEntry);
- }
-
+ // Update everything and get the absolute maximum of memory usage for scaling.
+ mMaxMemoryUsage = 0;
for (int i=0, N=pkgEntries.size(); i<N; i++) {
ProcStatsPackageEntry pkg = pkgEntries.get(i);
pkg.updateMetrics();
+ float maxMem = Math.max(pkg.mMaxBgMem, pkg.mMaxRunMem);
+ if (maxMem > mMaxMemoryUsage) {
+ mMaxMemoryUsage = maxMem;
+ }
}
Collections.sort(pkgEntries, sPackageEntryCompare);
@@ -789,62 +434,25 @@
int end = pkgEntries.size()-1;
while (end >= 0) {
ProcStatsPackageEntry pkg = pkgEntries.get(end);
- final double percentOfWeight = (pkg.mRunWeight / mMaxWeight) * 100;
- final double percentOfTime = (((double)pkg.mRunDuration) / memTotalTime) * 100;
+ final double percentOfWeight = (pkg.mRunWeight
+ / (memInfo.totalRam / memInfo.weightToRam)) * 100;
+ final double percentOfTime = (((double) pkg.mRunDuration) / memTotalTime) * 100;
if (percentOfWeight >= .01 || percentOfTime >= 25) {
break;
}
end--;
}
- for (int i=0; i<=end; i++) {
+ for (int i=0; i <= end; i++) {
ProcStatsPackageEntry pkg = pkgEntries.get(i);
- final double percentOfWeight = (pkg.mRunWeight / mMaxWeight) * 100;
- final double percentOfTime = (((double)pkg.mRunDuration) / memTotalTime) * 100;
- ProcessStatsPreference pref = new ProcessStatsPreference(getActivity());
- pref.init(null, pkg);
- pkg.retrieveUiData(getActivity(), pm);
- pref.setTitle(pkg.mUiLabel);
- if (pkg.mUiTargetApp != null) {
- pref.setIcon(pkg.mUiTargetApp.loadIcon(pm));
- }
+ ProcessStatsPreference pref = new ProcessStatsPreference(context);
+ pkg.retrieveUiData(context, mPm);
+ pref.init(pkg, mPm, mMaxMemoryUsage);
pref.setOrder(i);
- pref.setPercent(percentOfWeight, percentOfTime,
- (long)(pkg.mRunWeight * mWeightToRam));
mAppListGroup.addPreference(pref);
- if (mStatsType == MENU_TYPE_BACKGROUND) {
- if (DEBUG) {
- Log.i(TAG, "App " + pkg.mUiLabel + ": weightedRam="
- + Formatter.formatShortFileSize(getActivity(),
- (long)((pkg.mRunWeight * 1024) / memTotalTime))
- + ", avgRam=" + Formatter.formatShortFileSize(getActivity(),
- (pkg.mAvgRunMem *1024)));
- }
-
- }
if (mAppListGroup.getPreferenceCount() > (MAX_ITEMS_TO_LIST+1)) {
if (DEBUG) Log.d(TAG, "Done with UI, hit item limit!");
break;
}
}
}
-
- private void load() {
- try {
- mLastDuration = mDuration;
- mMemState = mProcessStats.getCurrentMemoryState();
- ParcelFileDescriptor pfd = mProcessStats.getStatsOverTime(mDuration);
- mStats = new ProcessStats(false);
- InputStream is = new ParcelFileDescriptor.AutoCloseInputStream(pfd);
- mStats.read(is);
- try {
- is.close();
- } catch (IOException e) {
- }
- if (mStats.mReadError != null) {
- Log.w(TAG, "Failure reading process stats: " + mStats.mReadError);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "RemoteException:", e);
- }
- }
}
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java
index c3e7724..e70c405 100644
--- a/src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollEnrolling.java
@@ -42,7 +42,10 @@
/**
* Activity which handles the actual enrolling for fingerprint.
*/
-public class FingerprintEnrollEnrolling extends FingerprintEnrollBase {
+public class FingerprintEnrollEnrolling extends FingerprintEnrollBase
+ implements FingerprintEnrollSidecar.Listener {
+
+ private static final String TAG_SIDECAR = "sidecar";
private static final int PROGRESS_BAR_MAX = 10000;
private static final int FINISH_DELAY = 250;
@@ -53,10 +56,6 @@
*/
private static final int ICON_TOUCH_COUNT_SHOW_UNTIL_DIALOG_SHOWN = 3;
- private PowerManager mPowerManager;
- private CancellationSignal mEnrollmentCancel = new CancellationSignal();
- private int mEnrollmentSteps;
- private boolean mEnrolling;
private ProgressBar mProgressBar;
private ImageView mFingerprintAnimator;
private ObjectAnimator mProgressAnim;
@@ -65,13 +64,13 @@
private TextView mErrorText;
private Interpolator mFastOutSlowInInterpolator;
private int mIconTouchCount;
+ private FingerprintEnrollSidecar mSidecar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fingerprint_enroll_enrolling);
setHeaderText(R.string.security_settings_fingerprint_enroll_start_title);
- mPowerManager = getSystemService(PowerManager.class);
mStartMessage = (TextView) findViewById(R.id.start_message);
mRepeatMessage = (TextView) findViewById(R.id.repeat_message);
mErrorText = (TextView) findViewById(R.id.error_text);
@@ -92,31 +91,32 @@
return true;
}
});
- startEnrollment();
}
@Override
- protected void onDestroy() {
- super.onDestroy();
- cancelEnrollment();
- }
-
- private void startEnrollment() {
- mEnrollmentSteps = -1;
- getSystemService(FingerprintManager.class).enroll(mToken, mEnrollmentCancel,
- mEnrollmentCallback, 0);
- mProgressBar.setProgress(0);
- mEnrolling = true;
- }
-
- private void cancelEnrollment() {
- if (mEnrolling) {
- mEnrollmentCancel.cancel();
- mEnrolling = false;
+ protected void onStart() {
+ super.onStart();
+ mSidecar = (FingerprintEnrollSidecar) getFragmentManager().findFragmentByTag(TAG_SIDECAR);
+ if (mSidecar == null) {
+ mSidecar = new FingerprintEnrollSidecar();
+ getFragmentManager().beginTransaction().add(mSidecar, TAG_SIDECAR).commit();
+ }
+ mSidecar.setListener(this);
+ if (mSidecar.isDone()) {
+ launchFinish(mToken);
+ } else {
+ updateProgress(false /* animate */);
+ updateDescription();
}
}
- private void updateProgress(int progress) {
+ @Override
+ protected void onStop() {
+ super.onStop();
+ mSidecar.setListener(null);
+ }
+
+ private void animateProgress(int progress) {
if (mProgressAnim != null) {
mProgressAnim.cancel();
}
@@ -139,7 +139,7 @@
}
private void updateDescription() {
- if (mEnrollmentSteps == -1) {
+ if (mSidecar.getEnrollmentSteps() == -1) {
setHeaderText(R.string.security_settings_fingerprint_enroll_start_title);
mStartMessage.setVisibility(View.VISIBLE);
mRepeatMessage.setVisibility(View.INVISIBLE);
@@ -150,6 +150,42 @@
}
}
+
+ @Override
+ public void onEnrollmentHelp(CharSequence helpString) {
+ mErrorText.setText(helpString);
+ }
+
+ @Override
+ public void onEnrollmentError(CharSequence errString) {
+ mErrorText.setText(errString);
+ }
+
+ @Override
+ public void onEnrollmentProgressChange(int steps, int remaining) {
+ updateProgress(true /* animate */);
+ updateDescription();
+ mErrorText.setText("");
+ }
+
+ private void updateProgress(boolean animate) {
+ int progress = getProgress(
+ mSidecar.getEnrollmentSteps(), mSidecar.getEnrollmentRemaining());
+ if (animate) {
+ animateProgress(progress);
+ } else {
+ mProgressBar.setProgress(progress);
+ }
+ }
+
+ private int getProgress(int steps, int remaining) {
+ if (steps == -1) {
+ return 0;
+ }
+ int progress = Math.max(0, steps + 1 - remaining);
+ return PROGRESS_BAR_MAX * progress / (steps + 1);
+ }
+
private void showIconTouchDialog() {
new IconTouchDialog().show(getFragmentManager(), null /* tag */);
}
@@ -174,38 +210,6 @@
public void onAnimationCancel(Animator animation) { }
};
- private FingerprintManager.EnrollmentCallback mEnrollmentCallback
- = new FingerprintManager.EnrollmentCallback() {
-
- @Override
- public void onEnrollmentProgress(int remaining) {
- if (mEnrollmentSteps == -1) {
- mEnrollmentSteps = remaining;
- updateDescription();
- }
- if (remaining >= 0) {
- int progress = Math.max(0, mEnrollmentSteps + 1 - remaining);
- updateProgress(PROGRESS_BAR_MAX * progress / (mEnrollmentSteps + 1));
-
- // Treat fingerprint like a touch event
- mPowerManager.userActivity(SystemClock.uptimeMillis(),
- PowerManager.USER_ACTIVITY_EVENT_OTHER,
- PowerManager.USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS);
- }
- mErrorText.setText("");
- }
-
- @Override
- public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) {
- mErrorText.setText(helpString);
- }
-
- @Override
- public void onEnrollmentError(int errMsgId, CharSequence errString) {
- mErrorText.setText(errString);
- }
- };
-
// Give the user a chance to see progress completed before jumping to the next stage.
Runnable mDelayedFinishRunnable = new Runnable() {
@Override
diff --git a/src/com/android/settings/fingerprint/FingerprintEnrollSidecar.java b/src/com/android/settings/fingerprint/FingerprintEnrollSidecar.java
new file mode 100644
index 0000000..2daffde
--- /dev/null
+++ b/src/com/android/settings/fingerprint/FingerprintEnrollSidecar.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2015 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
+ */
+
+package com.android.settings.fingerprint;
+
+import android.annotation.Nullable;
+import android.app.Activity;
+import android.app.Fragment;
+import android.hardware.fingerprint.FingerprintManager;
+import android.os.Bundle;
+import android.os.CancellationSignal;
+import android.os.Handler;
+import android.os.PowerManager;
+import android.os.SystemClock;
+
+import com.android.settings.ChooseLockSettingsHelper;
+
+/**
+ * Sidecar fragment to handle the state around fingerprint enrollment.
+ */
+public class FingerprintEnrollSidecar extends Fragment {
+
+ private int mEnrollmentSteps = -1;
+ private int mEnrollmentRemaining = 0;
+ private Listener mListener;
+ private PowerManager mPowerManager;
+ private boolean mEnrolling;
+ private CancellationSignal mEnrollmentCancel;
+ private Handler mHandler = new Handler();
+ private byte[] mToken;
+ private boolean mDone;
+
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setRetainInstance(true);
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ mPowerManager = activity.getSystemService(PowerManager.class);
+ mToken = activity.getIntent().getByteArrayExtra(
+ ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE_TOKEN);
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ if (!mEnrolling) {
+ startEnrollment();
+ }
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ if (!getActivity().isChangingConfigurations()) {
+ cancelEnrollment();
+ }
+ }
+
+ private void startEnrollment() {
+ mHandler.removeCallbacks(mTimeoutRunnable);
+ mEnrollmentSteps = -1;
+ mEnrollmentCancel = new CancellationSignal();
+ getActivity().getSystemService(FingerprintManager.class).enroll(mToken, mEnrollmentCancel,
+ mEnrollmentCallback, 0);
+ mEnrolling = true;
+ }
+
+ private void cancelEnrollment() {
+ mHandler.removeCallbacks(mTimeoutRunnable);
+ if (mEnrolling) {
+ mEnrollmentCancel.cancel();
+ mEnrolling = false;
+ mEnrollmentSteps = -1;
+ }
+ }
+
+ public void setListener(Listener listener) {
+ mListener = listener;
+ }
+
+ public int getEnrollmentSteps() {
+ return mEnrollmentSteps;
+ }
+
+ public int getEnrollmentRemaining() {
+ return mEnrollmentRemaining;
+ }
+
+ public boolean isDone() {
+ return mDone;
+ }
+
+ private FingerprintManager.EnrollmentCallback mEnrollmentCallback
+ = new FingerprintManager.EnrollmentCallback() {
+
+ @Override
+ public void onEnrollmentProgress(int remaining) {
+ if (mEnrollmentSteps == -1) {
+ mEnrollmentSteps = remaining;
+ }
+ mEnrollmentRemaining = remaining;
+ mDone = remaining == 0;
+ if (mListener != null) {
+ mListener.onEnrollmentProgressChange(mEnrollmentSteps, remaining);
+ }
+
+ // Treat fingerprint like a touch event
+ mPowerManager.userActivity(SystemClock.uptimeMillis(),
+ PowerManager.USER_ACTIVITY_EVENT_OTHER,
+ PowerManager.USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS);
+ }
+
+ @Override
+ public void onEnrollmentHelp(int helpMsgId, CharSequence helpString) {
+ if (mListener != null) {
+ mListener.onEnrollmentHelp(helpString);
+ }
+ }
+
+ @Override
+ public void onEnrollmentError(int errMsgId, CharSequence errString) {
+ if (mListener != null) {
+ mListener.onEnrollmentError(errString);
+ }
+ }
+ };
+
+ private final Runnable mTimeoutRunnable = new Runnable() {
+ @Override
+ public void run() {
+ cancelEnrollment();
+ }
+ };
+
+ public interface Listener {
+ void onEnrollmentHelp(CharSequence helpString);
+ void onEnrollmentError(CharSequence errString);
+ void onEnrollmentProgressChange(int steps, int remaining);
+ }
+}
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index c360a54..80a56bd 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -33,7 +33,6 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.content.res.TypedArray;
-import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
@@ -623,13 +622,12 @@
final Collection<AccessPoint> accessPoints =
mWifiTracker.getAccessPoints();
getPreferenceScreen().removeAll();
- if (accessPoints.size() == 0) {
- addMessagePreference(R.string.wifi_empty_list_wifi_on);
- }
+ boolean hasAvailableAccessPoints = false;
for (AccessPoint accessPoint : accessPoints) {
// Ignore access points that are out of range.
if (accessPoint.getLevel() != -1) {
+ hasAvailableAccessPoints = true;
AccessPointPreference preference = new AccessPointPreference(accessPoint,
getActivity());
@@ -637,18 +635,27 @@
accessPoint.setListener(this);
}
}
+ if (!hasAvailableAccessPoints) {
+ setProgressBarVisible(true);
+ addMessagePreference(R.string.wifi_empty_list_wifi_on);
+ } else {
+ setProgressBarVisible(false);
+ }
break;
case WifiManager.WIFI_STATE_ENABLING:
getPreferenceScreen().removeAll();
+ setProgressBarVisible(true);
break;
case WifiManager.WIFI_STATE_DISABLING:
addMessagePreference(R.string.wifi_stopping);
+ setProgressBarVisible(true);
break;
case WifiManager.WIFI_STATE_DISABLED:
setOffMessage();
+ setProgressBarVisible(false);
break;
}
// Update "Saved Networks" menu option.
@@ -703,6 +710,10 @@
getPreferenceScreen().removeAll();
}
+ protected void setProgressBarVisible(boolean visible) {
+ // TODO: show a progress bar when scan is in progress.
+ }
+
@Override
public void onWifiStateChanged(int state) {
Activity activity = getActivity();
@@ -713,10 +724,12 @@
switch (state) {
case WifiManager.WIFI_STATE_ENABLING:
addMessagePreference(R.string.wifi_starting);
+ setProgressBarVisible(true);
break;
case WifiManager.WIFI_STATE_DISABLED:
setOffMessage();
+ setProgressBarVisible(false);
break;
}
}
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java
index ba78794..0c8ee60 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizard.java
@@ -43,6 +43,7 @@
private static final String TAG = "WifiSettingsForSetupWizard";
+ private SetupWizardListLayout mLayout;
private View mAddOtherNetworkItem;
private TextView mEmptyFooter;
private boolean mListLastEmpty = false;
@@ -50,9 +51,9 @@
@Override
public View onCreateView(final LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- final SetupWizardListLayout layout = (SetupWizardListLayout) inflater.inflate(
- R.layout.setup_wifi_layout, container, false);
- final ListView list = layout.getListView();
+ mLayout = (SetupWizardListLayout)
+ inflater.inflate(R.layout.setup_wifi_layout, container, false);
+ final ListView list = mLayout.getListView();
mAddOtherNetworkItem = inflater.inflate(R.layout.setup_wifi_add_network, list, false);
list.addFooterView(mAddOtherNetworkItem, null, true);
@@ -65,13 +66,13 @@
}
});
- final NavigationBar navigationBar = layout.getNavigationBar();
+ final NavigationBar navigationBar = mLayout.getNavigationBar();
if (navigationBar != null) {
WifiSetupActivity activity = (WifiSetupActivity) getActivity();
activity.onNavigationBarCreated(navigationBar);
}
- return layout;
+ return mLayout;
}
@Override
@@ -146,4 +147,15 @@
mListLastEmpty = isEmpty;
}
}
+
+ @Override
+ protected void setProgressBarVisible(boolean visible) {
+ if (mLayout != null) {
+ if (visible) {
+ mLayout.showProgressBar();
+ } else {
+ mLayout.hideProgressBar();
+ }
+ }
+ }
}