Stop restoring ENABLED_INPUT_METHODS
This CL logically reverts the following CL to stop restoring Settings.Secure.ENABLED_INPUT_METHODS during the new device/user setup. * If0104151b3526da6ecc669adde3119a239ecafeb 7b9a28c7 This CL also partially reverts the following CL because part of that CL is no longer necessary. * I94b4039c9f54c341aec72b62579be3dd8bd84dbb 964943ab In theory we should have been able to revert most of the following CL, but other team it is already used by other projects so we cannot revert it right now, unfortunately. * I01f5fafbbcfe3e3f5313829162ec011eaf2ad991 2028ddaa Reason for revert: At high level, we doubt restoring Settings.Secure.ENABLED_INPUT_METHODS still benefits restore experience for the user. * Anecdotally almost all IMEs maintain enabled languages with their per-app settings such as SheredPreference. This observation leads us to think that we should focus more on stabilizing per-app backup/restore scenario at least for IME migration scenarios. * The code is not that simple and cost to maintain it is not that low. If we reverted this code, we could spend our resources for other tasks, including improving restore experience for the user. * Stopping restoring ENABLED_INPUT_METHODS reduces chances to conflict with what the device policy says [1]. * We have had a strict rule about what IMEs can be enabled automatically, and the rule has been that only pre-installed IMEs can be automatically enabled by the system, unless some system components that have WRITE_SECURE_SETTINGS permission overrides it. Mechanically enabling an IME just because it was enabled in the previous device does not fit this model well. * Since Android O MR1, we also backup/restore user languages specified in the global settings [2]. The default selected IME should be able to automatically enable language support based on the restored system locales. [1]: DevicePolicyManager#setPermittedInputMethods() [2]: I1e6c7ba5b7abb6bde8b01ce0f647c04a5caa81a6 0f19cc77 Fix: 72978240 Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodUtilsTest Change-Id: I122a8f69b2f75a9af85e14b66db764c5d153040e
Loading
Please register or sign in to comment