Merge "Minor changes in Settings"
This commit is contained in:
committed by
Android (Google) Code Review
commit
083dd99de5
@@ -2552,7 +2552,7 @@ found in the list of installed applications.</string>
|
|||||||
<string name="builtin_keyboard_settings_summary">Physical keyboard settings</string>
|
<string name="builtin_keyboard_settings_summary">Physical keyboard settings</string>
|
||||||
|
|
||||||
<!-- Development Settings. the title for the item to take the user to Development settings. Development settings are settings meant for application developers. -->
|
<!-- Development Settings. the title for the item to take the user to Development settings. Development settings are settings meant for application developers. -->
|
||||||
<string name="development_settings_title">Development</string>
|
<string name="development_settings_title">Developer options</string>
|
||||||
<!-- Development Settings summary. The summary of the item to take the user to Development settings. Development settings are settings meant for application developers. -->
|
<!-- Development Settings summary. The summary of the item to take the user to Development settings. Development settings are settings meant for application developers. -->
|
||||||
<string name="development_settings_summary">Set options for application development</string>
|
<string name="development_settings_summary">Set options for application development</string>
|
||||||
<!-- Setting checkbox title for Whether to enable USB debugging support on the phone. -->
|
<!-- Setting checkbox title for Whether to enable USB debugging support on the phone. -->
|
||||||
|
@@ -33,13 +33,6 @@
|
|||||||
android:targetClass="com.android.settings.deviceinfo.Status" />
|
android:targetClass="com.android.settings.deviceinfo.Status" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<PreferenceScreen
|
|
||||||
android:key="power_usage"
|
|
||||||
android:fragment="com.android.settings.fuelgauge.PowerUsageSummary"
|
|
||||||
android:title="@string/power_usage_summary_title"
|
|
||||||
android:summary="@string/power_usage_summary">
|
|
||||||
</PreferenceScreen>
|
|
||||||
|
|
||||||
<!-- Legal Information -->
|
<!-- Legal Information -->
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="container"
|
android:key="container"
|
||||||
|
@@ -40,7 +40,7 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
||||||
|
|
||||||
private static final String TAG = "DeviceInfoSettings";
|
private static final String LOG_TAG = "DeviceInfoSettings";
|
||||||
|
|
||||||
private static final String KEY_CONTAINER = "container";
|
private static final String KEY_CONTAINER = "container";
|
||||||
private static final String KEY_TEAM = "team";
|
private static final String KEY_TEAM = "team";
|
||||||
@@ -128,6 +128,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
try {
|
try {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.e(LOG_TAG, "Unable to start activity " + intent.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,7 +143,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
try {
|
try {
|
||||||
preferenceGroup.removePreference(findPreference(preference));
|
preferenceGroup.removePreference(findPreference(preference));
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
Log.d(TAG, "Property '" + property + "' missing and no '"
|
Log.d(LOG_TAG, "Property '" + property + "' missing and no '"
|
||||||
+ preference + "' preference");
|
+ preference + "' preference");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,7 +164,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
SystemProperties.get(property,
|
SystemProperties.get(property,
|
||||||
getResources().getString(R.string.device_info_default)));
|
getResources().getString(R.string.device_info_default)));
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
|
// No recovery
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,10 +193,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
Matcher m = p.matcher(procVersionStr);
|
Matcher m = p.matcher(procVersionStr);
|
||||||
|
|
||||||
if (!m.matches()) {
|
if (!m.matches()) {
|
||||||
Log.e(TAG, "Regex did not match on /proc/version: " + procVersionStr);
|
Log.e(LOG_TAG, "Regex did not match on /proc/version: " + procVersionStr);
|
||||||
return "Unavailable";
|
return "Unavailable";
|
||||||
} else if (m.groupCount() < 4) {
|
} else if (m.groupCount() < 4) {
|
||||||
Log.e(TAG, "Regex match on /proc/version only returned " + m.groupCount()
|
Log.e(LOG_TAG, "Regex match on /proc/version only returned " + m.groupCount()
|
||||||
+ " groups");
|
+ " groups");
|
||||||
return "Unavailable";
|
return "Unavailable";
|
||||||
} else {
|
} else {
|
||||||
@@ -204,7 +205,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment {
|
|||||||
.append(m.group(4))).toString();
|
.append(m.group(4))).toString();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(TAG,
|
Log.e(LOG_TAG,
|
||||||
"IO Exception when getting kernel version for Device Info screen",
|
"IO Exception when getting kernel version for Device Info screen",
|
||||||
e);
|
e);
|
||||||
|
|
||||||
|
@@ -211,7 +211,9 @@ public class Settings extends PreferenceActivity implements ButtonBarHandler {
|
|||||||
public Intent getIntent() {
|
public Intent getIntent() {
|
||||||
Intent superIntent = super.getIntent();
|
Intent superIntent = super.getIntent();
|
||||||
String startingFragment = getStartingFragmentClass(superIntent);
|
String startingFragment = getStartingFragmentClass(superIntent);
|
||||||
if (startingFragment != null && !isMultiPane()) {
|
// This is called from super.onCreate, isMultiPane() is not yet reliable
|
||||||
|
// Do not use onIsHidingHeaders either, which relies itself on this method
|
||||||
|
if (startingFragment != null && !onIsMultiPane()) {
|
||||||
Intent modIntent = new Intent(superIntent);
|
Intent modIntent = new Intent(superIntent);
|
||||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, startingFragment);
|
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, startingFragment);
|
||||||
Bundle args = superIntent.getExtras();
|
Bundle args = superIntent.getExtras();
|
||||||
|
Reference in New Issue
Block a user