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

Commit 8f923981 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update desired heights docs based on feedback from CL after it was submitted"

parents 9db25fcf 8a529e22
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5480,7 +5480,7 @@ package android.app {
    method public int describeContents();
    method public boolean getAutoExpandBubble();
    method @Nullable public android.app.PendingIntent getDeleteIntent();
    method public int getDesiredHeight();
    method @Dimension(unit=android.annotation.Dimension.DP) public int getDesiredHeight();
    method @DimenRes public int getDesiredHeightResId();
    method @NonNull public android.graphics.drawable.Icon getIcon();
    method @NonNull public android.app.PendingIntent getIntent();
@@ -5494,7 +5494,7 @@ package android.app {
    method @NonNull public android.app.Notification.BubbleMetadata build();
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setAutoExpandBubble(boolean);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setDeleteIntent(@Nullable android.app.PendingIntent);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setDesiredHeight(int);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setDesiredHeight(@Dimension(unit=android.annotation.Dimension.DP) int);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setDesiredHeightResId(@DimenRes int);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setIcon(@NonNull android.graphics.drawable.Icon);
    method @NonNull public android.app.Notification.BubbleMetadata.Builder setIntent(@NonNull android.app.PendingIntent);
+8 −3
Original line number Diff line number Diff line
@@ -16,12 +16,14 @@

package android.app;

import static android.annotation.Dimension.DP;
import static android.graphics.drawable.Icon.TYPE_BITMAP;

import static com.android.internal.util.ContrastColorUtil.satisfiesTextContrast;

import android.annotation.ColorInt;
import android.annotation.DimenRes;
import android.annotation.Dimension;
import android.annotation.DrawableRes;
import android.annotation.IdRes;
import android.annotation.IntDef;
@@ -8594,15 +8596,18 @@ public class Notification implements Parcelable

        /**
         * @return the ideal height, in DPs, for the floating window that app content defined by
         * {@link #getIntent()} for this bubble.
         * {@link #getIntent()} for this bubble. A value of 0 indicates a desired height has not
         * been set.
         */
        @Dimension(unit = DP)
        public int getDesiredHeight() {
            return mDesiredHeight;
        }

        /**
         * @return the resId of ideal height for the floating window that app content defined by
         * {@link #getIntent()} for this bubble.
         * {@link #getIntent()} for this bubble. A value of 0 indicates a res value has not
         * been provided for the desired height.
         */
        @DimenRes
        public int getDesiredHeightResId() {
@@ -8733,7 +8738,7 @@ public class Notification implements Parcelable
             * be used instead.
             */
            @NonNull
            public BubbleMetadata.Builder setDesiredHeight(int height) {
            public BubbleMetadata.Builder setDesiredHeight(@Dimension(unit = DP) int height) {
                mDesiredHeight = Math.max(height, 0);
                mDesiredHeightResId = 0;
                return this;