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

Commit 0ef409f3 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Remove ENABLE_TRUSTED_PRESENTATION_LISTENER flag" into main

parents 66213581 fcdf8e31
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -56439,7 +56439,7 @@ package android.view {
    method @NonNull public default android.view.WindowMetrics getMaximumWindowMetrics();
    method public default boolean isCrossWindowBlurEnabled();
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") @NonNull public default android.window.InputTransferToken registerBatchedSurfaceControlInputReceiver(@NonNull android.window.InputTransferToken, @NonNull android.view.SurfaceControl, @NonNull android.view.Choreographer, @NonNull android.view.SurfaceControlInputReceiver);
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public default void registerTrustedPresentationListener(@NonNull android.os.IBinder, @NonNull android.window.TrustedPresentationThresholds, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public default void registerTrustedPresentationListener(@NonNull android.os.IBinder, @NonNull android.window.TrustedPresentationThresholds, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>);
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") @NonNull public default android.window.InputTransferToken registerUnbatchedSurfaceControlInputReceiver(@NonNull android.window.InputTransferToken, @NonNull android.view.SurfaceControl, @NonNull android.os.Looper, @NonNull android.view.SurfaceControlInputReceiver);
    method public default void removeCrossWindowBlurEnabledListener(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public default void removeProposedRotationListener(@NonNull java.util.function.IntConsumer);
@@ -56447,7 +56447,7 @@ package android.view {
    method public void removeViewImmediate(android.view.View);
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") public default boolean transferTouchGesture(@NonNull android.window.InputTransferToken, @NonNull android.window.InputTransferToken);
    method @FlaggedApi("com.android.window.flags.surface_control_input_receiver") public default void unregisterSurfaceControlInputReceiver(@NonNull android.view.SurfaceControl);
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public default void unregisterTrustedPresentationListener(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    method public default void unregisterTrustedPresentationListener(@NonNull java.util.function.Consumer<java.lang.Boolean>);
    field @FlaggedApi("com.android.window.flags.cover_display_opt_in") public static final int COMPAT_SMALL_COVER_SCREEN_OPT_IN = 1; // 0x1
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE = "android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE";
    field public static final String PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED = "android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED";
@@ -63594,14 +63594,14 @@ package android.window {
    method @FlaggedApi("com.android.window.flags.predictive_back_system_override_callback") @NonNull public static android.window.OnBackInvokedCallback moveTaskToBackCallback(@NonNull android.app.Activity);
  }
  @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public final class TrustedPresentationThresholds implements android.os.Parcelable {
    ctor @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public TrustedPresentationThresholds(@FloatRange(from=0.0f, fromInclusive=false, to=1.0f) float, @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) float, @IntRange(from=1) int);
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public int describeContents();
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) public float getMinAlpha();
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) public float getMinFractionRendered();
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") @IntRange(from=1) public int getStabilityRequirementMillis();
    method @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") public void writeToParcel(@NonNull android.os.Parcel, int);
    field @FlaggedApi("com.android.window.flags.trusted_presentation_listener_for_window") @NonNull public static final android.os.Parcelable.Creator<android.window.TrustedPresentationThresholds> CREATOR;
  public final class TrustedPresentationThresholds implements android.os.Parcelable {
    ctor public TrustedPresentationThresholds(@FloatRange(from=0.0f, fromInclusive=false, to=1.0f) float, @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) float, @IntRange(from=1) int);
    method public int describeContents();
    method @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) public float getMinAlpha();
    method @FloatRange(from=0.0f, fromInclusive=false, to=1.0f) public float getMinFractionRendered();
    method @IntRange(from=1) public int getStabilityRequirementMillis();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.window.TrustedPresentationThresholds> CREATOR;
  }
}
+0 −2
Original line number Diff line number Diff line
@@ -6452,7 +6452,6 @@ public interface WindowManager extends ViewManager {
     *                   when entered or exited trusted presentation per the thresholds.
     * @see TrustedPresentationThresholds
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    default void registerTrustedPresentationListener(@NonNull IBinder window,
            @NonNull TrustedPresentationThresholds thresholds,  @NonNull Executor executor,
            @NonNull Consumer<Boolean> listener) {
@@ -6465,7 +6464,6 @@ public interface WindowManager extends ViewManager {
     *
     * @see WindowManager#registerTrustedPresentationListener(IBinder, TrustedPresentationThresholds, Executor, Consumer)
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    default void unregisterTrustedPresentationListener(@NonNull Consumer<Boolean> listener) {
        throw new UnsupportedOperationException();
    }
+0 −2
Original line number Diff line number Diff line
@@ -232,7 +232,6 @@ public class WindowManagerWrapper implements WindowManager {
        return mBase.replaceContentOnDisplayWithSc(displayId, sc);
    }

    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    @Override
    public void registerTrustedPresentationListener(@NonNull IBinder window,
            @NonNull TrustedPresentationThresholds thresholds, @NonNull Executor executor,
@@ -240,7 +239,6 @@ public class WindowManagerWrapper implements WindowManager {
        mBase.registerTrustedPresentationListener(window, thresholds, executor, listener);
    }

    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    @Override
    public void unregisterTrustedPresentationListener(@NonNull Consumer<Boolean> listener) {
        mBase.unregisterTrustedPresentationListener(listener);
+0 −16
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.window;

import android.annotation.FlaggedApi;
import android.annotation.FloatRange;
import android.annotation.IntRange;
import android.os.Parcel;
@@ -24,8 +23,6 @@ import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.android.window.flags.Flags;

import java.util.Objects;

/**
@@ -33,7 +30,6 @@ import java.util.Objects;
 * {@link android.view.WindowManager#registerTrustedPresentationListener(IBinder,
 * TrustedPresentationThresholds, Executor, Consumer)}
 */
@FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
public final class TrustedPresentationThresholds implements Parcelable {
    /**
     * The min alpha the Window is required to have to be considered inside the
@@ -59,7 +55,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
     * The min alpha the Window is required to have to be considered inside the
     * threshold.
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public @FloatRange(from = 0f, fromInclusive = false, to = 1f) float getMinAlpha() {
        return mMinAlpha;
    }
@@ -68,7 +63,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
     * The min fraction of the Window that was presented to the user to be considered
     * inside the threshold.
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public @FloatRange(from = 0f, fromInclusive = false, to = 1f) float getMinFractionRendered() {
        return mMinFractionRendered;
    }
@@ -76,7 +70,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
    /**
     * The time in milliseconds required for the Window to be in the threshold.
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public @IntRange(from = 1) int getStabilityRequirementMillis() {
        return mStabilityRequirementMs;
    }
@@ -100,7 +93,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
     * @param stabilityRequirementMs The time in milliseconds required for the
     *                               Window to be in the threshold.
     */
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public TrustedPresentationThresholds(
            @FloatRange(from = 0f, fromInclusive = false, to = 1f) float minAlpha,
            @FloatRange(from = 0f, fromInclusive = false, to = 1f) float minFractionRendered,
@@ -112,7 +104,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
    }

    @Override
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public String toString() {
        return "TrustedPresentationThresholds { "
                + "minAlpha = " + mMinAlpha + ", "
@@ -122,7 +113,6 @@ public final class TrustedPresentationThresholds implements Parcelable {
    }

    @Override
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeFloat(mMinAlpha);
        dest.writeFloat(mMinFractionRendered);
@@ -130,20 +120,17 @@ public final class TrustedPresentationThresholds implements Parcelable {
    }

    @Override
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public int describeContents() {
        return 0;
    }


    @Override
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public int hashCode() {
        return Objects.hash(mMinAlpha, mMinFractionRendered, mStabilityRequirementMs);
    }

    @Override
    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public boolean equals(Object o) {
        if (this == o) {
            return true;
@@ -167,17 +154,14 @@ public final class TrustedPresentationThresholds implements Parcelable {
        checkValid();
    }

    @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
    public static final @NonNull Creator<TrustedPresentationThresholds> CREATOR =
            new Creator<TrustedPresentationThresholds>() {
                @Override
                @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
                public TrustedPresentationThresholds[] newArray(int size) {
                    return new TrustedPresentationThresholds[size];
                }

                @Override
                @FlaggedApi(Flags.FLAG_TRUSTED_PRESENTATION_LISTENER_FOR_WINDOW)
                public TrustedPresentationThresholds createFromParcel(@NonNull Parcel in) {
                    return new TrustedPresentationThresholds(in);
                }
+0 −8
Original line number Diff line number Diff line
@@ -19,14 +19,6 @@ flag {
    bug: "262477923"
}

flag {
    namespace: "window_surfaces"
    name: "trusted_presentation_listener_for_window"
    is_exported: true
    description: "Enable trustedPresentationListener on windows public API"
    is_fixed_read_only: true
    bug: "278027319"
}

flag {
    namespace: "window_surfaces"