Merge "Pull pref summaries from power usage summary" into nyc-dev
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 210ed5e..5f8ad59 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -7385,4 +7385,7 @@
<!-- Title of screen controlling which apps have access to send premium SMS messages [CHAR LIMIT=60] -->
<string name="premium_sms_access">Premium SMS access</string>
+ <!-- [CHAR LIMIT=25] Bluetooth is disabled. -->
+ <string name="bluetooth_disabled">Disabled</string>
+
</resources>
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index 7e8d2be..7415464 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -323,12 +323,6 @@
android:entries="@array/track_frame_time_entries"
android:entryValues="@array/track_frame_time_values" />
- <ListPreference
- android:key="enable_opengl_traces"
- android:title="@string/enable_opengl_traces_title"
- android:entries="@array/enable_opengl_traces_entries"
- android:entryValues="@array/enable_opengl_traces_values" />
-
</PreferenceCategory>
<PreferenceCategory android:key="debug_applications_category"
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index c9d07f6..1551bcf 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -186,8 +186,6 @@
private static final String INACTIVE_APPS_KEY = "inactive_apps";
- private static final String OPENGL_TRACES_KEY = "enable_opengl_traces";
-
private static final String IMMEDIATELY_DESTROY_ACTIVITIES_KEY
= "immediately_destroy_activities";
private static final String APP_PROCESS_LIMIT_KEY = "app_process_limit";
@@ -278,7 +276,6 @@
private ListPreference mTransitionAnimationScale;
private ListPreference mAnimatorDurationScale;
private ListPreference mOverlayDisplayDevices;
- private ListPreference mOpenGLTraces;
private SwitchPreference mWebViewMultiprocess;
private ListPreference mWebViewProvider;
@@ -432,7 +429,6 @@
mTransitionAnimationScale = addListPreference(TRANSITION_ANIMATION_SCALE_KEY);
mAnimatorDurationScale = addListPreference(ANIMATOR_DURATION_SCALE_KEY);
mOverlayDisplayDevices = addListPreference(OVERLAY_DISPLAY_DEVICES_KEY);
- mOpenGLTraces = addListPreference(OPENGL_TRACES_KEY);
mSimulateColorSpace = addListPreference(SIMULATE_COLOR_SPACE);
mUSBAudio = findAndInitSwitchPref(USB_AUDIO_KEY);
mForceResizable = findAndInitSwitchPref(FORCE_RESIZABLE_KEY);
@@ -680,7 +676,6 @@
updateDebugLayoutOptions();
updateAnimationScaleOptions();
updateOverlayDisplayDevicesOptions();
- updateOpenGLTracesOptions();
updateImmediatelyDestroyActivitiesOptions();
updateAppProcessLimitOptions();
updateShowAllANRsOptions();
@@ -1640,30 +1635,6 @@
updateOverlayDisplayDevicesOptions();
}
- private void updateOpenGLTracesOptions() {
- String value = SystemProperties.get(OPENGL_TRACES_PROPERTY);
- if (value == null) {
- value = "";
- }
-
- CharSequence[] values = mOpenGLTraces.getEntryValues();
- for (int i = 0; i < values.length; i++) {
- if (value.contentEquals(values[i])) {
- mOpenGLTraces.setValueIndex(i);
- mOpenGLTraces.setSummary(mOpenGLTraces.getEntries()[i]);
- return;
- }
- }
- mOpenGLTraces.setValueIndex(0);
- mOpenGLTraces.setSummary(mOpenGLTraces.getEntries()[0]);
- }
-
- private void writeOpenGLTracesOptions(Object newValue) {
- SystemProperties.set(OPENGL_TRACES_PROPERTY, newValue == null ? "" : newValue.toString());
- pokeSystemProperties();
- updateOpenGLTracesOptions();
- }
-
private void updateAppProcessLimitOptions() {
try {
int limit = ActivityManagerNative.getDefault().getProcessLimit();
@@ -1995,9 +1966,6 @@
} else if (preference == mOverlayDisplayDevices) {
writeOverlayDisplayDevicesOptions(newValue);
return true;
- } else if (preference == mOpenGLTraces) {
- writeOpenGLTracesOptions(newValue);
- return true;
} else if (preference == mTrackFrameTime) {
writeTrackFrameTimeOptions(newValue);
return true;
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index e565a61..cc46fba 100644
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -518,7 +518,7 @@
}
private CharSequence getSummary() {
- return mContext.getString(!mEnabled ? R.string.disabled
+ return mContext.getString(!mEnabled ? R.string.bluetooth_disabled
: mConnected ? R.string.bluetooth_connected
: R.string.bluetooth_disconnected);
}
diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java
index 277f59f..9774db9 100644
--- a/src/com/android/settings/deviceinfo/StorageSettings.java
+++ b/src/com/android/settings/deviceinfo/StorageSettings.java
@@ -478,6 +478,9 @@
continue;
}
final File path = info.getPath();
+ if (path == null) {
+ continue;
+ }
privateUsedBytes += path.getTotalSpace() - path.getFreeSpace();
privateTotalBytes += path.getTotalSpace();
}
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 17cc3b6..08e27ec 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -984,7 +984,7 @@
private CharSequence getSummary() {
if (!mWifiTracker.enabled) {
- return mContext.getString(R.string.disabled);
+ return mContext.getString(R.string.wifi_disabled_generic);
}
if (!mWifiTracker.connected) {
return mContext.getString(R.string.disconnected);