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

Commit 8e59ca9a authored by Vadim Caen's avatar Vadim Caen Committed by Android (Google) Code Review
Browse files

Merge "Save the OnBackInvokedCallback in WindowState"

parents 63827d96 717e53a6
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -4069,7 +4069,7 @@ package android.app {
    method public int getMaxNumPictureInPictureActions();
    method public final android.media.session.MediaController getMediaController();
    method @NonNull public android.view.MenuInflater getMenuInflater();
    method @Nullable public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method @NonNull public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method public final android.app.Activity getParent();
    method @Nullable public android.content.Intent getParentActivityIntent();
    method public android.content.SharedPreferences getPreferences(int);
@@ -4970,7 +4970,7 @@ package android.app {
    method @NonNull @UiContext public final android.content.Context getContext();
    method @Nullable public android.view.View getCurrentFocus();
    method @NonNull public android.view.LayoutInflater getLayoutInflater();
    method @Nullable public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method @NonNull public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method @Nullable public final android.app.Activity getOwnerActivity();
    method @Nullable public final android.view.SearchEvent getSearchEvent();
    method public final int getVolumeControlStream();
@@ -48903,7 +48903,7 @@ package android.view {
  }
  public interface OnBackInvokedDispatcherOwner {
    method @Nullable public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method @NonNull public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
  }
  public interface OnReceiveContentListener {
@@ -49331,7 +49331,7 @@ package android.view {
    field @NonNull public static final android.os.Parcelable.Creator<android.view.VerifiedMotionEvent> CREATOR;
  }
  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback android.view.OnBackInvokedDispatcherOwner {
  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
    ctor public View(android.content.Context);
    ctor public View(android.content.Context, @Nullable android.util.AttributeSet);
    ctor public View(android.content.Context, @Nullable android.util.AttributeSet, int);
@@ -49535,7 +49535,6 @@ package android.view {
    method @IdRes public int getNextFocusLeftId();
    method @IdRes public int getNextFocusRightId();
    method @IdRes public int getNextFocusUpId();
    method @Nullable public android.view.OnBackInvokedDispatcher getOnBackInvokedDispatcher();
    method public android.view.View.OnFocusChangeListener getOnFocusChangeListener();
    method @ColorInt public int getOutlineAmbientShadowColor();
    method public android.view.ViewOutlineProvider getOutlineProvider();
+1 −1
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ package android.util {

package android.view {

  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback android.view.OnBackInvokedDispatcherOwner {
  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
    method protected void initializeFadingEdge(android.content.res.TypedArray);
    method protected void initializeScrollbars(android.content.res.TypedArray);
  }
+1 −1
Original line number Diff line number Diff line
@@ -2816,7 +2816,7 @@ package android.view {
    method public void setView(@NonNull android.view.View, @NonNull android.view.WindowManager.LayoutParams);
  }

  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback android.view.OnBackInvokedDispatcherOwner {
  @UiThread public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
    method public android.view.View getTooltipView();
    method public boolean isAutofilled();
    method public static boolean isDefaultFocusHighlightEnabled();
+6 −8
Original line number Diff line number Diff line
@@ -8746,17 +8746,15 @@ public class Activity extends ContextThemeWrapper
     * Returns the {@link OnBackInvokedDispatcher} instance associated with the window that this
     * activity is attached to.
     *
     * Returns null if the activity is not attached to a window with a decor.
     * @throws IllegalStateException if this Activity is not visual.
     */
    @Nullable
    @NonNull
    @Override
    public OnBackInvokedDispatcher getOnBackInvokedDispatcher() {
        if (mWindow != null) {
            View decorView = mWindow.getDecorView();
            if (decorView != null) {
                return decorView.getOnBackInvokedDispatcher();
        if (mWindow == null) {
            throw new IllegalStateException("OnBackInvokedDispatcher are not available on "
                    + "non-visual activities");
        }
        }
        return null;
        return ((OnBackInvokedDispatcherOwner) mWindow).getOnBackInvokedDispatcher();
    }
}
+2 −8
Original line number Diff line number Diff line
@@ -1449,15 +1449,9 @@ public class Dialog implements DialogInterface, Window.Callback,
     *
     * Returns null if the dialog is not attached to a window with a decor.
     */
    @Nullable
    @NonNull
    @Override
    public OnBackInvokedDispatcher getOnBackInvokedDispatcher() {
        if (mWindow != null) {
            View decorView = mWindow.getDecorView();
            if (decorView != null) {
                return decorView.getOnBackInvokedDispatcher();
            }
        }
        return null;
        return ((OnBackInvokedDispatcherOwner) mWindow).getOnBackInvokedDispatcher();
    }
}
Loading