UI fixes (back arrow, blue switch bar, append whether Talkback is on to
summary), Talkback no longer disabled when preference is tapped, fixes
SettingsPreferenceFragment to not check parent class to determine whether to
show options menu.
Change-Id: I3345e1a878f51b4387ca1bfe89855339617a94d6
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index d2ce285..66d45de 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -52,6 +52,12 @@
public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceFragment
implements DialogCreatable {
+ /**
+ * The Help Uri Resource key. This can be passed as an extra argument when creating the
+ * Fragment.
+ **/
+ public static final String HELP_URI_RESOURCE_KEY = "help_uri_resource";
+
private static final String TAG = "SettingsPreference";
private static final int DELAY_HIGHLIGHT_DURATION_MILLIS = 600;
@@ -101,7 +107,13 @@
}
// Prepare help url and enable menu if necessary
- int helpResource = getHelpResource();
+ Bundle arguments = getArguments();
+ int helpResource;
+ if (arguments != null && arguments.containsKey(HELP_URI_RESOURCE_KEY)) {
+ helpResource = arguments.getInt(HELP_URI_RESOURCE_KEY);
+ } else {
+ helpResource = getHelpResource();
+ }
if (helpResource != 0) {
mHelpUri = getResources().getString(helpResource);
}