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

Commit 58ecbea4 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Cleaning up com.android.window.flags.delegate_unhandled_drags flag" into main

parents a45822f4 496e9cfb
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -10650,20 +10650,20 @@ package android.content {
    method public CharSequence coerceToText(android.content.Context);
    method public String getHtmlText();
    method public android.content.Intent getIntent();
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @Nullable public android.content.IntentSender getIntentSender();
    method @Nullable public android.content.IntentSender getIntentSender();
    method public CharSequence getText();
    method @Nullable public android.view.textclassifier.TextLinks getTextLinks();
    method public android.net.Uri getUri();
  }
  @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") public static final class ClipData.Item.Builder {
  public static final class ClipData.Item.Builder {
    ctor public ClipData.Item.Builder();
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item build();
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item.Builder setHtmlText(@Nullable String);
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item.Builder setIntent(@Nullable android.content.Intent);
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item.Builder setIntentSender(@Nullable android.content.IntentSender);
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item.Builder setText(@Nullable CharSequence);
    method @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") @NonNull public android.content.ClipData.Item.Builder setUri(@Nullable android.net.Uri);
    method @NonNull public android.content.ClipData.Item build();
    method @NonNull public android.content.ClipData.Item.Builder setHtmlText(@Nullable String);
    method @NonNull public android.content.ClipData.Item.Builder setIntent(@Nullable android.content.Intent);
    method @NonNull public android.content.ClipData.Item.Builder setIntentSender(@Nullable android.content.IntentSender);
    method @NonNull public android.content.ClipData.Item.Builder setText(@Nullable CharSequence);
    method @NonNull public android.content.ClipData.Item.Builder setUri(@Nullable android.net.Uri);
  }
  public class ClipDescription implements android.os.Parcelable {
@@ -55157,12 +55157,12 @@ package android.view {
    field public static final int DRAG_FLAG_GLOBAL = 256; // 0x100
    field public static final int DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION = 64; // 0x40
    field public static final int DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION = 128; // 0x80
    field @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") public static final int DRAG_FLAG_GLOBAL_SAME_APPLICATION = 4096; // 0x1000
    field public static final int DRAG_FLAG_GLOBAL_SAME_APPLICATION = 4096; // 0x1000
    field public static final int DRAG_FLAG_GLOBAL_URI_READ = 1; // 0x1
    field public static final int DRAG_FLAG_GLOBAL_URI_WRITE = 2; // 0x2
    field @FlaggedApi("com.android.window.flags.supports_drag_assistant_to_multiwindow") public static final int DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START = 16384; // 0x4000
    field public static final int DRAG_FLAG_OPAQUE = 512; // 0x200
    field @FlaggedApi("com.android.window.flags.delegate_unhandled_drags") public static final int DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG = 8192; // 0x2000
    field public static final int DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG = 8192; // 0x2000
    field @Deprecated public static final int DRAWING_CACHE_QUALITY_AUTO = 0; // 0x0
    field @Deprecated public static final int DRAWING_CACHE_QUALITY_HIGH = 1048576; // 0x100000
    field @Deprecated public static final int DRAWING_CACHE_QUALITY_LOW = 524288; // 0x80000
+0 −10
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ import static android.content.ContentResolver.SCHEME_ANDROID_RESOURCE;
import static android.content.ContentResolver.SCHEME_CONTENT;
import static android.content.ContentResolver.SCHEME_FILE;

import static com.android.window.flags.Flags.FLAG_DELEGATE_UNHANDLED_DRAGS;

import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -230,7 +228,6 @@ public class ClipData implements Parcelable {
        /**
         * A builder for a ClipData Item.
         */
        @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
        public static final class Builder {
            private CharSequence mText;
            private String mHtmlText;
@@ -241,7 +238,6 @@ public class ClipData implements Parcelable {
            /**
             * Sets the text for the item to be constructed.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Builder setText(@Nullable CharSequence text) {
                mText = text;
@@ -251,7 +247,6 @@ public class ClipData implements Parcelable {
            /**
             * Sets the HTML text for the item to be constructed.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Builder setHtmlText(@Nullable String htmlText) {
                mHtmlText = htmlText;
@@ -261,7 +256,6 @@ public class ClipData implements Parcelable {
            /**
             * Sets the Intent for the item to be constructed.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Builder setIntent(@Nullable Intent intent) {
                mIntent = intent;
@@ -276,7 +270,6 @@ public class ClipData implements Parcelable {
             * If there is a fixed lifetime for this ClipData (ie. for drag and drop), the system
             * will cancel the IntentSender when it is no longer used.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Builder setIntentSender(@Nullable IntentSender intentSender) {
                if (intentSender != null && !intentSender.isImmutable()) {
@@ -289,7 +282,6 @@ public class ClipData implements Parcelable {
            /**
             * Sets the URI for the item to be constructed.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Builder setUri(@Nullable Uri uri) {
                mUri = uri;
@@ -299,7 +291,6 @@ public class ClipData implements Parcelable {
            /**
             * Constructs a new Item with the properties set on this builder.
             */
            @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
            @NonNull
            public Item build() {
                return new Item(mText, mHtmlText, mIntent, mIntentSender, mUri);
@@ -413,7 +404,6 @@ public class ClipData implements Parcelable {
        /**
         * Returns the {@link IntentSender} in this Item.
         */
        @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
        @Nullable
        public IntentSender getIntentSender() {
            return mIntentSender;
+9 −16
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFI
import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__LONG_PRESS;
import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__SINGLE_TAP;
import static com.android.internal.util.FrameworkStatsLog.TOUCH_GESTURE_CLASSIFIED__CLASSIFICATION__UNKNOWN_CLASSIFICATION;
import static com.android.window.flags.Flags.FLAG_DELEGATE_UNHANDLED_DRAGS;
import static com.android.window.flags.Flags.FLAG_SUPPORTS_DRAG_ASSISTANT_TO_MULTIWINDOW;
import static com.android.window.flags.Flags.reduceChangedExclusionRectsMsgs;
@@ -5618,7 +5617,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * DRAG_FLAG_GLOBAL_SAME_APPLICATION takes precedence and the drag will only go to visible
     * windows from the same application.
     */
    @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
    public static final int DRAG_FLAG_GLOBAL_SAME_APPLICATION = 1 << 12;
    /**
@@ -5632,7 +5630,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * size or windowing mode. If the system does not launch the intent, it will be canceled via the
     * normal drag and drop flow.
     */
    @FlaggedApi(FLAG_DELEGATE_UNHANDLED_DRAGS)
    public static final int DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG = 1 << 13;
    /**
@@ -29590,7 +29587,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        if (data != null) {
            if (com.android.window.flags.Flags.delegateUnhandledDrags()) {
            data.prepareToLeaveProcess(
                    (flags & (DRAG_FLAG_GLOBAL_SAME_APPLICATION | DRAG_FLAG_GLOBAL)) != 0);
            if ((flags & DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG) != 0) {
@@ -29602,9 +29598,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                            + "contains non-activity PendingIntents");
                }
            }
            } else {
                data.prepareToLeaveProcess((flags & DRAG_FLAG_GLOBAL) != 0);
            }
        }
        Rect bounds = new Rect();
+0 −9
Original line number Diff line number Diff line
@@ -112,15 +112,6 @@ flag {
    is_fixed_read_only: true
}

flag {
    name: "delegate_unhandled_drags"
    is_exported: true
    namespace: "multitasking"
    description: "Enables delegating unhandled drags to SystemUI"
    bug: "320797628"
    is_fixed_read_only: true
}

flag {
    name: "supports_drag_assistant_to_multiwindow"
    is_exported: true
+1 −2
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ public class DragUtils {
            // Clip data contains an app drag initiated from SysUI, handle it
            return true;
        }
        if (com.android.window.flags.Flags.delegateUnhandledDrags()
                && getLaunchIntent(event) != null) {
        if (getLaunchIntent(event) != null) {
            // Clip data contains a launchable intent drag, handle it
            return true;
        }
Loading