- // Set the visibility of the WebView theme preference.
- if (Build.VERSION.SDK_INT < 21) { // The device is running API 19.
- // Get a handle for the general category.
- PreferenceCategory generalCategory = findPreference("general");
-
- // Remove the incorrect lint warning below that the general preference category might be null.
- assert generalCategory != null;
-
- // Remove the WebView theme preference.
- generalCategory.removePreference(webViewThemePreference);
- } else { // The device is running API >= 21
- // Set the current theme as the summary text for the preference.
- webViewThemePreference.setSummary(webViewThemeEntriesStringArray[webViewThemeEntryNumber]);
- }
+ // Set the current theme as the summary text for the preference.
+ webViewThemePreference.setSummary(webViewThemeEntriesStringArray[webViewThemeEntryNumber]);