Loading api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -1609,7 +1609,7 @@ package android { field public static final int windowShowWallpaper = 16843410; // 0x1010292 field public static final int windowSoftInputMode = 16843307; // 0x101022b field public static final int windowSplashscreenContent = 16844132; // 0x1010564 field public static final int windowSwipeToDismiss = 16843763; // 0x10103f3 field @Deprecated public static final int windowSwipeToDismiss = 16843763; // 0x10103f3 field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleStyle = 16842843; // 0x101005b Loading Loading @@ -52078,7 +52078,7 @@ package android.view { field public static final int FEATURE_OPTIONS_PANEL = 0; // 0x0 field @Deprecated public static final int FEATURE_PROGRESS = 2; // 0x2 field public static final int FEATURE_RIGHT_ICON = 4; // 0x4 field public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb field @Deprecated public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb field public static final int ID_ANDROID_CONTENT = 16908290; // 0x1020002 field public static final String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = "android:navigation:background"; field @Deprecated public static final int PROGRESS_END = 10000; // 0x2710 core/java/android/app/Dialog.java +0 −8 Original line number Diff line number Diff line Loading @@ -219,7 +219,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable Message cancelCallback) { this(context); mCancelable = cancelable; updateWindowForCancelable(); mCancelMessage = cancelCallback; } Loading @@ -227,7 +226,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable OnCancelListener cancelListener) { this(context); mCancelable = cancelable; updateWindowForCancelable(); setOnCancelListener(cancelListener); } Loading Loading @@ -1249,7 +1247,6 @@ public class Dialog implements DialogInterface, Window.Callback, */ public void setCancelable(boolean flag) { mCancelable = flag; updateWindowForCancelable(); } /** Loading @@ -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); Loading Loading @@ -1415,8 +1411,4 @@ public class Dialog implements DialogInterface, Window.Callback, } } } private void updateWindowForCancelable() { mWindow.setCloseOnSwipeEnabled(mCancelable); } } core/java/android/content/pm/ActivityInfo.java +1 −5 Original line number Diff line number Diff line Loading @@ -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; } /** Loading core/java/android/view/Window.java +3 −17 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -2521,23 +2524,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() Loading core/java/com/android/internal/policy/PhoneWindow.java +1 −80 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; Loading Loading @@ -112,7 +111,6 @@ import com.android.internal.view.menu.MenuHelper; import com.android.internal.view.menu.MenuPresenter; import com.android.internal.view.menu.MenuView; import com.android.internal.widget.DecorContentParent; import com.android.internal.widget.SwipeDismissLayout; import java.lang.ref.WeakReference; import java.util.ArrayList; Loading Loading @@ -378,15 +376,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { removeFeature(FEATURE_ACTION_BAR); } if ((features & (1 << FEATURE_ACTION_BAR)) != 0 && featureId == FEATURE_SWIPE_TO_DISMISS) { throw new AndroidRuntimeException( "You cannot combine swipe dismissal and the action bar."); } if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0 && featureId == FEATURE_ACTION_BAR) { throw new AndroidRuntimeException( "You cannot combine swipe dismissal and the action bar."); } if (featureId == FEATURE_INDETERMINATE_PROGRESS && getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { throw new AndroidRuntimeException("You cannot use indeterminate progress on a watch."); Loading Loading @@ -2373,10 +2362,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { requestFeature(FEATURE_ACTION_MODE_OVERLAY); } if (a.getBoolean(R.styleable.Window_windowSwipeToDismiss, false)) { requestFeature(FEATURE_SWIPE_TO_DISMISS); } if (a.getBoolean(R.styleable.Window_windowFullscreen, false)) { setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN & (~getForcedWindowFlags())); } Loading Loading @@ -2565,10 +2550,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { int layoutResource; int features = getLocalFeatures(); // System.out.println("Features: 0x" + Integer.toHexString(features)); if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0) { layoutResource = R.layout.screen_swipe_dismiss; setCloseOnSwipeEnabled(true); } else if ((features & ((1 << FEATURE_LEFT_ICON) | (1 << FEATURE_RIGHT_ICON))) != 0) { if ((features & ((1 << FEATURE_LEFT_ICON) | (1 << FEATURE_RIGHT_ICON))) != 0) { if (mIsFloating) { TypedValue res = new TypedValue(); getContext().getTheme().resolveAttribute( Loading Loading @@ -2638,10 +2620,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0) { registerSwipeCallbacks(contentParent); } // Remaining setup -- of background and title -- that only applies // to top-level windows. if (getContainer() == null) { Loading Loading @@ -3047,63 +3025,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { return (mRightIconView = (ImageView)findViewById(R.id.right_icon)); } private void registerSwipeCallbacks(ViewGroup contentParent) { if (!(contentParent instanceof SwipeDismissLayout)) { Log.w(TAG, "contentParent is not a SwipeDismissLayout: " + contentParent); return; } SwipeDismissLayout swipeDismiss = (SwipeDismissLayout) contentParent; swipeDismiss.setOnDismissedListener(new SwipeDismissLayout.OnDismissedListener() { @Override public void onDismissed(SwipeDismissLayout layout) { dispatchOnWindowSwipeDismissed(); dispatchOnWindowDismissed(false /*finishTask*/, true /*suppressWindowTransition*/); } }); swipeDismiss.setOnSwipeProgressChangedListener( new SwipeDismissLayout.OnSwipeProgressChangedListener() { @Override public void onSwipeProgressChanged( SwipeDismissLayout layout, float alpha, float translate) { WindowManager.LayoutParams newParams = getAttributes(); newParams.x = (int) translate; newParams.alpha = alpha; setAttributes(newParams); int flags = 0; if (newParams.x == 0) { flags = FLAG_FULLSCREEN; } else { flags = FLAG_LAYOUT_NO_LIMITS; } setFlags(flags, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS); } @Override public void onSwipeCancelled(SwipeDismissLayout layout) { WindowManager.LayoutParams newParams = getAttributes(); // Swipe changes only affect the x-translation and alpha, check to see if // those values have changed first before resetting them. if (newParams.x != 0 || newParams.alpha != 1) { newParams.x = 0; newParams.alpha = 1; setAttributes(newParams); setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS); } } }); } /** @hide */ @Override public void setCloseOnSwipeEnabled(boolean closeOnSwipeEnabled) { if (hasFeature(Window.FEATURE_SWIPE_TO_DISMISS) // swipe-to-dismiss feature is requested && mContentParent instanceof SwipeDismissLayout) { // check casting mContentParent ((SwipeDismissLayout) mContentParent).setDismissable(closeOnSwipeEnabled); } super.setCloseOnSwipeEnabled(closeOnSwipeEnabled); } /** * Helper method for calling the {@link Callback#onPanelClosed(int, Menu)} * callback. This method will grab whatever extra state is needed for the Loading Loading
api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -1609,7 +1609,7 @@ package android { field public static final int windowShowWallpaper = 16843410; // 0x1010292 field public static final int windowSoftInputMode = 16843307; // 0x101022b field public static final int windowSplashscreenContent = 16844132; // 0x1010564 field public static final int windowSwipeToDismiss = 16843763; // 0x10103f3 field @Deprecated public static final int windowSwipeToDismiss = 16843763; // 0x10103f3 field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c field public static final int windowTitleSize = 16842842; // 0x101005a field public static final int windowTitleStyle = 16842843; // 0x101005b Loading Loading @@ -52078,7 +52078,7 @@ package android.view { field public static final int FEATURE_OPTIONS_PANEL = 0; // 0x0 field @Deprecated public static final int FEATURE_PROGRESS = 2; // 0x2 field public static final int FEATURE_RIGHT_ICON = 4; // 0x4 field public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb field @Deprecated public static final int FEATURE_SWIPE_TO_DISMISS = 11; // 0xb field public static final int ID_ANDROID_CONTENT = 16908290; // 0x1020002 field public static final String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME = "android:navigation:background"; field @Deprecated public static final int PROGRESS_END = 10000; // 0x2710
core/java/android/app/Dialog.java +0 −8 Original line number Diff line number Diff line Loading @@ -219,7 +219,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable Message cancelCallback) { this(context); mCancelable = cancelable; updateWindowForCancelable(); mCancelMessage = cancelCallback; } Loading @@ -227,7 +226,6 @@ public class Dialog implements DialogInterface, Window.Callback, @Nullable OnCancelListener cancelListener) { this(context); mCancelable = cancelable; updateWindowForCancelable(); setOnCancelListener(cancelListener); } Loading Loading @@ -1249,7 +1247,6 @@ public class Dialog implements DialogInterface, Window.Callback, */ public void setCancelable(boolean flag) { mCancelable = flag; updateWindowForCancelable(); } /** Loading @@ -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); Loading Loading @@ -1415,8 +1411,4 @@ public class Dialog implements DialogInterface, Window.Callback, } } } private void updateWindowForCancelable() { mWindow.setCloseOnSwipeEnabled(mCancelable); } }
core/java/android/content/pm/ActivityInfo.java +1 −5 Original line number Diff line number Diff line Loading @@ -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; } /** Loading
core/java/android/view/Window.java +3 −17 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -2521,23 +2524,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() Loading
core/java/com/android/internal/policy/PhoneWindow.java +1 −80 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; Loading Loading @@ -112,7 +111,6 @@ import com.android.internal.view.menu.MenuHelper; import com.android.internal.view.menu.MenuPresenter; import com.android.internal.view.menu.MenuView; import com.android.internal.widget.DecorContentParent; import com.android.internal.widget.SwipeDismissLayout; import java.lang.ref.WeakReference; import java.util.ArrayList; Loading Loading @@ -378,15 +376,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { removeFeature(FEATURE_ACTION_BAR); } if ((features & (1 << FEATURE_ACTION_BAR)) != 0 && featureId == FEATURE_SWIPE_TO_DISMISS) { throw new AndroidRuntimeException( "You cannot combine swipe dismissal and the action bar."); } if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0 && featureId == FEATURE_ACTION_BAR) { throw new AndroidRuntimeException( "You cannot combine swipe dismissal and the action bar."); } if (featureId == FEATURE_INDETERMINATE_PROGRESS && getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { throw new AndroidRuntimeException("You cannot use indeterminate progress on a watch."); Loading Loading @@ -2373,10 +2362,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { requestFeature(FEATURE_ACTION_MODE_OVERLAY); } if (a.getBoolean(R.styleable.Window_windowSwipeToDismiss, false)) { requestFeature(FEATURE_SWIPE_TO_DISMISS); } if (a.getBoolean(R.styleable.Window_windowFullscreen, false)) { setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN & (~getForcedWindowFlags())); } Loading Loading @@ -2565,10 +2550,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { int layoutResource; int features = getLocalFeatures(); // System.out.println("Features: 0x" + Integer.toHexString(features)); if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0) { layoutResource = R.layout.screen_swipe_dismiss; setCloseOnSwipeEnabled(true); } else if ((features & ((1 << FEATURE_LEFT_ICON) | (1 << FEATURE_RIGHT_ICON))) != 0) { if ((features & ((1 << FEATURE_LEFT_ICON) | (1 << FEATURE_RIGHT_ICON))) != 0) { if (mIsFloating) { TypedValue res = new TypedValue(); getContext().getTheme().resolveAttribute( Loading Loading @@ -2638,10 +2620,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } } if ((features & (1 << FEATURE_SWIPE_TO_DISMISS)) != 0) { registerSwipeCallbacks(contentParent); } // Remaining setup -- of background and title -- that only applies // to top-level windows. if (getContainer() == null) { Loading Loading @@ -3047,63 +3025,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { return (mRightIconView = (ImageView)findViewById(R.id.right_icon)); } private void registerSwipeCallbacks(ViewGroup contentParent) { if (!(contentParent instanceof SwipeDismissLayout)) { Log.w(TAG, "contentParent is not a SwipeDismissLayout: " + contentParent); return; } SwipeDismissLayout swipeDismiss = (SwipeDismissLayout) contentParent; swipeDismiss.setOnDismissedListener(new SwipeDismissLayout.OnDismissedListener() { @Override public void onDismissed(SwipeDismissLayout layout) { dispatchOnWindowSwipeDismissed(); dispatchOnWindowDismissed(false /*finishTask*/, true /*suppressWindowTransition*/); } }); swipeDismiss.setOnSwipeProgressChangedListener( new SwipeDismissLayout.OnSwipeProgressChangedListener() { @Override public void onSwipeProgressChanged( SwipeDismissLayout layout, float alpha, float translate) { WindowManager.LayoutParams newParams = getAttributes(); newParams.x = (int) translate; newParams.alpha = alpha; setAttributes(newParams); int flags = 0; if (newParams.x == 0) { flags = FLAG_FULLSCREEN; } else { flags = FLAG_LAYOUT_NO_LIMITS; } setFlags(flags, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS); } @Override public void onSwipeCancelled(SwipeDismissLayout layout) { WindowManager.LayoutParams newParams = getAttributes(); // Swipe changes only affect the x-translation and alpha, check to see if // those values have changed first before resetting them. if (newParams.x != 0 || newParams.alpha != 1) { newParams.x = 0; newParams.alpha = 1; setAttributes(newParams); setFlags(FLAG_FULLSCREEN, FLAG_FULLSCREEN | FLAG_LAYOUT_NO_LIMITS); } } }); } /** @hide */ @Override public void setCloseOnSwipeEnabled(boolean closeOnSwipeEnabled) { if (hasFeature(Window.FEATURE_SWIPE_TO_DISMISS) // swipe-to-dismiss feature is requested && mContentParent instanceof SwipeDismissLayout) { // check casting mContentParent ((SwipeDismissLayout) mContentParent).setDismissable(closeOnSwipeEnabled); } super.setCloseOnSwipeEnabled(closeOnSwipeEnabled); } /** * Helper method for calling the {@link Callback#onPanelClosed(int, Menu)} * callback. This method will grab whatever extra state is needed for the Loading