diff --git a/java/Android.bp b/java/Android.bp
index acf6b26b30d768b7238c8afa7e80d7fbd26b32c4..85f305977a19e5cc09ec523c476b9e5cb2626963 100644
--- a/java/Android.bp
+++ b/java/Android.bp
@@ -47,6 +47,7 @@ android_app {
"androidx.legacy_legacy-support-v4",
"androidx.recyclerview_recyclerview",
"androidx.viewpager2_viewpager2",
+ "elib",
],
// Do not compress dictionary files to mmap dict data runtime
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index bc63c6a555e6f92f7c44db81269bcb86d3f38cda..fc487c46777e4c9524e55c54c2c1fd03aca51b69 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -19,7 +19,7 @@
package="com.android.inputmethod.latin"
android:versionCode="30">
-
diff --git a/java/res/drawable/btn_keyboard_key_action_normal_you.xml b/java/res/drawable/btn_keyboard_key_action_normal_you.xml
index ab61dafdfd5fed2341359d0326dd3120d17856c2..09f5b819e5bde36137980a6cf3e884d06ed77544 100644
--- a/java/res/drawable/btn_keyboard_key_action_normal_you.xml
+++ b/java/res/drawable/btn_keyboard_key_action_normal_you.xml
@@ -5,5 +5,11 @@
-->
-
+
+
+
+
diff --git a/java/res/drawable/btn_keyboard_key_action_pressed_you.xml b/java/res/drawable/btn_keyboard_key_action_pressed_you.xml
index 6eb85b3d493e4f7331ab9c3e7d6e98fee3a46539..e3cada54c0f1115140e0743c5ba17543a720b9ed 100644
--- a/java/res/drawable/btn_keyboard_key_action_pressed_you.xml
+++ b/java/res/drawable/btn_keyboard_key_action_pressed_you.xml
@@ -5,5 +5,11 @@
-->
-
+
+
+
+
diff --git a/java/res/drawable/sym_keyboard_delete_you.xml b/java/res/drawable/sym_keyboard_delete_you.xml
index e7ebb4cb63f9d86ab7c73e79966d83be22b0d774..022e71ca372998827816c790c46bdc0ec58726a8 100644
--- a/java/res/drawable/sym_keyboard_delete_you.xml
+++ b/java/res/drawable/sym_keyboard_delete_you.xml
@@ -10,6 +10,6 @@
android:viewportHeight="24"
android:autoMirrored="true">
diff --git a/java/res/drawable/sym_keyboard_language_switch_you.xml b/java/res/drawable/sym_keyboard_language_switch_you.xml
index 72be14325ea070efba77cf9b7411efd5a782d917..b3805d7547b2d8b72329449ba4a74b8a809f715e 100644
--- a/java/res/drawable/sym_keyboard_language_switch_you.xml
+++ b/java/res/drawable/sym_keyboard_language_switch_you.xml
@@ -9,6 +9,6 @@
android:viewportWidth="960"
android:viewportHeight="960">
diff --git a/java/res/drawable/sym_keyboard_settings_you.xml b/java/res/drawable/sym_keyboard_settings_you.xml
index 9e6b7a5bfa670671c46ce265ebb9615a475d71c2..88110c6f786823630818b42cf569b38bd4e99f5b 100644
--- a/java/res/drawable/sym_keyboard_settings_you.xml
+++ b/java/res/drawable/sym_keyboard_settings_you.xml
@@ -9,6 +9,6 @@
android:viewportWidth="960"
android:viewportHeight="960">
diff --git a/java/res/drawable/sym_keyboard_smiley_you.xml b/java/res/drawable/sym_keyboard_smiley_you.xml
index f176197048e59cb7c2307023106a57b8295845dc..f66538080d5c13f879cc5512ad9d5d1cddab8c3e 100644
--- a/java/res/drawable/sym_keyboard_smiley_you.xml
+++ b/java/res/drawable/sym_keyboard_smiley_you.xml
@@ -9,6 +9,6 @@
android:viewportWidth="960"
android:viewportHeight="960">
diff --git a/java/res/values-night/themes-you-colors.xml b/java/res/values-night/themes-you-colors.xml
index a7c03065cd7765437509b52ca3437c22cfbcd881..059dee23c8b70abc9bb14b5c0eed0b428ae8fede 100644
--- a/java/res/values-night/themes-you-colors.xml
+++ b/java/res/values-night/themes-you-colors.xml
@@ -4,19 +4,6 @@
SPDX-License-Identifier: Apache-2.0
-->
- @android:color/system_neutral1_900
-
- @android:color/system_neutral1_800
- @android:color/system_neutral1_900
- @android:color/system_neutral1_50
- @android:color/system_neutral1_700
- @android:color/system_neutral2_300
- @android:color/system_neutral1_50
- @android:color/system_accent1_400
- @android:color/system_accent1_600
- @android:color/system_neutral1_50
- @android:color/system_neutral1_50
- @android:color/system_neutral1_50
@android:color/system_neutral1_400
@android:color/system_neutral1_50
diff --git a/java/res/values/themes-you-colors.xml b/java/res/values/themes-you-colors.xml
index 0dc99259de30702e4c1121ca73aae6d5e9f0d2f4..02589ba914e481ece2322eec03551e298783652c 100644
--- a/java/res/values/themes-you-colors.xml
+++ b/java/res/values/themes-you-colors.xml
@@ -4,19 +4,19 @@
SPDX-License-Identifier: Apache-2.0
-->
- @android:color/system_neutral1_50
+ @color/e_keyboard_background
- @android:color/system_neutral1_0
- @android:color/system_neutral1_100
- @android:color/system_neutral1_900
- @android:color/system_accent2_100
- @android:color/system_neutral2_200
- @android:color/system_neutral1_900
- @android:color/system_accent1_200
- @android:color/system_accent1_400
- @android:color/system_neutral1_900
- @android:color/system_neutral1_900
- @android:color/system_neutral1_900
+ @color/e_keyboard_key_background
+ @color/e_keyboard_key_pressed_background
+ @color/e_keyboard_key_text
+ @color/e_keyboard_functional_background
+ @color/e_keyboard_functional_pressed_background
+ @color/keyboard_key_text_color_you
+ @color/e_keyboard_key_enter_background
+ @color/e_keyboard_key_enter_pressed_background
+ @color/keyboard_key_text_color_you
+ @color/keyboard_key_text_color_you
+ @color/keyboard_background_you
@android:color/system_neutral1_400
@android:color/system_neutral1_900
diff --git a/java/res/xml/key_styles_common.xml b/java/res/xml/key_styles_common.xml
index a1ce2ea320b71c42d5a9143f69c650bc920b1d0e..2ee5fddf7ff401a813c5ed111a9bbc0d2e733ee2 100644
--- a/java/res/xml/key_styles_common.xml
+++ b/java/res/xml/key_styles_common.xml
@@ -80,7 +80,8 @@
+ latin:keyActionFlags="noKeyPreview"
+ latin:backgroundType="functional" />
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 3c891716d9b8cc0d402869e86b8ee5b94a678dd6..d01bdd4dc82b2ab5eab9549a84267aac34868603 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -75,6 +75,7 @@ import com.android.inputmethod.event.InputTransaction;
import com.android.inputmethod.keyboard.Keyboard;
import com.android.inputmethod.keyboard.KeyboardActionListener;
import com.android.inputmethod.keyboard.KeyboardId;
+import com.android.inputmethod.keyboard.KeyboardLayoutSet;
import com.android.inputmethod.keyboard.KeyboardSwitcher;
import com.android.inputmethod.keyboard.MainKeyboardView;
import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback;
@@ -808,6 +809,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
cleanupInternalStateForFinishInput();
}
}
+ KeyboardLayoutSet.onKeyboardThemeChanged();
super.onConfigurationChanged(conf);
}
diff --git a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java
index 90221512ffd752d2f6569e058d815b415ef84d53..109cace92f1c796b8ccea58606094416a22d8ae9 100644
--- a/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java
+++ b/java/src/com/android/inputmethod/latin/SystemBroadcastReceiver.java
@@ -86,6 +86,7 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
} else if (Intent.ACTION_BOOT_COMPLETED.equals(intentAction)) {
Log.i(TAG, "Boot has been completed");
toggleAppIcon(context);
+ disableVoiceKey(context);
} else if (Intent.ACTION_LOCALE_CHANGED.equals(intentAction)) {
Log.i(TAG, "System locale changed");
KeyboardLayoutSet.onSystemLocaleChanged();
@@ -156,4 +157,15 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
}
+
+ public static void disableVoiceKey(final Context context) {
+ final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
+ if (prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, false) &&
+ !prefs.getBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, false)) {
+ prefs.edit()
+ .putBoolean(Settings.PREF_VOICE_INPUT_KEY, false)
+ .putBoolean(Settings.PREF_FORCED_DISABLE_VOICE_INPUT_KEY, true)
+ .apply();
+ }
+ }
}
diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index 803153e7b694d0d569c557c933c8b1fe4a20cca2..420b61a32c93cbf601511a1aa0c3c5cb8ec01735 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -58,6 +58,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
// PREF_VOICE_MODE_OBSOLETE is obsolete. Use PREF_VOICE_INPUT_KEY instead.
public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode";
public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key";
+ // Added by /e/ to disable old enabled voice key
+ public static final String PREF_FORCED_DISABLE_VOICE_INPUT_KEY = "pref_forced_disable_voice_input_key";
public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary";
public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key";
// PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead.
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
index 6eb8e98b83ac0bb66617c891c7b262b402f8d58c..dc21f0b8d0d80d49e44d73c0ac224013c9a14c8f 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
@@ -374,7 +374,7 @@ public class SettingsValues {
.remove(Settings.PREF_VOICE_MODE_OBSOLETE)
.apply();
}
- return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, true);
+ return prefs.getBoolean(Settings.PREF_VOICE_INPUT_KEY, false);
}
public String dump() {