mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-19 00:10:20 +00:00
Removed unused strings, added string res descriptions and corrected some options labels
This commit is contained in:
parent
5a7e5cf506
commit
5b332fca2e
6 changed files with 50 additions and 111 deletions
|
@ -211,27 +211,7 @@ public final class KeyboardTheme implements Comparable<KeyboardTheme> {
|
|||
|
||||
public static KeyboardTheme getKeyboardTheme(final Context context) {
|
||||
final SharedPreferences prefs = DeviceProtectedUtils.getSharedPreferences(context);
|
||||
final KeyboardTheme[] availableThemeArray = getAvailableThemeArray(context);
|
||||
return getKeyboardTheme(prefs, Build.VERSION.SDK_INT, availableThemeArray);
|
||||
}
|
||||
|
||||
/* package private for testing */
|
||||
static KeyboardTheme[] getAvailableThemeArray(final Context context) {
|
||||
if (AVAILABLE_KEYBOARD_THEMES == null) {
|
||||
final int[] availableThemeIdStringArray = context.getResources().getIntArray(
|
||||
R.array.keyboard_theme_ids);
|
||||
final ArrayList<KeyboardTheme> availableThemeList = new ArrayList<>();
|
||||
for (final int id : availableThemeIdStringArray) {
|
||||
final KeyboardTheme theme = searchKeyboardThemeById(id, KEYBOARD_THEMES);
|
||||
if (theme != null) {
|
||||
availableThemeList.add(theme);
|
||||
}
|
||||
}
|
||||
AVAILABLE_KEYBOARD_THEMES = availableThemeList.toArray(
|
||||
new KeyboardTheme[availableThemeList.size()]);
|
||||
Arrays.sort(AVAILABLE_KEYBOARD_THEMES);
|
||||
}
|
||||
return AVAILABLE_KEYBOARD_THEMES;
|
||||
return getKeyboardTheme(prefs, Build.VERSION.SDK_INT, KEYBOARD_THEMES);
|
||||
}
|
||||
|
||||
/* package private for testing */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue