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

Commit ef711976 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Fixed a bug where the navigation notification would flicker" into oc-dev

am: b18f65a1

Change-Id: I53abb4f31f8dc660ba9b140475bbd121df524613
parents 998e766a b18f65a1
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -49,11 +49,11 @@ import com.android.systemui.statusbar.policy.RemoteInputView;
 */
public class NotificationContentView extends FrameLayout {

    private static final int VISIBLE_TYPE_CONTRACTED = 0;
    private static final int VISIBLE_TYPE_EXPANDED = 1;
    private static final int VISIBLE_TYPE_HEADSUP = 2;
    public static final int VISIBLE_TYPE_CONTRACTED = 0;
    public static final int VISIBLE_TYPE_EXPANDED = 1;
    public static final int VISIBLE_TYPE_HEADSUP = 2;
    private static final int VISIBLE_TYPE_SINGLELINE = 3;
    private static final int VISIBLE_TYPE_AMBIENT = 4;
    public static final int VISIBLE_TYPE_AMBIENT = 4;
    private static final int VISIBLE_TYPE_AMBIENT_SINGLELINE = 5;
    public static final int UNDEFINED = -1;

@@ -928,7 +928,7 @@ public class NotificationContentView extends FrameLayout {
        }
    }

    private NotificationViewWrapper getVisibleWrapper(int visibleType) {
    public NotificationViewWrapper getVisibleWrapper(int visibleType) {
        switch (visibleType) {
            case VISIBLE_TYPE_EXPANDED:
                return mExpandedWrapper;
@@ -1085,16 +1085,16 @@ public class NotificationContentView extends FrameLayout {
        mBeforeN = entry.targetSdk < Build.VERSION_CODES.N;
        updateAllSingleLineViews();
        if (mContractedChild != null) {
            mContractedWrapper.notifyContentUpdated(entry.row);
            mContractedWrapper.onContentUpdated(entry.row);
        }
        if (mExpandedChild != null) {
            mExpandedWrapper.notifyContentUpdated(entry.row);
            mExpandedWrapper.onContentUpdated(entry.row);
        }
        if (mHeadsUpChild != null) {
            mHeadsUpWrapper.notifyContentUpdated(entry.row);
            mHeadsUpWrapper.onContentUpdated(entry.row);
        }
        if (mAmbientChild != null) {
            mAmbientWrapper.notifyContentUpdated(entry.row);
            mAmbientWrapper.onContentUpdated(entry.row);
        }
        applyRemoteInput(entry);
        updateLegacy();
+2 −2
Original line number Diff line number Diff line
@@ -36,8 +36,8 @@ public class NotificationBigPictureTemplateViewWrapper extends NotificationTempl
    }

    @Override
    public void notifyContentUpdated(ExpandableNotificationRow row) {
        super.notifyContentUpdated(row);
    public void onContentUpdated(ExpandableNotificationRow row) {
        super.onContentUpdated(row);
        updateImageTag(row.getStatusBarNotification());
    }

+2 −2
Original line number Diff line number Diff line
@@ -41,11 +41,11 @@ public class NotificationBigTextTemplateViewWrapper extends NotificationTemplate
    }

    @Override
    public void notifyContentUpdated(ExpandableNotificationRow row) {
    public void onContentUpdated(ExpandableNotificationRow row) {
        // Reinspect the notification. Before the super call, because the super call also updates
        // the transformation types and we need to have our values set by then.
        resolveViews(row.getStatusBarNotification());
        super.notifyContentUpdated(row);
        super.onContentUpdated(row);
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -128,8 +128,8 @@ public class NotificationHeaderViewWrapper extends NotificationViewWrapper {
    }

    @Override
    public void notifyContentUpdated(ExpandableNotificationRow row) {
        super.notifyContentUpdated(row);
    public void onContentUpdated(ExpandableNotificationRow row) {
        super.onContentUpdated(row);
        mIsLowPriority = row.isLowPriority();
        mTransformLowPriorityTitle = !row.isChildInGroup() && !row.isSummaryWithChildren();
        ArraySet<View> previousViews = mTransformationHelper.getAllTransformingViews();
+16 −7
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.util.Assert;

import java.util.HashMap;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
@@ -207,7 +206,8 @@ public class NotificationInflater {
            };
            applyRemoteView(result, reInflateFlags, flag, row, redactAmbient,
                    isNewView, remoteViewClickHandler, callback, entry, privateLayout,
                    privateLayout.getContractedChild(),
                    privateLayout.getContractedChild(), privateLayout.getVisibleWrapper(
                            NotificationContentView.VISIBLE_TYPE_CONTRACTED),
                    runningInflations, applyCallback);
        }

@@ -229,7 +229,9 @@ public class NotificationInflater {
                };
                applyRemoteView(result, reInflateFlags, flag, row,
                        redactAmbient, isNewView, remoteViewClickHandler, callback, entry,
                        privateLayout, privateLayout.getExpandedChild(), runningInflations,
                        privateLayout, privateLayout.getExpandedChild(),
                        privateLayout.getVisibleWrapper(
                                NotificationContentView.VISIBLE_TYPE_EXPANDED), runningInflations,
                        applyCallback);
            }
        }
@@ -252,7 +254,9 @@ public class NotificationInflater {
                };
                applyRemoteView(result, reInflateFlags, flag, row,
                        redactAmbient, isNewView, remoteViewClickHandler, callback, entry,
                        privateLayout, privateLayout.getHeadsUpChild(), runningInflations,
                        privateLayout, privateLayout.getHeadsUpChild(),
                        privateLayout.getVisibleWrapper(
                                NotificationContentView.VISIBLE_TYPE_HEADSUP), runningInflations,
                        applyCallback);
            }
        }
@@ -274,8 +278,9 @@ public class NotificationInflater {
            };
            applyRemoteView(result, reInflateFlags, flag, row,
                    redactAmbient, isNewView, remoteViewClickHandler, callback, entry,
                    publicLayout, publicLayout.getContractedChild(), runningInflations,
                    applyCallback);
                    publicLayout, publicLayout.getContractedChild(),
                    publicLayout.getVisibleWrapper(NotificationContentView.VISIBLE_TYPE_CONTRACTED),
                    runningInflations, applyCallback);
        }

        flag = FLAG_REINFLATE_AMBIENT_VIEW;
@@ -296,7 +301,8 @@ public class NotificationInflater {
            };
            applyRemoteView(result, reInflateFlags, flag, row,
                    redactAmbient, isNewView, remoteViewClickHandler, callback, entry,
                    newParent, newParent.getAmbientChild(), runningInflations,
                    newParent, newParent.getAmbientChild(), newParent.getVisibleWrapper(
                            NotificationContentView.VISIBLE_TYPE_AMBIENT), runningInflations,
                    applyCallback);
        }

@@ -316,6 +322,7 @@ public class NotificationInflater {
            RemoteViews.OnClickHandler remoteViewClickHandler,
            @Nullable final InflationCallback callback, NotificationData.Entry entry,
            NotificationContentView parentLayout, View existingView,
            NotificationViewWrapper existingWrapper,
            final HashMap<Integer, CancellationSignal> runningInflations,
            ApplyCallback applyCallback) {
        RemoteViews.OnViewAppliedListener listener
@@ -326,6 +333,8 @@ public class NotificationInflater {
                if (isNewView) {
                    v.setIsRootNamespace(true);
                    applyCallback.setResultView(v);
                } else if (existingWrapper != null) {
                    existingWrapper.onReinflated();
                }
                runningInflations.remove(inflationId);
                finishIfDone(result, reInflateFlags, runningInflations, callback, row,
Loading