Only set locale in config for updating locale
To update locale, it doesn't need a full configuration because system only applied the diff of config from non-undefined fields. IActivityManager#getConfiguration actually gets the configuration according to the pid, which is process configuration. And process configuration can be overridden by the activity running in its process. So the returned value shouldn't be used to update the system persistent configuration. Therefore it is enough to use a new Configuration instance with setting the necessary fields. This is also more efficient that saves a binder call to system. Bug: 253386061 Test: atest LocaleManagerTests Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
Loading
Please register or sign in to comment