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

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

Merge "Workaround to safely show ambient/HUN views."

parents 74a8e734 47ff478e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -102,6 +102,8 @@ public class NotificationInflater {

    public static final int FLAG_CONTENT_VIEW_ALL = ~0;

    // TODO: Heads up and ambient are always inflated as a temporary workaround.
    // See http://b/117933032 and http://b/117894786
    /**
     * Content views that must be inflated at all times.
     */
@@ -109,7 +111,9 @@ public class NotificationInflater {
    private static final int REQUIRED_INFLATION_FLAGS =
            FLAG_CONTENT_VIEW_CONTRACTED
            | FLAG_CONTENT_VIEW_EXPANDED
            | FLAG_CONTENT_VIEW_PUBLIC;
            | FLAG_CONTENT_VIEW_PUBLIC
            | FLAG_CONTENT_VIEW_HEADS_UP
            | FLAG_CONTENT_VIEW_AMBIENT;

    /**
     * The set of content views to inflate.
+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationChildrenCon

import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -139,7 +140,10 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
        verify(row).updateShelfIconColor();
    }

    // TODO: Ignoring as a temporary workaround until heads up views can be safely freed.
    // See http://b/117933032
    @Test
    @Ignore
    public void testFreeContentViewWhenSafe() throws Exception {
        ExpandableNotificationRow row = mNotificationTestHelper.createRow(FLAG_CONTENT_VIEW_ALL);

+3 −0
Original line number Diff line number Diff line
@@ -115,7 +115,10 @@ public class NotificationInflaterTest extends SysuiTestCase {
        verify(mRow).onNotificationUpdated();
    }

    // TODO: Ignoring as a temporary workaround until ambient views can be safely freed.
    // See http://b/117894786
    @Test
    @Ignore
    public void testInflationOnlyInflatesSetFlags() throws Exception {
        mNotificationInflater.updateInflationFlag(FLAG_CONTENT_VIEW_HEADS_UP,
                true /* shouldInflate */);