compat/src/main/java/androidx/core/view/ViewCompat.java
public static WindowInsetsCompat onApplyWindowInsets(@NonNull View view,
            WindowInsetsCompat insets) {
        if (Build.VERSION.SDK_INT >= 21) {
            WindowInsets unwrapped = (WindowInsets)  WindowInsetsCompat.unwrap(insets);
            WindowInsets result = view.onApplyWindowInsets(unwrapped);
            if (result != unwrapped) {
                unwrapped = new WindowInsets(result);
            }
            return WindowInsetsCompat.wrap(unwrapped);
        }
        return insets;
    }
/**
     * Called when the view should apply {@link WindowInsetsCompat} according to its internal policy.
     *
     * <p>Clients may supply an {@link OnApplyWindowInsetsListener} to a view. If one is set
     * it will be called during dispatch instead of this method. The listener may optionally
     * call this method from its own implementation if it wishes to apply the view's default
     * insets policy in addition to its own.</p>
     *
     * @param view The View against which to invoke the method.
     * @param insets Insets to apply
     * @return The supplied insets with any applied insets consumed
     */
Called when the view should apply  WindowInsetsCompat according to its internal policy.
Clients may supply an  OnApplyWindowInsetsListener to a view. If one is set
it will be called during dispatch instead of this method. The listener may optionally
call this method from its own implementation if it wishes to apply the view's default
insets policy in addition to its own.

@param view The View against which to invoke the method.
@param insets Insets to apply
@return The supplied insets with any applied insets consumed
Called when the view should apply WindowInsetsCompat according to its internal policy . Clients may supply an OnApplyWindowInsetsListener to a view . If one is set it will be called during dispatch instead of this method . The listener may optionally call this method from its own implementation if it wishes to apply the view ' s default insets policy in addition to its own . @param view The View against which to invoke the method . @param insets Insets to apply @return The supplied insets with any applied insets consumed
public static WindowInsetsCompat onApplyWindowInsets(@NonNull View view,
            WindowInsetsCompat insets) {
        if (Build.VERSION.SDK_INT >= 21) {
            WindowInsets unwrapped = (WindowInsets)  WindowInsetsCompat.unwrap(insets);
            WindowInsets result = view.onApplyWindowInsets(unwrapped);
            if (result != unwrapped) {
                unwrapped = new WindowInsets(result);
            }
            return WindowInsetsCompat.wrap(unwrapped);
        }
        return insets;
    }
public static WindowInsetsCompat onApplyWindowInsets ( @ NonNull View view , WindowInsetsCompat insets ) { if ( Build . VERSION . SDK_INT >= 21 ) { WindowInsets unwrapped = ( WindowInsets ) WindowInsetsCompat . unwrap ( insets ) ; WindowInsets result = view . onApplyWindowInsets ( unwrapped ) ; if ( result != unwrapped ) { unwrapped = new WindowInsets ( result ) ; } return WindowInsetsCompat . wrap ( unwrapped ) ; } return insets ; }
Called when the view should apply {@link WindowInsetsCompat} according to its internal policy.
Called when the view should apply { @link WindowInsetsCompat } according to its internal policy .