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

Commit 396d3290 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/31424959',...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/31424959', 'googleplex-android-review.googlesource.com/31766493', 'googleplex-android-review.googlesource.com/31816463', 'googleplex-android-review.googlesource.com/31816479', 'googleplex-android-review.googlesource.com/32486993'] into 25Q1-release.

Change-Id: I760eb461a0bac6256b50a8a9f8d3e88f15dec224
parents aa294630 72e7904b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2358,8 +2358,13 @@ public final class Configuration implements Parcelable, Comparable<Configuration
     * @param locales The locale list. If null, an empty LocaleList will be assigned.
     */
    public void setLocales(@Nullable LocaleList locales) {
        LocaleList oldList = mLocaleList;
        mLocaleList = locales == null ? LocaleList.getEmptyLocaleList() : locales;
        locale = mLocaleList.get(0);
        if (!mLocaleList.equals(oldList)) {
            Slog.v(TAG, "Updating configuration, locales updated from " + oldList
                    + " to " + mLocaleList);
        }
        setLayoutDirection(locale);
    }

+4 −0
Original line number Diff line number Diff line
@@ -491,6 +491,9 @@ public class ResourcesImpl {
                            }
                            defaultLocale =
                                    adjustLanguageTag(lc.getDefaultLocale().toLanguageTag());
                            Slog.v(TAG, "Updating configuration, with default locale "
                                    + defaultLocale + " and selected locales "
                                    + Arrays.toString(selectedLocales));
                        } else {
                            String[] availableLocales;
                            // The LocaleList has changed. We must query the AssetManager's
@@ -526,6 +529,7 @@ public class ResourcesImpl {
                        for (int i = 0; i < locales.size(); i++) {
                            selectedLocales[i] = adjustLanguageTag(locales.get(i).toLanguageTag());
                        }
                        defaultLocale = adjustLanguageTag(lc.getDefaultLocale().toLanguageTag());
                    } else {
                        selectedLocales = new String[]{
                                adjustLanguageTag(locales.get(0).toLanguageTag())};
+6 −8
Original line number Diff line number Diff line
@@ -409,19 +409,17 @@ static void NativeSetConfiguration(JNIEnv* env, jclass /*clazz*/, jlong ptr, jin
    configs.push_back(configuration);
  }

  uint32_t default_locale_int = 0;
  std::optional<ResTable_config> default_locale_opt;
  if (default_locale != nullptr) {
    ResTable_config config;
    static_assert(std::is_same_v<decltype(config.locale), decltype(default_locale_int)>);
      ScopedUtfChars locale_utf8(env, default_locale);
      CHECK(locale_utf8.c_str() != nullptr);
    config.setBcp47Locale(locale_utf8.c_str());
    default_locale_int = config.locale;
      default_locale_opt.emplace();
      default_locale_opt->setBcp47Locale(locale_utf8.c_str());
  }

  auto assetmanager = LockAndStartAssetManager(ptr);
  assetmanager->SetConfigurations(std::move(configs), force_refresh != JNI_FALSE);
  assetmanager->SetDefaultLocale(default_locale_int);
  assetmanager->SetDefaultLocale(default_locale_opt);
}

static jobject NativeGetAssignedPackageIdentifiers(JNIEnv* env, jclass /*clazz*/, jlong ptr,
+7 −0
Original line number Diff line number Diff line
@@ -64,6 +64,13 @@
    <integer name="auto_data_switch_performance_stability_time_threshold_millis">120000</integer>
    <java-symbol type="integer" name="auto_data_switch_performance_stability_time_threshold_millis" />

    <!-- Define the bar for switching data back to the default SIM when both SIMs are out of service
         in milliseconds. A value of 0 means an immediate switch, otherwise for a negative value,
         the threshold defined by auto_data_switch_availability_stability_time_threshold_millis
         will be used instead. -->
    <integer name="auto_data_switch_availability_switchback_stability_time_threshold_millis">150000</integer>
    <java-symbol type="integer" name="auto_data_switch_availability_switchback_stability_time_threshold_millis" />

    <!-- Define the maximum retry times when a validation for switching failed.-->
    <integer name="auto_data_switch_validation_max_retry">7</integer>
    <java-symbol type="integer" name="auto_data_switch_validation_max_retry" />
+11 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package androidx.window.extensions.embedding;

import static android.app.ActivityManager.START_SUCCESS;
import static android.app.ActivityOptions.KEY_LAUNCH_TASK_FRAGMENT_TOKEN;
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.view.Display.DEFAULT_DISPLAY;
@@ -3148,15 +3149,22 @@ public class SplitController implements JetpackTaskFragmentOrganizer.TaskFragmen
                final WindowContainerTransaction wct = transactionRecord.getTransaction();
                final TaskFragmentContainer launchedInTaskFragment;
                if (launchingActivity != null) {
                    final int taskId = getTaskId(launchingActivity);
                    final String overlayTag = options.getString(KEY_OVERLAY_TAG);
                    if (Flags.activityEmbeddingOverlayPresentationFlag()
                            && overlayTag != null) {
                        launchedInTaskFragment = createOrUpdateOverlayTaskFragmentIfNeeded(wct,
                                options, intent, launchingActivity);
                    } else {
                        final int taskId = getTaskId(launchingActivity);
                        if (taskId != INVALID_TASK_ID) {
                            launchedInTaskFragment = resolveStartActivityIntent(wct, taskId, intent,
                                    launchingActivity);
                        } else {
                            // We cannot get a valid task id of launchingActivity so we fall back to
                            // treat it as a non-Activity context.
                            launchedInTaskFragment =
                                    resolveStartActivityIntentFromNonActivityContext(wct, intent);
                        }
                    }
                } else {
                    launchedInTaskFragment = resolveStartActivityIntentFromNonActivityContext(wct,
Loading