remove some unused / outdated resources

This commit is contained in:
Helium314 2023-09-16 22:18:31 +02:00
parent 9c272fd881
commit 14b3158289
16 changed files with 8 additions and 292 deletions

View file

@ -48,10 +48,10 @@ public final class GestureSettingsFragment extends SubScreenFragment {
final SharedPreferences prefs = getSharedPreferences(); final SharedPreferences prefs = getSharedPreferences();
final Resources res = getResources(); final Resources res = getResources();
setPreferenceVisible(Settings.PREF_GESTURE_PREVIEW_TRAIL, setPreferenceVisible(Settings.PREF_GESTURE_PREVIEW_TRAIL,
Settings.readGestureInputEnabled(prefs, res)); Settings.readGestureInputEnabled(prefs));
setPreferenceVisible(Settings.PREF_GESTURE_FLOATING_PREVIEW_TEXT, setPreferenceVisible(Settings.PREF_GESTURE_FLOATING_PREVIEW_TEXT,
Settings.readGestureInputEnabled(prefs, res)); Settings.readGestureInputEnabled(prefs));
setPreferenceVisible(Settings.PREF_GESTURE_SPACE_AWARE, setPreferenceVisible(Settings.PREF_GESTURE_SPACE_AWARE,
Settings.readGestureInputEnabled(prefs, res)); Settings.readGestureInputEnabled(prefs));
} }
} }

View file

