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

Commit 0f02931b authored by Chris Antol's avatar Chris Antol Committed by Automerger Merge Worker
Browse files

Merge "Only override embedded activity locale if source package lookup yields...

Merge "Only override embedded activity locale if source package lookup yields locales to match" into udc-dev am: 68a12cca am: 37dac423

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22554035



Change-Id: I80894c3dddbcfbc22facc2932d50bdd8ee0afc57
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6466811b 37dac423
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -306,7 +306,6 @@ import android.os.Bundle;
import android.os.Debug;
import android.os.IBinder;
import android.os.IRemoteCallback;
import android.os.LocaleList;
import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteCallbackList;
@@ -10589,17 +10588,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            return;
        }

        LocaleList locale;
        final ActivityTaskManagerInternal.PackageConfig appConfig =
                mAtmService.mPackageConfigPersister.findPackageConfiguration(
                        task.realActivity.getPackageName(), mUserId);
        // if there is no app locale for the package, clear the target activity's locale.
        if (appConfig == null || appConfig.mLocales == null || appConfig.mLocales.isEmpty()) {
            locale = LocaleList.getEmptyLocaleList();
        } else {
            locale = appConfig.mLocales;
        // If package lookup yields locales, set the target activity's locales to match,
        // otherwise leave target activity as-is.
        if (appConfig != null && appConfig.mLocales != null && !appConfig.mLocales.isEmpty()) {
            resolvedConfig.setLocales(appConfig.mLocales);
        }
        resolvedConfig.setLocales(locale);
    }

    /**