• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

Revisionc2b9a8bd43febe86fa026667dbaf8d3a7ee422ee (tree)
Time2016-10-13 01:48:55
AuthorJaap Jan Meijer <jjmeijer88@gmai...>
CommiterJaap Jan Meijer

Log Message

Merge remote-tracking branch 'cm/cm-14.0' into cm-14.0-x86

Change Summary

Incremental Difference

--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -81,7 +81,10 @@
8181 <uses-permission android:name="android.permission.CHANGE_APP_IDLE_STATE" />
8282 <uses-permission android:name="android.permission.PEERS_MAC_ADDRESS"/>
8383 <uses-permission android:name="android.permission.MANAGE_NOTIFICATIONS"/>
84+
8485 <uses-permission android:name="cyanogenmod.permission.PROTECTED_APP" />
86+ <uses-permission android:name="cyanogenmod.permission.WRITE_SETTINGS" />
87+ <uses-permission android:name="cyanogenmod.permission.MANAGE_PARTS" />
8588
8689 <application android:label="@string/settings_label"
8790 android:icon="@mipmap/ic_launcher_settings"
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -3146,6 +3146,4 @@
31463146 <string name="profiles_settings_title">情景模式</string>
31473147
31483148 <string name="mbn_version">MBN 版本</string>
3149- <string name="show_battery_percentage">显示电池电量百分比</string>
3150- <string name="show_battery_percentage_summary">在状态栏中显示电池电量百分比</string>
31513149 </resources>
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -283,4 +283,7 @@
283283 <string name="pa_login_incorrect_login">Login was incorrect</string>
284284 <string name="pa_pattern_or_fingerprint_header">Must draw pattern or use fingerprint to unlock</string>
285285
286+ <!-- title for lock screen weather preference -->
287+ <string name="lockscreen_weather_enabled_title">Show weather</string>
288+
286289 </resources>
--- a/res/values/customize.xml
+++ b/res/values/customize.xml
@@ -33,7 +33,4 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
3434 <!-- Whether to show_kernel version name -->
3535 <bool name="def_hide_kernel_version_name">false</bool>
36- <!-- Whether to show a preference item for battery percentage
37- in ("Battery") for India RJIL -->
38- <bool name="config_show_battery_percentage">false</bool>
3936 </resources>
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7603,7 +7603,4 @@
76037603 <string name="lte_data_service_enabled">LTE data service enabled </string>
76047604 <string name="turn_off_wifi_dialog_title">Turn off Wi-Fi</string>
76057605 <string name="turn_off_wifi_dialog_text">Wi-Fi is turned off when Mobile HotSpot is active. To turn on Wi-Fi, please turn off Mobile HotSpot.</string>
7606- <string name="show_battery_percentage">Show battery percentage</string>
7607- <string name="show_battery_percentage_summary">Show battery level percentage inside the status bar</string>
7608-
76097606 </resources>
--- a/res/xml/advanced_apps.xml
+++ b/res/xml/advanced_apps.xml
@@ -67,6 +67,10 @@
6767 android:title="@string/sms_application_title"
6868 settings:keywords="@string/keywords_more_default_sms_app" />
6969
70+ <!-- Weather providers -->
71+ <org.cyanogenmod.internal.cmparts.CMPartsPreference
72+ android:key="weather_settings" />
73+
7074 </PreferenceCategory>
7175
7276 <com.android.settings.WorkOnlyCategory
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -75,11 +75,6 @@
7575 android:title="@string/camera_gesture_title"
7676 android:summary="@string/camera_gesture_desc" />
7777
78- <SwitchPreference
79- android:key="camera_double_tap_power_gesture"
80- android:title="@string/camera_double_tap_power_gesture_title"
81- android:summary="@string/camera_double_tap_power_gesture_desc" />
82-
8378 <PreferenceScreen
8479 android:key="screensaver"
8580 android:title="@string/screensaver_settings_title"
--- a/res/xml/power_usage_summary.xml
+++ b/res/xml/power_usage_summary.xml
@@ -23,12 +23,6 @@
2323 android:title="@string/battery_saver"
2424 android:fragment="com.android.settings.fuelgauge.BatterySaverSettings" />
2525
26- <SwitchPreference
27- android:key="battery_pct"
28- android:title="@string/show_battery_percentage"
29- android:summary="@string/show_battery_percentage_summary"
30- android:persistent="false" />
31-
3226 <com.android.settings.fuelgauge.BatteryHistoryPreference
3327 android:key="battery_history" />
3428
--- a/res/xml/security_settings_password_sub.xml
+++ b/res/xml/security_settings_password_sub.xml
@@ -47,4 +47,9 @@
4747 android:title="@string/lockscreen_visualizer_title"
4848 android:defaultValue="true"/>
4949
50+ <cyanogenmod.preference.CMSecureSettingSwitchPreference
51+ android:key="lock_screen_weather_enabled"
52+ android:title="@string/lockscreen_weather_enabled_title"
53+ android:defaultValue="false"/>
54+
5055 </PreferenceScreen>
--- a/res/xml/security_settings_pattern_sub.xml
+++ b/res/xml/security_settings_pattern_sub.xml
@@ -51,4 +51,9 @@
5151 android:title="@string/lockscreen_visualizer_title"
5252 android:defaultValue="true"/>
5353
54+ <cyanogenmod.preference.CMSecureSettingSwitchPreference
55+ android:key="lock_screen_weather_enabled"
56+ android:title="@string/lockscreen_weather_enabled_title"
57+ android:defaultValue="false"/>
58+
5459 </PreferenceScreen>
--- a/res/xml/security_settings_pin_sub.xml
+++ b/res/xml/security_settings_pin_sub.xml
@@ -52,4 +52,9 @@
5252 android:title="@string/lockscreen_visualizer_title"
5353 android:defaultValue="true"/>
5454
55+ <cyanogenmod.preference.CMSecureSettingSwitchPreference
56+ android:key="lock_screen_weather_enabled"
57+ android:title="@string/lockscreen_weather_enabled_title"
58+ android:defaultValue="false"/>
59+
5560 </PreferenceScreen>
--- a/res/xml/security_settings_slide_sub.xml
+++ b/res/xml/security_settings_slide_sub.xml
@@ -36,4 +36,9 @@
3636 android:title="@string/lockscreen_visualizer_title"
3737 android:defaultValue="true"/>
3838
39+ <cyanogenmod.preference.CMSecureSettingSwitchPreference
40+ android:key="lock_screen_weather_enabled"
41+ android:title="@string/lockscreen_weather_enabled_title"
42+ android:defaultValue="false"/>
43+
3944 </PreferenceScreen>
--- a/src/com/android/settings/applications/AppOpsDetails.java
+++ b/src/com/android/settings/applications/AppOpsDetails.java
@@ -102,7 +102,7 @@ public class AppOpsDetails extends InstrumentedFragment {
102102 CharSequence label = mPm.getApplicationLabel(pkgInfo.applicationInfo);
103103 Drawable icon = mPm.getApplicationIcon(pkgInfo.applicationInfo);
104104 InstalledAppDetails.setupAppSnippet(appSnippet, label, icon,
105- pkgInfo != null ? pkgInfo.versionName : null);
105+ pkgInfo != null ? pkgInfo.versionName : null, null);
106106 }
107107
108108 private String retrieveAppEntry() {
--- a/src/com/android/settings/applications/InstalledAppDetails.java
+++ b/src/com/android/settings/applications/InstalledAppDetails.java
@@ -475,7 +475,8 @@ public class InstalledAppDetails extends AppInfoBase
475475 uninstallUpdatesItem, mAppsControlDisallowedAdmin);
476476 }
477477
478- menu.findItem(OPEN_PROTECTED_APPS).setVisible(mPackageInfo.applicationInfo.protect);
478+ menu.findItem(OPEN_PROTECTED_APPS).setVisible(mPackageInfo != null &&
479+ mPackageInfo.applicationInfo != null && mPackageInfo.applicationInfo.protect);
479480 }
480481
481482 @Override
@@ -553,7 +554,7 @@ public class InstalledAppDetails extends AppInfoBase
553554 final View appSnippet = mHeader.findViewById(R.id.app_snippet);
554555 mState.ensureIcon(mAppEntry);
555556 setupAppSnippet(appSnippet, mAppEntry.label, mAppEntry.icon,
556- pkgInfo != null ? pkgInfo.versionName : null);
557+ pkgInfo != null ? pkgInfo.versionName : null, pkgInfo.packageName);
557558 }
558559
559560 private boolean signaturesMatch(String pkg1, String pkg2) {
@@ -1042,7 +1043,7 @@ public class InstalledAppDetails extends AppInfoBase
10421043 }
10431044
10441045 public static void setupAppSnippet(View appSnippet, CharSequence label, Drawable icon,
1045- CharSequence versionName) {
1046+ CharSequence versionName, String packageName) {
10461047 LayoutInflater.from(appSnippet.getContext()).inflate(R.layout.widget_text_views,
10471048 (ViewGroup) appSnippet.findViewById(android.R.id.widget_frame));
10481049
@@ -1054,6 +1055,12 @@ public class InstalledAppDetails extends AppInfoBase
10541055 // Version number of application
10551056 TextView appVersion = (TextView) appSnippet.findViewById(R.id.widget_text1);
10561057
1058+ if (packageName != null) {
1059+ TextView appPackage = (TextView) appSnippet.findViewById(R.id.widget_text2);
1060+ appPackage.setText(packageName);
1061+ appPackage.setSelected(true);
1062+ }
1063+
10571064 if (!TextUtils.isEmpty(versionName)) {
10581065 appVersion.setSelected(true);
10591066 appVersion.setVisibility(View.VISIBLE);
--- a/src/com/android/settings/fuelgauge/PowerUsageSummary.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageSummary.java
@@ -28,8 +28,6 @@ import android.os.Process;
2828 import android.os.UserHandle;
2929 import android.support.v7.preference.Preference;
3030 import android.support.v7.preference.PreferenceGroup;
31-import android.support.v14.preference.SwitchPreference;
32-import android.provider.Settings;
3331 import android.text.TextUtils;
3432 import android.util.SparseArray;
3533 import android.util.TypedValue;
@@ -58,7 +56,6 @@ import java.util.List;
5856 */
5957 public class PowerUsageSummary extends PowerUsageBase {
6058
61- public static final String SHOW_PERCENT_SETTING = "status_bar_show_battery_percent";
6259 private static final boolean DEBUG = false;
6360
6461 private static final boolean USE_FAKE_DATA = false;
@@ -67,7 +64,6 @@ public class PowerUsageSummary extends PowerUsageBase {
6764
6865 private static final String KEY_APP_LIST = "app_list";
6966 private static final String KEY_BATTERY_HISTORY = "battery_history";
70- private static final String KEY_BATTERY_PCT = "battery_pct";
7167
7268 private static final int MENU_STATS_TYPE = Menu.FIRST;
7369 private static final int MENU_HIGH_POWER_APPS = Menu.FIRST + 3;
@@ -75,10 +71,8 @@ public class PowerUsageSummary extends PowerUsageBase {
7571
7672 private BatteryHistoryPreference mHistPref;
7773 private PreferenceGroup mAppListGroup;
78- private SwitchPreference mBatteryPct;
7974
8075 private int mStatsType = BatteryStats.STATS_SINCE_CHARGED;
81- private boolean isShowBatteryPct;
8276
8377 private static final int MIN_POWER_THRESHOLD_MILLI_AMP = 5;
8478 private static final int MAX_ITEMS_TO_LIST = USE_FAKE_DATA ? 30 : 10;
@@ -93,11 +87,6 @@ public class PowerUsageSummary extends PowerUsageBase {
9387 addPreferencesFromResource(R.xml.power_usage_summary);
9488 mHistPref = (BatteryHistoryPreference) findPreference(KEY_BATTERY_HISTORY);
9589 mAppListGroup = (PreferenceGroup) findPreference(KEY_APP_LIST);
96- mBatteryPct = (SwitchPreference) findPreference(KEY_BATTERY_PCT);
97- isShowBatteryPct = getResources().getBoolean(R.bool.config_show_battery_percentage);
98- if (!isShowBatteryPct) {
99- getPreferenceScreen().removePreference(mBatteryPct);
100- }
10190 }
10291
10392 @Override
@@ -108,9 +97,6 @@ public class PowerUsageSummary extends PowerUsageBase {
10897 @Override
10998 public void onResume() {
11099 super.onResume();
111- if (isShowBatteryPct) {
112- updateBatteryPct();
113- }
114100 refreshStats();
115101 }
116102
@@ -493,24 +479,4 @@ public class PowerUsageSummary extends PowerUsageBase {
493479 return new SummaryProvider(activity, summaryLoader);
494480 }
495481 };
496-
497- private void updateBatteryPct() {
498- if (mBatteryPct != null) {
499- mBatteryPct.setChecked(
500- Settings.System.getInt(getContext().getContentResolver(),
501- SHOW_PERCENT_SETTING, 0) != 0);
502- mBatteryPct.setOnPreferenceChangeListener(mBatteryPctChange);
503- }
504- }
505-
506- private final Preference.OnPreferenceChangeListener mBatteryPctChange =
507- new Preference.OnPreferenceChangeListener() {
508- @Override
509- public boolean onPreferenceChange(Preference preference, Object newValue) {
510- final boolean v = (Boolean) newValue;
511- Settings.System.putInt(getContext().getContentResolver(),
512- SHOW_PERCENT_SETTING, v ? 1 : 0);
513- return true;
514- }
515- };
516482 }
--- a/src/com/android/settings/search/Index.java
+++ b/src/com/android/settings/search/Index.java
@@ -161,6 +161,7 @@ public class Index {
161161 private static final String NODE_NAME_PREFERENCE_SCREEN = "PreferenceScreen";
162162 private static final String NODE_NAME_CHECK_BOX_PREFERENCE = "CheckBoxPreference";
163163 private static final String NODE_NAME_LIST_PREFERENCE = "ListPreference";
164+ private static final String NODE_NAME_SWITCH_PREFERENCE = "SwitchPreference";
164165
165166 private static final List<String> EMPTY_LIST = Collections.<String>emptyList();
166167
@@ -900,7 +901,8 @@ public class Index {
900901 title = getDataTitle(context, attrs);
901902 keywords = getDataKeywords(context, attrs);
902903
903- if (!nodeName.equals(NODE_NAME_CHECK_BOX_PREFERENCE)) {
904+ if (!nodeName.endsWith(NODE_NAME_CHECK_BOX_PREFERENCE) &&
905+ !nodeName.endsWith(NODE_NAME_SWITCH_PREFERENCE)) {
904906 summary = getDataSummary(context, attrs);
905907
906908 String entries = null;