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

Commit c4dff46a authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Merge "Inline notification_row_user_context" into main

parents d05d2423 55176f64
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1767,10 +1767,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
     */
    public ExpandableNotificationRow(Context context, AttributeSet attrs) {
        this(context, attrs, context);
        if (com.android.systemui.Flags.notificationRowUserContext()) {
        Log.wtf(TAG, "This constructor shouldn't be called");
    }
    }

    /**
     * Constructs an ExpandableNotificationRow. Used by layout inflation (with a custom {@code
+1 −6
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.ImageResolver;
import com.android.internal.widget.LocalImageResolver;
import com.android.internal.widget.MessagingMessage;
import com.android.systemui.Flags;

import java.util.HashSet;
import java.util.List;
@@ -67,11 +66,7 @@ public class NotificationInlineImageResolver implements ImageResolver {
     * @param imageCache The implementation of internal cache.
     */
    public NotificationInlineImageResolver(Context context, ImageCache imageCache) {
        if (Flags.notificationRowUserContext()) {
        mContext = context;
        } else {
            mContext = context.getApplicationContext();
        }
        mImageCache = imageCache;

        if (mImageCache != null) {
+1 −3
Original line number Diff line number Diff line
@@ -66,9 +66,7 @@ public class RowInflaterTask implements InflationTask, AsyncLayoutInflater.OnInf
            mInflateOrigin = new Throwable("inflate requested here");
        }
        mListener = listener;
        AsyncLayoutInflater inflater = com.android.systemui.Flags.notificationRowUserContext()
                ? new AsyncLayoutInflater(context, makeRowInflater(entry))
                : new AsyncLayoutInflater(context);
        AsyncLayoutInflater inflater = new AsyncLayoutInflater(context, makeRowInflater(entry));
        mEntry = entry;
        entry.setInflationTask(this);

+0 −1
Original line number Diff line number Diff line
@@ -845,7 +845,6 @@ public class ExpandableNotificationRowTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(com.android.systemui.Flags.FLAG_NOTIFICATION_ROW_USER_CONTEXT)
    public void imageResolver_differentNotificationUser_createsUserContext() throws Exception {
        UserHandle user = new UserHandle(33);
        Context userContext = new SysuiTestableContext(mContext);
+2 −4
Original line number Diff line number Diff line
@@ -615,10 +615,8 @@ public class NotificationTestHelper {

        LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
                Context.LAYOUT_INFLATER_SERVICE);
        if (com.android.systemui.Flags.notificationRowUserContext()) {
        inflater.setFactory2(new RowInflaterTask.RowAsyncLayoutInflater(entry, mSystemClock,
                mRowInflaterTaskLogger));
        }
        mRow = (ExpandableNotificationRow) inflater.inflate(
                R.layout.status_bar_notification_row,
                null /* root */,