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

Commit 32ce2bb0 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/30763907', 'googleplex-android-review.googlesource.com/30844889', 'googleplex-android-review.googlesource.com/30842514', 'googleplex-android-review.googlesource.com/30849722'] into 25Q1-release.

Change-Id: I979c2e0f4b4b9175927b871b9a19376489122910
parents 64b938c9 447eaeb3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -114,3 +114,11 @@ flag {
    bug: "373535266"
    is_fixed_read_only: true
}

flag {
    name: "self_targeting_android_resource_frro"
    is_exported: true
    namespace: "customization_picker"
    description: "Fixes bug in Launcher preview by enabling overlays targeting 'android'"
    bug: "377545987"
}
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.content.om.OverlayManager;
import android.content.pm.ApplicationInfo;
import android.content.res.ApkAssets;
import android.content.res.AssetFileDescriptor;
import android.content.res.Flags;
import android.os.ParcelFileDescriptor;
import android.util.Log;

@@ -90,6 +91,10 @@ public class ResourcesProvider implements AutoCloseable, Closeable {
            throws IOException {
        Objects.requireNonNull(overlayInfo);
        Preconditions.checkArgument(overlayInfo.isFabricated(), "Not accepted overlay");
        if (!Flags.selfTargetingAndroidResourceFrro()) {
            Preconditions.checkStringNotEmpty(
                    overlayInfo.getTargetOverlayableName(), "Without overlayable name");
        }
        final String overlayName =
                OverlayManagerImpl.checkOverlayNameValid(overlayInfo.getOverlayName());
        final String path =
+11 −23
Original line number Diff line number Diff line
@@ -21,13 +21,11 @@ import android.os.CpuHeadroomParamsInternal;
import android.os.GpuHeadroomParamsInternal;
import android.os.IHintSession;
import android.os.SessionCreationConfig;

import android.hardware.power.ChannelConfig;
import android.hardware.power.CpuHeadroomResult;
import android.hardware.power.ChannelConfig;
import android.hardware.power.GpuHeadroomResult;
import android.hardware.power.SessionConfig;
import android.hardware.power.SessionTag;
import android.hardware.power.SupportInfo;

/** {@hide} */
interface IHintManager {
@@ -42,6 +40,11 @@ interface IHintManager {
    IHintSession createHintSessionWithConfig(in IBinder token, in SessionTag tag,
            in SessionCreationConfig creationConfig, out SessionConfig config);

    /**
     * Get preferred rate limit in nanoseconds.
     */
    long getHintSessionPreferredRate();

    void setHintSessionThreads(in IHintSession hintSession, in int[] tids);
    int[] getHintSessionThreadIds(in IHintSession hintSession);

@@ -58,28 +61,13 @@ interface IHintManager {
    long getGpuHeadroomMinIntervalMillis();

    /**
     * Used by the JNI to pass an interface to the SessionManager;
     * for internal use only.
     */
    oneway void passSessionManagerBinder(in IBinder sessionManager);

    parcelable HintManagerClientData {
        int powerHalVersion;
        int maxGraphicsPipelineThreads;
        long preferredRateNanos;
        SupportInfo supportInfo;
    }

    interface IHintManagerClient {
        /**
        * Returns FMQ channel information for the caller, which it associates to the callback binder lifespan.
     * Get Maximum number of graphics pipeline threads allowed per-app.
     */
        oneway void receiveChannelConfig(in ChannelConfig config);
    }
    int getMaxGraphicsPipelineThreadsCount();

    /**
     * Set up an ADPF client, receiving a remote client binder interface and
     * passing back a bundle of support and configuration information.
     * Used by the JNI to pass an interface to the SessionManager;
     * for internal use only.
     */
    HintManagerClientData registerClient(in IHintManagerClient client);
    oneway void passSessionManagerBinder(in IBinder sessionManager);
}
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.appwidget.flags.Flags.FLAG_DRAW_DATA_PARCEL;
import static android.appwidget.flags.Flags.FLAG_REMOTE_VIEWS_PROTO;
import static android.appwidget.flags.Flags.drawDataParcel;
import static android.appwidget.flags.Flags.remoteAdapterConversion;
import static android.content.res.Flags.FLAG_SELF_TARGETING_ANDROID_RESOURCE_FRRO;
import static android.util.TypedValue.TYPE_INT_COLOR_ARGB8;
import static android.util.proto.ProtoInputStream.NO_MORE_FIELDS;
import static android.view.inputmethod.Flags.FLAG_HOME_SCREEN_HANDWRITING_DELEGATOR;
@@ -8698,6 +8699,7 @@ public class RemoteViews implements Parcelable, Filter {
         *
         * @hide
         */
        @FlaggedApi(FLAG_SELF_TARGETING_ANDROID_RESOURCE_FRRO)
        @Nullable
        public static ColorResources createWithOverlay(Context context,
                SparseIntArray colorMapping) {
+11 −3
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.parsing.FrameworkParsingPackageUtils;
import android.content.res.AssetManager;
import android.content.res.Flags;
import android.os.FabricatedOverlayInfo;
import android.os.FabricatedOverlayInternal;
import android.os.FabricatedOverlayInternalEntry;
@@ -235,17 +236,24 @@ public class OverlayManagerImpl {
        Preconditions.checkArgument(!entryList.isEmpty(), "overlay entries shouldn't be empty");
        final String overlayName = checkOverlayNameValid(overlayInternal.overlayName);
        checkPackageName(overlayInternal.packageName);
        if (Flags.selfTargetingAndroidResourceFrro()) {
            Preconditions.checkStringNotEmpty(overlayInternal.targetPackageName);
        } else {
            checkPackageName(overlayInternal.targetPackageName);
            Preconditions.checkStringNotEmpty(
                    overlayInternal.targetOverlayable,
                    "Target overlayable should be neither null nor empty string.");
        }

        final ApplicationInfo applicationInfo = mContext.getApplicationInfo();
        String targetPackage = null;
        if (TextUtils.equals(overlayInternal.targetPackageName, "android")) {
        if (Flags.selfTargetingAndroidResourceFrro() && TextUtils.equals(
                overlayInternal.targetPackageName, "android")) {
            targetPackage = AssetManager.FRAMEWORK_APK_PATH;
        } else {
            targetPackage = Preconditions.checkStringNotEmpty(
                    applicationInfo.getBaseCodePath());
        }

        final Path frroPath = mBasePath.resolve(overlayName + FRRO_EXTENSION);
        final Path idmapPath = mBasePath.resolve(overlayName + IDMAP_EXTENSION);

Loading