Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6ee9e69 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android Git Automerger
Browse files

am 183fe800: Small cleanup of RunInLocale

* commit '183fe800':
  Small cleanup of RunInLocale
parents f7dbd991 183fe800
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -180,14 +180,15 @@ public final class LocaleUtils {
            synchronized (sLockForRunInLocale) {
                final Configuration conf = res.getConfiguration();
                final Locale oldLocale = conf.locale;
                final boolean needsChange = (newLocale != null && !newLocale.equals(oldLocale));
                try {
                    if (newLocale != null && !newLocale.equals(oldLocale)) {
                    if (needsChange) {
                        conf.locale = newLocale;
                        res.updateConfiguration(conf, null);
                    }
                    return job(res);
                } finally {
                    if (newLocale != null && !newLocale.equals(oldLocale)) {
                    if (needsChange) {
                        conf.locale = oldLocale;
                        res.updateConfiguration(conf, null);
                    }