Commit 0d49e161 authored by Jonathan Dixon's avatar Jonathan Dixon
Browse files

Fix exception in Browser Settings

Bug 11302175

Need to implement isValidFragment when targeting >= KK

Change-Id: I19cc285aa237ffd9001558a9ee6adaf152acd1df
parent d6078da6
......@@ -25,7 +25,10 @@ import android.view.MenuItem;
import com.android.browser.preferences.BandwidthPreferencesFragment;
import com.android.browser.preferences.DebugPreferencesFragment;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class BrowserPreferencesPage extends PreferenceActivity {
......@@ -98,4 +101,16 @@ public class BrowserPreferencesPage extends PreferenceActivity {
return intent;
}
private static final Set<String> sKnownFragments = new HashSet<String>(Arrays.asList(
"com.android.browser.preferences.GeneralPreferencesFragment",
"com.android.browser.preferences.PrivacySecurityPreferencesFragment",
"com.android.browser.preferences.AccessibilityPreferencesFragment",
"com.android.browser.preferences.AdvancedPreferencesFragment",
"com.android.browser.preferences.BandwidthPreferencesFragment",
"com.android.browser.preferences.LabPreferencesFragment"));
@Override
protected boolean isValidFragment(String fragmentName) {
return sKnownFragments.contains(fragmentName);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment