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

Commit e7ac324c authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Revert "Handle case when snapshot dimensions don't match"" into oc-dev

parents c29dffed ba53d8ae
Loading
Loading
Loading
Loading
+7 −18
Original line number Original line Diff line number Diff line
@@ -4177,25 +4177,14 @@ public class Activity extends ContextThemeWrapper
                mTaskDescription.setPrimaryColor(colorPrimary);
                mTaskDescription.setPrimaryColor(colorPrimary);
            }
            }
        }
        }

        // For dev-preview only.
        if (mTaskDescription.getBackgroundColor() == 0) {
            int colorBackground = a.getColor(
            int colorBackground = a.getColor(
                    com.android.internal.R.styleable.ActivityTaskDescription_colorBackground, 0);
                    com.android.internal.R.styleable.ActivityTaskDescription_colorBackground, 0);
            if (colorBackground != 0 && Color.alpha(colorBackground) == 0xFF) {
            if (colorBackground != 0 && Color.alpha(colorBackground) == 0xFF) {
                mTaskDescription.setBackgroundColor(colorBackground);
                mTaskDescription.setBackgroundColor(colorBackground);
            }
            }

        final int statusBarColor = a.getColor(
                com.android.internal.R.styleable.ActivityTaskDescription_statusBarColor, 0);
        if (statusBarColor != 0) {
            mTaskDescription.setStatusBarColor(statusBarColor);
        }
        }

        final int navigationBarColor = a.getColor(
                com.android.internal.R.styleable.ActivityTaskDescription_navigationBarColor, 0);
        if (navigationBarColor != 0) {
            mTaskDescription.setNavigationBarColor(navigationBarColor);
        }

        a.recycle();
        a.recycle();
        setTaskDescription(mTaskDescription);
        setTaskDescription(mTaskDescription);
    }
    }
+6 −46
Original line number Original line Diff line number Diff line
@@ -1145,8 +1145,6 @@ public class ActivityManager {
        private String mIconFilename;
        private String mIconFilename;
        private int mColorPrimary;
        private int mColorPrimary;
        private int mColorBackground;
        private int mColorBackground;
        private int mStatusBarColor;
        private int mNavigationBarColor;


        /**
        /**
         * Creates the TaskDescription to the specified values.
         * Creates the TaskDescription to the specified values.
@@ -1157,7 +1155,7 @@ public class ActivityManager {
         *                     opaque.
         *                     opaque.
         */
         */
        public TaskDescription(String label, Bitmap icon, int colorPrimary) {
        public TaskDescription(String label, Bitmap icon, int colorPrimary) {
            this(label, icon, null, colorPrimary, 0, 0, 0);
            this(label, icon, null, colorPrimary, 0);
            if ((colorPrimary != 0) && (Color.alpha(colorPrimary) != 255)) {
            if ((colorPrimary != 0) && (Color.alpha(colorPrimary) != 255)) {
                throw new RuntimeException("A TaskDescription's primary color should be opaque");
                throw new RuntimeException("A TaskDescription's primary color should be opaque");
            }
            }
@@ -1170,7 +1168,7 @@ public class ActivityManager {
         * @param icon An icon that represents the current state of this activity.
         * @param icon An icon that represents the current state of this activity.
         */
         */
        public TaskDescription(String label, Bitmap icon) {
        public TaskDescription(String label, Bitmap icon) {
            this(label, icon, null, 0, 0, 0, 0);
            this(label, icon, null, 0, 0);
        }
        }


        /**
        /**
@@ -1179,26 +1177,24 @@ public class ActivityManager {
         * @param label A label and description of the current state of this activity.
         * @param label A label and description of the current state of this activity.
         */
         */
        public TaskDescription(String label) {
        public TaskDescription(String label) {
            this(label, null, null, 0, 0, 0, 0);
            this(label, null, null, 0, 0);
        }
        }


        /**
        /**
         * Creates an empty TaskDescription.
         * Creates an empty TaskDescription.
         */
         */
        public TaskDescription() {
        public TaskDescription() {
            this(null, null, null, 0, 0, 0, 0);
            this(null, null, null, 0, 0);
        }
        }


        /** @hide */
        /** @hide */
        public TaskDescription(String label, Bitmap icon, String iconFilename, int colorPrimary,
        public TaskDescription(String label, Bitmap icon, String iconFilename, int colorPrimary,
                int colorBackground, int statusBarColor, int navigationBarColor) {
                int colorBackground) {
            mLabel = label;
            mLabel = label;
            mIcon = icon;
            mIcon = icon;
            mIconFilename = iconFilename;
            mIconFilename = iconFilename;
            mColorPrimary = colorPrimary;
            mColorPrimary = colorPrimary;
            mColorBackground = colorBackground;
            mColorBackground = colorBackground;
            mStatusBarColor = statusBarColor;
            mNavigationBarColor = navigationBarColor;
        }
        }


        /**
        /**
@@ -1218,8 +1214,6 @@ public class ActivityManager {
            mIconFilename = other.mIconFilename;
            mIconFilename = other.mIconFilename;
            mColorPrimary = other.mColorPrimary;
            mColorPrimary = other.mColorPrimary;
            mColorBackground = other.mColorBackground;
            mColorBackground = other.mColorBackground;
            mStatusBarColor = other.mStatusBarColor;
            mNavigationBarColor = other.mNavigationBarColor;
        }
        }


        private TaskDescription(Parcel source) {
        private TaskDescription(Parcel source) {
@@ -1258,20 +1252,6 @@ public class ActivityManager {
            mColorBackground = backgroundColor;
            mColorBackground = backgroundColor;
        }
        }


        /**
         * @hide
         */
        public void setStatusBarColor(int statusBarColor) {
            mStatusBarColor = statusBarColor;
        }

        /**
         * @hide
         */
        public void setNavigationBarColor(int navigationBarColor) {
            mNavigationBarColor = navigationBarColor;
        }

        /**
        /**
         * Sets the icon for this task description.
         * Sets the icon for this task description.
         * @hide
         * @hide
@@ -1345,20 +1325,6 @@ public class ActivityManager {
            return mColorBackground;
            return mColorBackground;
        }
        }


        /**
         * @hide
         */
        public int getStatusBarColor() {
            return mStatusBarColor;
        }

        /**
         * @hide
         */
        public int getNavigationBarColor() {
            return mNavigationBarColor;
        }

        /** @hide */
        /** @hide */
        public void saveToXml(XmlSerializer out) throws IOException {
        public void saveToXml(XmlSerializer out) throws IOException {
            if (mLabel != null) {
            if (mLabel != null) {
@@ -1411,8 +1377,6 @@ public class ActivityManager {
            }
            }
            dest.writeInt(mColorPrimary);
            dest.writeInt(mColorPrimary);
            dest.writeInt(mColorBackground);
            dest.writeInt(mColorBackground);
            dest.writeInt(mStatusBarColor);
            dest.writeInt(mNavigationBarColor);
            if (mIconFilename == null) {
            if (mIconFilename == null) {
                dest.writeInt(0);
                dest.writeInt(0);
            } else {
            } else {
@@ -1426,8 +1390,6 @@ public class ActivityManager {
            mIcon = source.readInt() > 0 ? Bitmap.CREATOR.createFromParcel(source) : null;
            mIcon = source.readInt() > 0 ? Bitmap.CREATOR.createFromParcel(source) : null;
            mColorPrimary = source.readInt();
            mColorPrimary = source.readInt();
            mColorBackground = source.readInt();
            mColorBackground = source.readInt();
            mStatusBarColor = source.readInt();
            mNavigationBarColor = source.readInt();
            mIconFilename = source.readInt() > 0 ? source.readString() : null;
            mIconFilename = source.readInt() > 0 ? source.readString() : null;
        }
        }


@@ -1445,9 +1407,7 @@ public class ActivityManager {
        public String toString() {
        public String toString() {
            return "TaskDescription Label: " + mLabel + " Icon: " + mIcon +
            return "TaskDescription Label: " + mLabel + " Icon: " + mIcon +
                    " IconFilename: " + mIconFilename + " colorPrimary: " + mColorPrimary +
                    " IconFilename: " + mIconFilename + " colorPrimary: " + mColorPrimary +
                    " colorBackground: " + mColorBackground +
                    " colorBackground: " + mColorBackground;
                    " statusBarColor: " + mColorBackground +
                    " navigationBarColor: " + mNavigationBarColor;
        }
        }
    }
    }


+14 −3
Original line number Original line Diff line number Diff line
@@ -74,7 +74,6 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
    private final Rect mOldStableInsets = new Rect();
    private final Rect mOldStableInsets = new Rect();
    private final Rect mSystemInsets = new Rect();
    private final Rect mSystemInsets = new Rect();
    private final Rect mStableInsets = new Rect();
    private final Rect mStableInsets = new Rect();
    private final Rect mTmpRect = new Rect();


    public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds,
    public BackdropFrameRenderer(DecorView decorView, ThreadedRenderer renderer, Rect initialBounds,
            Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable,
            Drawable resizingBackgroundDrawable, Drawable captionBackgroundDrawable,
@@ -371,6 +370,12 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
        DisplayListCanvas canvas = mSystemBarBackgroundNode.start(width, height);
        DisplayListCanvas canvas = mSystemBarBackgroundNode.start(width, height);
        mSystemBarBackgroundNode.setLeftTopRightBottom(left, top, left + width, top + height);
        mSystemBarBackgroundNode.setLeftTopRightBottom(left, top, left + width, top + height);
        final int topInset = DecorView.getColorViewTopInset(mStableInsets.top, mSystemInsets.top);
        final int topInset = DecorView.getColorViewTopInset(mStableInsets.top, mSystemInsets.top);
        final int bottomInset = DecorView.getColorViewBottomInset(stableInsets.bottom,
                systemInsets.bottom);
        final int rightInset = DecorView.getColorViewRightInset(stableInsets.right,
                systemInsets.right);
        final int leftInset = DecorView.getColorViewLeftInset(stableInsets.left,
                systemInsets.left);
        if (mStatusBarColor != null) {
        if (mStatusBarColor != null) {
            mStatusBarColor.setBounds(0, 0, left + width, topInset);
            mStatusBarColor.setBounds(0, 0, left + width, topInset);
            mStatusBarColor.draw(canvas);
            mStatusBarColor.draw(canvas);
@@ -380,8 +385,14 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
        // don't want the navigation bar background be moving around when resizing in docked mode.
        // don't want the navigation bar background be moving around when resizing in docked mode.
        // However, we need it for the transitions into/out of docked mode.
        // However, we need it for the transitions into/out of docked mode.
        if (mNavigationBarColor != null && fullscreen) {
        if (mNavigationBarColor != null && fullscreen) {
            DecorView.getNavigationBarRect(width, height, stableInsets, systemInsets, mTmpRect);
            final int size = DecorView.getNavBarSize(bottomInset, rightInset, leftInset);
            mNavigationBarColor.setBounds(mTmpRect);
            if (DecorView.isNavBarToRightEdge(bottomInset, rightInset)) {
                mNavigationBarColor.setBounds(width - size, 0, width, height);
            } else if (DecorView.isNavBarToLeftEdge(bottomInset, leftInset)) {
                mNavigationBarColor.setBounds(0, 0, size, height);
            } else {
                mNavigationBarColor.setBounds(0, height - size, width, height);
            }
            mNavigationBarColor.draw(canvas);
            mNavigationBarColor.draw(canvas);
        }
        }
        mSystemBarBackgroundNode.end(canvas);
        mSystemBarBackgroundNode.end(canvas);
+36 −86
Original line number Original line Diff line number Diff line
@@ -119,21 +119,6 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    // The height of a window which has not in DIP.
    // The height of a window which has not in DIP.
    private final static int DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP = 5;
    private final static int DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP = 5;


    public static final ColorViewAttributes STATUS_BAR_COLOR_VIEW_ATTRIBUTES =
            new ColorViewAttributes(SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
                    Gravity.TOP, Gravity.LEFT, Gravity.RIGHT,
                    Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME,
                    com.android.internal.R.id.statusBarBackground,
                    FLAG_FULLSCREEN);

    public static final ColorViewAttributes NAVIGATION_BAR_COLOR_VIEW_ATTRIBUTES =
            new ColorViewAttributes(
                    SYSTEM_UI_FLAG_HIDE_NAVIGATION, FLAG_TRANSLUCENT_NAVIGATION,
                    Gravity.BOTTOM, Gravity.RIGHT, Gravity.LEFT,
                    Window.NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME,
                    com.android.internal.R.id.navigationBarBackground,
                    0 /* hideWindowFlag */);

    // Cludge to address b/22668382: Set the shadow size to the maximum so that the layer
    // Cludge to address b/22668382: Set the shadow size to the maximum so that the layer
    // size calculation takes the shadow size into account. We set the elevation currently
    // size calculation takes the shadow size into account. We set the elevation currently
    // to max until the first layout command has been executed.
    // to max until the first layout command has been executed.
@@ -177,10 +162,18 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    // View added at runtime to draw under the navigation bar area
    // View added at runtime to draw under the navigation bar area
    private View mNavigationGuard;
    private View mNavigationGuard;


    private final ColorViewState mStatusColorViewState =
    private final ColorViewState mStatusColorViewState = new ColorViewState(
            new ColorViewState(STATUS_BAR_COLOR_VIEW_ATTRIBUTES);
            SYSTEM_UI_FLAG_FULLSCREEN, FLAG_TRANSLUCENT_STATUS,
    private final ColorViewState mNavigationColorViewState =
            Gravity.TOP, Gravity.LEFT, Gravity.RIGHT,
            new ColorViewState(NAVIGATION_BAR_COLOR_VIEW_ATTRIBUTES);
            Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME,
            com.android.internal.R.id.statusBarBackground,
            FLAG_FULLSCREEN);
    private final ColorViewState mNavigationColorViewState = new ColorViewState(
            SYSTEM_UI_FLAG_HIDE_NAVIGATION, FLAG_TRANSLUCENT_NAVIGATION,
            Gravity.BOTTOM, Gravity.RIGHT, Gravity.LEFT,
            Window.NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME,
            com.android.internal.R.id.navigationBarBackground,
            0 /* hideWindowFlag */);


    private final Interpolator mShowInterpolator;
    private final Interpolator mShowInterpolator;
    private final Interpolator mHideInterpolator;
    private final Interpolator mHideInterpolator;
@@ -990,50 +983,35 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        return false;
        return false;
    }
    }


    public static int getColorViewTopInset(int stableTop, int systemTop) {
    static int getColorViewTopInset(int stableTop, int systemTop) {
        return Math.min(stableTop, systemTop);
        return Math.min(stableTop, systemTop);
    }
    }


    public static int getColorViewBottomInset(int stableBottom, int systemBottom) {
    static int getColorViewBottomInset(int stableBottom, int systemBottom) {
        return Math.min(stableBottom, systemBottom);
        return Math.min(stableBottom, systemBottom);
    }
    }


    public static int getColorViewRightInset(int stableRight, int systemRight) {
    static int getColorViewRightInset(int stableRight, int systemRight) {
        return Math.min(stableRight, systemRight);
        return Math.min(stableRight, systemRight);
    }
    }


    public static int getColorViewLeftInset(int stableLeft, int systemLeft) {
    static int getColorViewLeftInset(int stableLeft, int systemLeft) {
        return Math.min(stableLeft, systemLeft);
        return Math.min(stableLeft, systemLeft);
    }
    }


    public static boolean isNavBarToRightEdge(int bottomInset, int rightInset) {
    static boolean isNavBarToRightEdge(int bottomInset, int rightInset) {
        return bottomInset == 0 && rightInset > 0;
        return bottomInset == 0 && rightInset > 0;
    }
    }


    public static boolean isNavBarToLeftEdge(int bottomInset, int leftInset) {
    static boolean isNavBarToLeftEdge(int bottomInset, int leftInset) {
        return bottomInset == 0 && leftInset > 0;
        return bottomInset == 0 && leftInset > 0;
    }
    }


    public static int getNavBarSize(int bottomInset, int rightInset, int leftInset) {
    static int getNavBarSize(int bottomInset, int rightInset, int leftInset) {
        return isNavBarToRightEdge(bottomInset, rightInset) ? rightInset
        return isNavBarToRightEdge(bottomInset, rightInset) ? rightInset
                : isNavBarToLeftEdge(bottomInset, leftInset) ? leftInset : bottomInset;
                : isNavBarToLeftEdge(bottomInset, leftInset) ? leftInset : bottomInset;
    }
    }


    public static void getNavigationBarRect(int canvasWidth, int canvasHeight, Rect stableInsets,
            Rect contentInsets, Rect outRect) {
        final int bottomInset = getColorViewBottomInset(stableInsets.bottom, contentInsets.bottom);
        final int leftInset = getColorViewLeftInset(stableInsets.left, contentInsets.left);
        final int rightInset = getColorViewLeftInset(stableInsets.right, contentInsets.right);
        final int size = getNavBarSize(bottomInset, rightInset, leftInset);
        if (isNavBarToRightEdge(bottomInset, rightInset)) {
            outRect.set(canvasWidth - size, 0, canvasWidth, canvasHeight);
        } else if (isNavBarToLeftEdge(bottomInset, leftInset)) {
            outRect.set(0, 0, size, canvasHeight);
        } else {
            outRect.set(0, canvasHeight - size, canvasWidth, canvasHeight);
        }
    }

    WindowInsets updateColorViews(WindowInsets insets, boolean animate) {
    WindowInsets updateColorViews(WindowInsets insets, boolean animate) {
        WindowManager.LayoutParams attrs = mWindow.getAttributes();
        WindowManager.LayoutParams attrs = mWindow.getAttributes();
        int sysUiVisibility = attrs.systemUiVisibility | getWindowSystemUiVisibility();
        int sysUiVisibility = attrs.systemUiVisibility | getWindowSystemUiVisibility();
@@ -1153,14 +1131,9 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    }
    }


    private int calculateStatusBarColor() {
    private int calculateStatusBarColor() {
        return calculateStatusBarColor(mWindow.getAttributes().flags,
        int flags = mWindow.getAttributes().flags;
                mSemiTransparentStatusBarColor, mWindow.mStatusBarColor);
        return (flags & FLAG_TRANSLUCENT_STATUS) != 0 ? mSemiTransparentStatusBarColor
    }
                : (flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0 ? mWindow.mStatusBarColor

    public static int calculateStatusBarColor(int flags, int semiTransparentStatusBarColor,
            int statusBarColor) {
        return (flags & FLAG_TRANSLUCENT_STATUS) != 0 ? semiTransparentStatusBarColor
                : (flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0 ? statusBarColor
                : Color.BLACK;
                : Color.BLACK;
    }
    }


@@ -1187,9 +1160,13 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
    private void updateColorViewInt(final ColorViewState state, int sysUiVis, int color,
    private void updateColorViewInt(final ColorViewState state, int sysUiVis, int color,
            int size, boolean verticalBar, boolean seascape, int sideMargin,
            int size, boolean verticalBar, boolean seascape, int sideMargin,
            boolean animate, boolean force) {
            boolean animate, boolean force) {
        state.present = state.attributes.isPresent(sysUiVis, mWindow.getAttributes().flags, force);
        state.present = (sysUiVis & state.systemUiHideFlag) == 0
        boolean show = state.attributes.isVisible(state.present, color,
                && (mWindow.getAttributes().flags & state.hideWindowFlag) == 0
                mWindow.getAttributes().flags, force);
                && ((mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
                        || force);
        boolean show = state.present
                && (color & Color.BLACK) != 0
                && ((mWindow.getAttributes().flags & state.translucentFlag) == 0  || force);
        boolean showView = show && !isResizing() && size > 0;
        boolean showView = show && !isResizing() && size > 0;


        boolean visibilityChanged = false;
        boolean visibilityChanged = false;
@@ -1198,15 +1175,15 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        int resolvedHeight = verticalBar ? LayoutParams.MATCH_PARENT : size;
        int resolvedHeight = verticalBar ? LayoutParams.MATCH_PARENT : size;
        int resolvedWidth = verticalBar ? size : LayoutParams.MATCH_PARENT;
        int resolvedWidth = verticalBar ? size : LayoutParams.MATCH_PARENT;
        int resolvedGravity = verticalBar
        int resolvedGravity = verticalBar
                ? (seascape ? state.attributes.seascapeGravity : state.attributes.horizontalGravity)
                ? (seascape ? state.seascapeGravity : state.horizontalGravity)
                : state.attributes.verticalGravity;
                : state.verticalGravity;


        if (view == null) {
        if (view == null) {
            if (showView) {
            if (showView) {
                state.view = view = new View(mContext);
                state.view = view = new View(mContext);
                view.setBackgroundColor(color);
                view.setBackgroundColor(color);
                view.setTransitionName(state.attributes.transitionName);
                view.setTransitionName(state.transitionName);
                view.setId(state.attributes.id);
                view.setId(state.id);
                visibilityChanged = true;
                visibilityChanged = true;
                view.setVisibility(INVISIBLE);
                view.setVisibility(INVISIBLE);
                state.targetVisibility = VISIBLE;
                state.targetVisibility = VISIBLE;
@@ -2292,15 +2269,6 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        boolean visible;
        boolean visible;
        int color;
        int color;


        final ColorViewAttributes attributes;

        ColorViewState(ColorViewAttributes attributes) {
            this.attributes = attributes;
        }
    }

    public static class ColorViewAttributes {

        final int id;
        final int id;
        final int systemUiHideFlag;
        final int systemUiHideFlag;
        final int translucentFlag;
        final int translucentFlag;
@@ -2310,9 +2278,9 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
        final String transitionName;
        final String transitionName;
        final int hideWindowFlag;
        final int hideWindowFlag;


        private ColorViewAttributes(int systemUiHideFlag, int translucentFlag, int verticalGravity,
        ColorViewState(int systemUiHideFlag,
                int horizontalGravity, int seascapeGravity, String transitionName, int id,
                int translucentFlag, int verticalGravity, int horizontalGravity,
                int hideWindowFlag) {
                int seascapeGravity, String transitionName, int id, int hideWindowFlag) {
            this.id = id;
            this.id = id;
            this.systemUiHideFlag = systemUiHideFlag;
            this.systemUiHideFlag = systemUiHideFlag;
            this.translucentFlag = translucentFlag;
            this.translucentFlag = translucentFlag;
@@ -2322,24 +2290,6 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
            this.transitionName = transitionName;
            this.transitionName = transitionName;
            this.hideWindowFlag = hideWindowFlag;
            this.hideWindowFlag = hideWindowFlag;
        }
        }

        public boolean isPresent(int sysUiVis, int windowFlags, boolean force) {
            return (sysUiVis & systemUiHideFlag) == 0
                    && (windowFlags & hideWindowFlag) == 0
                    && ((windowFlags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
                    || force);
        }

        public boolean isVisible(boolean present, int color, int windowFlags, boolean force) {
            return present
                    && (color & Color.BLACK) != 0
                    && ((windowFlags & translucentFlag) == 0  || force);
        }

        public boolean isVisible(int sysUiVis, int color, int windowFlags, boolean force) {
            final boolean present = isPresent(sysUiVis, windowFlags, force);
            return isVisible(present, color, windowFlags, force);
        }
    }
    }


    /**
    /**
+0 −5
Original line number Original line Diff line number Diff line
@@ -8559,11 +8559,6 @@
        <!-- @hide From Theme.colorBackground, used for the TaskDescription background
        <!-- @hide From Theme.colorBackground, used for the TaskDescription background
                   color. -->
                   color. -->
        <attr name="colorBackground" />
        <attr name="colorBackground" />
        <!-- @hide From Theme.statusBarColor, used for the TaskDescription status bar color. -->
        <attr name="statusBarColor"/>
        <!-- @hide From Theme.navigationBarColor, used for the TaskDescription navigation bar
                   color. -->
        <attr name="navigationBarColor"/>
    </declare-styleable>
    </declare-styleable>


    <declare-styleable name="Shortcut">
    <declare-styleable name="Shortcut">
Loading