diff options
| author | Jorim Jaggi <jjaggi@google.com> | 2019-10-25 14:35:10 +0200 |
|---|---|---|
| committer | Jorim Jaggi <jjaggi@google.com> | 2019-11-05 19:14:54 +0100 |
| commit | e06b1fd0f57fb593db53daea0b4e8cad70d1f217 (patch) | |
| tree | 8da0aada387017f5153df9b80dcb3127eafa5f79 /core/java/android | |
| parent | 5a89f1a03089a52c40a3c05a1e51568b34dfa86d (diff) | |
Remove FEATURE_SWIPE_TO_DISMISS functionality
Not used anymore by any product.
Bug: 143346248
Test: Boots
Change-Id: I21286e62f73ec34f7d5ca040cd614838c9cd4276
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/Dialog.java | 8 | ||||
| -rw-r--r-- | core/java/android/content/pm/ActivityInfo.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/Window.java | 20 |
3 files changed, 4 insertions, 30 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index 088c245c9c2c..39f1e957cbfb 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -219,7 +219,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable Message cancelCallback) { this(context); mCancelable = cancelable; - updateWindowForCancelable(); mCancelMessage = cancelCallback; } @@ -227,7 +226,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable OnCancelListener cancelListener) { this(context); mCancelable = cancelable; - updateWindowForCancelable(); setOnCancelListener(cancelListener); } @@ -1249,7 +1247,6 @@ public class Dialog implements DialogInterface, Window.Callback, */ public void setCancelable(boolean flag) { mCancelable = flag; - updateWindowForCancelable(); } /** @@ -1263,7 +1260,6 @@ public class Dialog implements DialogInterface, Window.Callback, public void setCanceledOnTouchOutside(boolean cancel) { if (cancel && !mCancelable) { mCancelable = true; - updateWindowForCancelable(); } mWindow.setCloseOnTouchOutside(cancel); @@ -1415,8 +1411,4 @@ public class Dialog implements DialogInterface, Window.Callback, } } } - - private void updateWindowForCancelable() { - mWindow.setCloseOnSwipeEnabled(mCancelable); - } } diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java index 415c2428405f..1e4cc38030cb 100644 --- a/core/java/android/content/pm/ActivityInfo.java +++ b/core/java/android/content/pm/ActivityInfo.java @@ -1242,15 +1242,11 @@ public class ActivityInfo extends ComponentInfo implements Parcelable { final boolean isTranslucent = attributes.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent, false); - final boolean isSwipeToDismiss = !attributes.hasValue( - com.android.internal.R.styleable.Window_windowIsTranslucent) - && attributes.getBoolean( - com.android.internal.R.styleable.Window_windowSwipeToDismiss, false); final boolean isFloating = attributes.getBoolean(com.android.internal.R.styleable.Window_windowIsFloating, false); - return isFloating || isTranslucent || isSwipeToDismiss; + return isFloating || isTranslucent; } /** diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java index 73e0e4b2eb8b..d1a58553c29c 100644 --- a/core/java/android/view/Window.java +++ b/core/java/android/view/Window.java @@ -127,7 +127,10 @@ public abstract class Window { public static final int FEATURE_ACTION_MODE_OVERLAY = 10; /** * Flag for requesting a decoration-free window that is dismissed by swiping from the left. + * + * @deprecated Swipe-to-dismiss isn't functional anymore. */ + @Deprecated public static final int FEATURE_SWIPE_TO_DISMISS = 11; /** * Flag for requesting that window content changes should be animated using a @@ -2512,23 +2515,6 @@ public abstract class Window { public abstract void reportActivityRelaunched(); /** - * Called to set flag to check if the close on swipe is enabled. This will only function if - * FEATURE_SWIPE_TO_DISMISS has been set. - * @hide - */ - public void setCloseOnSwipeEnabled(boolean closeOnSwipeEnabled) { - mCloseOnSwipeEnabled = closeOnSwipeEnabled; - } - - /** - * @return {@code true} if the close on swipe is enabled. - * @hide - */ - public boolean isCloseOnSwipeEnabled() { - return mCloseOnSwipeEnabled; - } - - /** * @return The {@link WindowInsetsController} associated with this window * @see View#getWindowInsetsController() * @hide pending unhide |