@ -262,17 +262,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
res.getBoolean(R.bool.config_block_potentially_offensive)); res.getBoolean(R.bool.config_block_potentially_offensive));
} }
public static boolean readFromBuildConfigIfGestureInputEnabled(final Resources res) { public static boolean readGestureInputEnabled(final SharedPreferences prefs) {
if (!JniUtils.sHaveGestureLib) { return JniUtils.sHaveGestureLib && prefs.getBoolean(PREF_GESTURE_INPUT, true);
return false;
}
return res.getBoolean(R.bool.config_gesture_input_enabled_by_build_config);
}
public static boolean readGestureInputEnabled(final SharedPreferences prefs,
final Resources res) {
return readFromBuildConfigIfGestureInputEnabled(res)
&& prefs.getBoolean(PREF_GESTURE_INPUT, true);
} }
public static boolean readFromBuildConfigIfToShowKeyPreviewPopupOption(final Resources res) { public static boolean readFromBuildConfigIfToShowKeyPreviewPopupOption(final Resources res) {

View file

@ -188,7 +188,7 @@ public class SettingsValues {
Settings.PREF_ENABLE_EMOJI_ALT_PHYSICAL_KEY, true); Settings.PREF_ENABLE_EMOJI_ALT_PHYSICAL_KEY, true);
mShowAppIcon = Settings.readShowSetupWizardIcon(prefs, context); mShowAppIcon = Settings.readShowSetupWizardIcon(prefs, context);
mIsShowAppIconSettingInPreferences = prefs.contains(Settings.PREF_SHOW_SETUP_WIZARD_ICON); mIsShowAppIconSettingInPreferences = prefs.contains(Settings.PREF_SHOW_SETUP_WIZARD_ICON);
mGestureInputEnabled = Settings.readGestureInputEnabled(prefs, res); mGestureInputEnabled = Settings.readGestureInputEnabled(prefs);
mGestureTrailEnabled = prefs.getBoolean(Settings.PREF_GESTURE_PREVIEW_TRAIL, true); mGestureTrailEnabled = prefs.getBoolean(Settings.PREF_GESTURE_PREVIEW_TRAIL, true);
mCloudSyncEnabled = prefs.getBoolean(LocalSettingsConstants.PREF_ENABLE_CLOUD_SYNC, false); mCloudSyncEnabled = prefs.getBoolean(LocalSettingsConstants.PREF_ENABLE_CLOUD_SYNC, false);
mAccount = prefs.getString(LocalSettingsConstants.PREF_ACCOUNT_NAME, mAccount = prefs.getString(LocalSettingsConstants.PREF_ACCOUNT_NAME,

View file

@ -1,39 +0,0 @@
/*
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dslul.openboard.inputmethod.latin.utils;
import android.content.Context;
import org.dslul.openboard.inputmethod.latin.R;
/**
* Helper class to get the metadata URI and the additional ID.
*/
@SuppressWarnings("unused")
public class MetadataFileUriGetter {
private MetadataFileUriGetter() {
// This helper class is not instantiable.
}
public static String getMetadataUri(final Context context) {
return context.getString(R.string.dictionary_pack_metadata_uri);
}
public static String getMetadataAdditionalId(final Context context) {
return "";
}
}

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="altCodeKeyWhileTypingAnimAlpha"
android:valueType="intType"
android:duration="1000"
android:valueFrom="128"
android:valueTo="255" />

View file

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="altCodeKeyWhileTypingAnimAlpha"
android:valueType="intType"
android:duration="3000"
android:valueFrom="255"
android:valueTo="128" />

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Until KitKat (API 19), {@link android.widget.Spinner} of dialog mode in a Dialog can't
handle orientation change correctly. Using dropdown mode avoids the issue.
This file overrides values/spinner-style.xml on KitKat and up. -->
<style name="additionalSubtypeSpinnerStyle">
<item name="android:spinnerMode">dialog</item>
</style>
</resources>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources>
<!-- Whether phrase gestures are enabled by default -->
<bool name="config_default_phrase_gesture_enabled">false</bool>
</resources>

View file

@ -47,8 +47,6 @@
<integer name="config_longpress_timeout_step">10</integer> <integer name="config_longpress_timeout_step">10</integer>
<integer name="config_accessibility_long_press_key_timeout">3000</integer> <integer name="config_accessibility_long_press_key_timeout">3000</integer>
<integer name="config_max_more_keys_column">5</integer> <integer name="config_max_more_keys_column">5</integer>
<integer name="config_more_keys_keyboard_fadein_anim_time">0</integer>
<integer name="config_more_keys_keyboard_fadeout_anim_time">100</integer>
<!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 --> <!-- Long pressing shift will invoke caps-lock if > 0, never invoke caps-lock if == 0 -->
<integer name="config_longpress_shift_lock_timeout">1200</integer> <integer name="config_longpress_shift_lock_timeout">1200</integer>
@ -63,7 +61,7 @@
<dimen name="config_key_hysteresis_distance_for_sliding_modifier">8.0dp</dimen> <dimen name="config_key_hysteresis_distance_for_sliding_modifier">8.0dp</dimen>
<integer name="config_language_on_spacebar_final_alpha">128</integer> <integer name="config_language_on_spacebar_final_alpha">128</integer>
<dimen name="config_language_on_spacebar_horizontal_margin">1dp</dimen> <dimen name="config_language_on_spacebar_horizontal_margin">3dp</dimen>
<integer name="config_gesture_floating_preview_text_linger_timeout">200</integer> <integer name="config_gesture_floating_preview_text_linger_timeout">200</integer>
<integer name="config_gesture_trail_fadeout_start_delay">100</integer> <integer name="config_gesture_trail_fadeout_start_delay">100</integer>
@ -140,8 +138,4 @@
<dimen name="config_accessibility_edge_slop">8dp</dimen> <dimen name="config_accessibility_edge_slop">8dp</dimen>
<integer name="config_user_dictionary_max_word_length">48</integer> <integer name="config_user_dictionary_max_word_length">48</integer>
<!-- Personalization configuration -->
<!-- -1 means periocical wipe of the personalization dict is disabled. -->
<integer name="config_personalization_dict_wipe_interval_in_days">-1</integer>
</resources> </resources>

View file

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- Configuration values for Dictionary pack. -->
<resources>
<!-- Settings for the dictionary pack -->
<bool name="allow_over_metered">false</bool>
<bool name="allow_over_roaming">false</bool>
<bool name="dict_downloads_visible_in_download_UI">false</bool>
<bool name="metadata_downloads_visible_in_download_UI">false</bool>
<bool name="display_notification_for_auto_update">true</bool>
<bool name="display_notification_for_user_requested_update">true</bool>
</resources>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="dictionary_pack_client_id" translatable="false">org.dslul.openboard.inputmethod.latin</string>
<string name="dictionary_pack_metadata_uri" translatable="false"></string>
<string name="local_metadata_filename" translatable="false">metadata.json</string>
</resources>

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources>
<bool name="config_gesture_input_enabled_by_build_config">true</bool>
</resources>

View file

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2015 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
<resources>
<!-- The text shown on the suggestion bar to request the contacts permission info. -->
</resources>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Until KitKat (API 19), {@link android.widget.Spinner} of dialog mode in a Dialog can't
handle orientation change correctly. Using dropdown mode avoids the issue.
This file is overridden by values-v19/spinner-style.xml on KitKat and up. -->
<style name="additionalSubtypeSpinnerStyle">
<item name="android:spinnerMode">dropdown</item>
</style>
</resources>

View file

@ -82,7 +82,7 @@
<item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item> <item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
<item name="languageOnSpacebarTextRatio">@fraction/config_language_on_spacebar_text_ratio</item> <item name="languageOnSpacebarTextRatio">@fraction/config_language_on_spacebar_text_ratio</item>
<item name="languageOnSpacebarFinalAlpha">@integer/config_language_on_spacebar_final_alpha</item> <item name="languageOnSpacebarFinalAlpha">@integer/config_language_on_spacebar_final_alpha</item>
<item name="languageOnSpacebarFadeoutAnimator">@anim/language_on_spacebar_fadeout</item> <item name="languageOnSpacebarFadeoutAnimator">@animator/language_on_spacebar_fadeout</item>
<!-- Remove animations for now because it could drain a non-negligible amount of battery while typing. <!-- Remove animations for now because it could drain a non-negligible amount of battery while typing.
<item name="altCodeKeyWhileTypingFadeoutAnimator">@anim/alt_code_key_while_typing_fadeout</item> <item name="altCodeKeyWhileTypingFadeoutAnimator">@anim/alt_code_key_while_typing_fadeout</item>
<item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item> <item name="altCodeKeyWhileTypingFadeinAnimator">@anim/alt_code_key_while_typing_fadein</item>