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

Unverified Commit b35222c3 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-15.0.0_r32' into staging/lineage-22.2_merge-android-15.0.0_r32

Android 15.0.0 Release 32 (BP1A.250505.005)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCaBqG7gAKCRDorT+BmrEO
# eEesAJ9TuU6p57chXXOJQtdbt6ZIwjBfwQCdGzSnm7VYATcwFRRHM5vX1PMpjuI=
# =Bohl
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed May  7 01:02:22 2025 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

* tag 'android-15.0.0_r32':
  Log locale changes from AssetManager2.cpp
  Add config for auto data switch switch back case
  set default locale when config change isn't locale
  Add some logging around locale changes
  [AE] Prevent crash when launching activity's task id is invalid
  Remove Flag to clear allowlist duration
  Revert^2 "Clear the BAL allowlist duration"
  Add equals method
  Remove normalize_home_intent flag
  Prevent setting app op mode for device provisioning app through shell command
  Check dump permissions before dumping --high-priority
  Restrict the permission for accessing vpn profile
  Impose a threshold on the number of attributed op entries returned in a binder call
  Avoid app pinning requests if the Task is already locked
  Normalize home intent
  Don't allow non-system uids to use "android" as calling package.

Change-Id: I8024a633825c922f2e333d8b53176501b1d7a12a
parents f19ae33c 396d3290
Loading
Loading
Loading
Loading
+20 −1
Original line number Diff line number Diff line
@@ -23,12 +23,13 @@ import android.os.IBinder;
import com.android.internal.util.Preconditions;

import java.util.List;
import java.util.Objects;

/**
 * Privileges granted to a Process that allows it to execute starts from the background.
 * @hide
 */
public class BackgroundStartPrivileges {
public final class BackgroundStartPrivileges {
    /** No privileges. */
    public static final BackgroundStartPrivileges NONE = new BackgroundStartPrivileges(
            false, false, null);
@@ -190,4 +191,22 @@ public class BackgroundStartPrivileges {
                + ", originatingToken=" + mOriginatingToken
                + ']';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BackgroundStartPrivileges that = (BackgroundStartPrivileges) o;
        return mAllowsBackgroundActivityStarts == that.mAllowsBackgroundActivityStarts
                && mAllowsBackgroundForegroundServiceStarts
                == that.mAllowsBackgroundForegroundServiceStarts
                && Objects.equals(mOriginatingToken, that.mOriginatingToken);
    }

    @Override
    public int hashCode() {
        return Objects.hash(mAllowsBackgroundActivityStarts,
                mAllowsBackgroundForegroundServiceStarts,
                mOriginatingToken);
    }
}
+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())};
+12 −0
Original line number Diff line number Diff line
@@ -75,4 +75,16 @@ flag {
    bug: "362575865"
}

flag {
    name: "bal_strict_mode_grace_period"
    namespace: "responsible_apis"
    description: "Strict mode violation triggered by grace period usage"
    bug: "384807495"
}

flag {
    name: "bal_clear_allowlist_duration"
    namespace: "responsible_apis"
    description: "Clear the allowlist duration when clearAllowBgActivityStarts is called"
    bug: "322159724"
}
+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,
Loading