Merge "Remove references to hidden APIs from public Javadoc" into sc-dev

This commit is contained in:
Tiger Huang
2021-01-28 17:05:31 +00:00
committed by Android (Google) Code Review
6 changed files with 32 additions and 33 deletions

View File

@@ -240,7 +240,7 @@ public final class WindowInsets {
/** /**
* Creates a indexOf(type) -> inset map for which the {@code insets} is just mapped to * Creates a indexOf(type) -> inset map for which the {@code insets} is just mapped to
* {@link InsetsType#statusBars()} and {@link InsetsType#navigationBars()}, depending on the * {@link Type#statusBars()} and {@link Type#navigationBars()}, depending on the
* location of the inset. * location of the inset.
*/ */
private static Insets[] createCompatTypeMap(@Nullable Rect insets) { private static Insets[] createCompatTypeMap(@Nullable Rect insets) {
@@ -321,9 +321,9 @@ public final class WindowInsets {
/** /**
* Returns the insets of a specific set of windows causing insets, denoted by the * Returns the insets of a specific set of windows causing insets, denoted by the
* {@code typeMask} bit mask of {@link InsetsType}s. * {@code typeMask} bit mask of {@link Type}s.
* *
* @param typeMask Bit mask of {@link InsetsType}s to query the insets for. * @param typeMask Bit mask of {@link Type}s to query the insets for.
* @return The insets. * @return The insets.
*/ */
@NonNull @NonNull
@@ -333,7 +333,7 @@ public final class WindowInsets {
/** /**
* Returns the insets a specific set of windows can cause, denoted by the * Returns the insets a specific set of windows can cause, denoted by the
* {@code typeMask} bit mask of {@link InsetsType}s, regardless of whether that type is * {@code typeMask} bit mask of {@link Type}s, regardless of whether that type is
* currently visible or not. * currently visible or not.
* *
* <p>The insets represents the area of a a window that that <b>may</b> be partially * <p>The insets represents the area of a a window that that <b>may</b> be partially
@@ -342,7 +342,7 @@ public final class WindowInsets {
* normally shown, but temporarily hidden, the inset returned here will still provide the inset * normally shown, but temporarily hidden, the inset returned here will still provide the inset
* associated with the status bar being shown.</p> * associated with the status bar being shown.</p>
* *
* @param typeMask Bit mask of {@link InsetsType}s to query the insets for. * @param typeMask Bit mask of {@link Type}s to query the insets for.
* @return The insets. * @return The insets.
* *
* @throws IllegalArgumentException If the caller tries to query {@link Type#ime()}. Insets are * @throws IllegalArgumentException If the caller tries to query {@link Type#ime()}. Insets are
@@ -362,7 +362,7 @@ public final class WindowInsets {
* Returns whether a set of windows that may cause insets is currently visible on screen, * Returns whether a set of windows that may cause insets is currently visible on screen,
* regardless of whether it actually overlaps with this window. * regardless of whether it actually overlaps with this window.
* *
* @param typeMask Bit mask of {@link Type.InsetsType}s to query visibility status. * @param typeMask Bit mask of {@link Type}s to query visibility status.
* @return {@code true} if and only if all windows included in {@code typeMask} are currently * @return {@code true} if and only if all windows included in {@code typeMask} are currently
* visible on screen. * visible on screen.
*/ */
@@ -1148,7 +1148,7 @@ public final class WindowInsets {
* *
* @see #getInsets(int) * @see #getInsets(int)
* *
* @param typeMask The bitmask of {@link InsetsType} to set the insets for. * @param typeMask The bitmask of {@link Type} to set the insets for.
* @param insets The insets to set. * @param insets The insets to set.
* *
* @return itself * @return itself
@@ -1172,7 +1172,7 @@ public final class WindowInsets {
* *
* @see #getInsetsIgnoringVisibility(int) * @see #getInsetsIgnoringVisibility(int)
* *
* @param typeMask The bitmask of {@link InsetsType} to set the insets for. * @param typeMask The bitmask of {@link Type} to set the insets for.
* @param insets The insets to set. * @param insets The insets to set.
* *
* @return itself * @return itself
@@ -1201,7 +1201,7 @@ public final class WindowInsets {
* *
* @see #isVisible(int) * @see #isVisible(int)
* *
* @param typeMask The bitmask of {@link InsetsType} to set the visibility for. * @param typeMask The bitmask of {@link Type} to set the visibility for.
* @param visible Whether to mark the windows as visible or not. * @param visible Whether to mark the windows as visible or not.
* *
* @return itself * @return itself

View File

@@ -61,7 +61,7 @@ public final class WindowInsetsAnimation {
} }
/** /**
* @return The bitmask of {@link WindowInsets.Type.InsetsType}s that are animating. * @return The bitmask of {@link WindowInsets.Type}s that are animating.
*/ */
@WindowInsets.Type.InsetsType @WindowInsets.Type.InsetsType
public int getTypeMask() { public int getTypeMask() {
@@ -140,7 +140,7 @@ public final class WindowInsetsAnimation {
} }
/** /**
* Set fraction of the progress if {@link WindowInsets.Type.InsetsType} animation is * Set fraction of the progress if {@link WindowInsets.Type} animation is
* controlled by the app. * controlled by the app.
* <p> * <p>
* Note: This should only be used for testing, as the system fills in the fraction for the * Note: This should only be used for testing, as the system fills in the fraction for the
@@ -159,7 +159,7 @@ public final class WindowInsetsAnimation {
/** /**
* Retrieves the translucency of the windows that are animating. * Retrieves the translucency of the windows that are animating.
* *
* @return Alpha of windows that cause insets of type {@link WindowInsets.Type.InsetsType}. * @return Alpha of windows that cause insets of type {@link WindowInsets.Type}.
*/ */
@FloatRange(from = 0f, to = 1f) @FloatRange(from = 0f, to = 1f)
public float getAlpha() { public float getAlpha() {
@@ -174,8 +174,7 @@ public final class WindowInsetsAnimation {
* {@link WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)} is being * {@link WindowInsetsAnimationController#setInsetsAndAlpha(Insets, float, float)} is being
* used. * used.
* </p> * </p>
* @param alpha Alpha of windows that cause insets of type * @param alpha Alpha of windows that cause insets of type {@link WindowInsets.Type}.
* {@link WindowInsets.Type.InsetsType}.
* @see #getAlpha() * @see #getAlpha()
*/ */
public void setAlpha(@FloatRange(from = 0f, to = 1f) float alpha) { public void setAlpha(@FloatRange(from = 0f, to = 1f) float alpha) {

View File

@@ -46,8 +46,8 @@ public interface WindowInsetsAnimationControlListener {
* to redraw because of an {@link EditorInfo} change, or when the window is starting up. * to redraw because of an {@link EditorInfo} change, or when the window is starting up.
* *
* @param controller The controller to control the inset animation. * @param controller The controller to control the inset animation.
* @param types The {@link InsetsType}s it was able to gain control over. Note that this may be * @param types The {@link WindowInsets.Type}s it was able to gain control over. Note that this
* different than the types passed into * may be different than the types passed into
* {@link WindowInsetsController#controlWindowInsetsAnimation} in case the window * {@link WindowInsetsController#controlWindowInsetsAnimation} in case the window
* wasn't able to gain the controls because it wasn't the IME target or not * wasn't able to gain the controls because it wasn't the IME target or not
* currently the window that's controlling the system bars. * currently the window that's controlling the system bars.

View File

@@ -99,7 +99,7 @@ public interface WindowInsetsAnimationController {
float getCurrentAlpha(); float getCurrentAlpha();
/** /**
* @return The {@link InsetsType}s this object is currently controlling. * @return The {@link WindowInsets.Type}s this object is currently controlling.
*/ */
@InsetsType int getTypes(); @InsetsType int getTypes();

View File

@@ -142,7 +142,7 @@ public interface WindowInsetsController {
* change as soon as the window gains control. The app can listen to the event by observing * change as soon as the window gains control. The app can listen to the event by observing
* {@link View#onApplyWindowInsets} and checking visibility with {@link WindowInsets#isVisible}. * {@link View#onApplyWindowInsets} and checking visibility with {@link WindowInsets#isVisible}.
* *
* @param types A bitmask of {@link InsetsType} specifying what windows the app * @param types A bitmask of {@link WindowInsets.Type} specifying what windows the app
* would like to make appear on screen. * would like to make appear on screen.
*/ */
void show(@InsetsType int types); void show(@InsetsType int types);
@@ -154,7 +154,7 @@ public interface WindowInsetsController {
* change as soon as the window gains control. The app can listen to the event by observing * change as soon as the window gains control. The app can listen to the event by observing
* {@link View#onApplyWindowInsets} and checking visibility with {@link WindowInsets#isVisible}. * {@link View#onApplyWindowInsets} and checking visibility with {@link WindowInsets#isVisible}.
* *
* @param types A bitmask of {@link InsetsType} specifying what windows the app * @param types A bitmask of {@link WindowInsets.Type} specifying what windows the app
* would like to make disappear. * would like to make disappear.
*/ */
void hide(@InsetsType int types); void hide(@InsetsType int types);
@@ -163,7 +163,7 @@ public interface WindowInsetsController {
* Lets the application control window inset animations in a frame-by-frame manner by modifying * Lets the application control window inset animations in a frame-by-frame manner by modifying
* the position of the windows in the system causing insets directly. * the position of the windows in the system causing insets directly.
* *
* @param types The {@link InsetsType}s the application has requested to control. * @param types The {@link WindowInsets.Type}s the application has requested to control.
* @param durationMillis Duration of animation in * @param durationMillis Duration of animation in
* {@link java.util.concurrent.TimeUnit#MILLISECONDS}, or -1 if the * {@link java.util.concurrent.TimeUnit#MILLISECONDS}, or -1 if the
* animation doesn't have a predetermined duration. This value will be * animation doesn't have a predetermined duration. This value will be
@@ -199,7 +199,7 @@ public interface WindowInsetsController {
* setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS) * setSystemBarsAppearance(0, APPEARANCE_LIGHT_STATUS_BARS)
* </pre> * </pre>
* *
* @param appearance Bitmask of {@link Appearance} flags. * @param appearance Bitmask of appearance flags.
* @param mask Specifies which flags of appearance should be changed. * @param mask Specifies which flags of appearance should be changed.
* @see #getSystemBarsAppearance * @see #getSystemBarsAppearance
*/ */
@@ -280,11 +280,11 @@ public interface WindowInsetsController {
@NonNull OnControllableInsetsChangedListener listener); @NonNull OnControllableInsetsChangedListener listener);
/** /**
* Listener to be notified when the set of controllable {@link InsetsType} controlled by a * Listener to be notified when the set of controllable {@link WindowInsets.Type} controlled by
* {@link WindowInsetsController} changes. * a {@link WindowInsetsController} changes.
* <p> * <p>
* Once a {@link InsetsType} becomes controllable, the app will be able to control the window * Once a {@link WindowInsets.Type} becomes controllable, the app will be able to control the
* that is causing this type of insets by calling {@link #controlWindowInsetsAnimation}. * window that is causing this type of insets by calling {@link #controlWindowInsetsAnimation}.
* <p> * <p>
* Note: When listening to controllability of the {@link Type#ime}, * Note: When listening to controllability of the {@link Type#ime},
* {@link #controlWindowInsetsAnimation} may still fail in case the {@link InputMethodService} * {@link #controlWindowInsetsAnimation} may still fail in case the {@link InputMethodService}
@@ -297,12 +297,12 @@ public interface WindowInsetsController {
interface OnControllableInsetsChangedListener { interface OnControllableInsetsChangedListener {
/** /**
* Called when the set of controllable {@link InsetsType} changes. * Called when the set of controllable {@link WindowInsets.Type} changes.
* *
* @param controller The controller for which the set of controllable {@link InsetsType}s * @param controller The controller for which the set of controllable
* are changing. * {@link WindowInsets.Type}s are changing.
* @param typeMask Bitwise type-mask of the {@link InsetsType}s the controller is currently * @param typeMask Bitwise type-mask of the {@link WindowInsets.Type}s the controller is
* able to control. * currently able to control.
*/ */
void onControllableInsetsChanged(@NonNull WindowInsetsController controller, void onControllableInsetsChanged(@NonNull WindowInsetsController controller,
@InsetsType int typeMask); @InsetsType int typeMask);

View File

@@ -3326,8 +3326,8 @@ public interface WindowManager extends ViewManager {
/** /**
* Specifies types of insets that this window should avoid overlapping during layout. * Specifies types of insets that this window should avoid overlapping during layout.
* *
* @param types which types of insets that this window should avoid. The initial value of * @param types which {@link WindowInsets.Type}s of insets that this window should avoid.
* this object includes all system bars. * The initial value of this object includes all system bars.
*/ */
public void setFitInsetsTypes(@InsetsType int types) { public void setFitInsetsTypes(@InsetsType int types) {
mFitInsetsTypes = types; mFitInsetsTypes = types;
@@ -3401,7 +3401,7 @@ public interface WindowManager extends ViewManager {
} }
/** /**
* @return the insets types that this window is avoiding overlapping. * @return the {@link WindowInsets.Type}s that this window is avoiding overlapping.
*/ */
public @InsetsType int getFitInsetsTypes() { public @InsetsType int getFitInsetsTypes() {
return mFitInsetsTypes; return mFitInsetsTypes;