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

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

Merge "Fixed a crash with the heads up manager" into mnc-dr1.5-dev

am: d23f1eb0

* commit 'd23f1eb0':
  Fixed a crash with the heads up manager
parents 0cd5e9f4 d23f1eb0
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -453,9 +453,12 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
            mReleaseOnExpandFinish = false;
        } else {
            for (NotificationData.Entry entry : mEntriesToRemoveAfterExpand) {
                if (isHeadsUp(entry.key)) {
                    // Maybe the heads-up was removed already
                    removeHeadsUpEntry(entry);
                }
            }
        }
        mEntriesToRemoveAfterExpand.clear();
    }

@@ -572,6 +575,9 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
            earliestRemovaltime = currentTime + mMinimumDisplayTime;
            postTime = Math.max(postTime, currentTime);
            removeAutoRemovalCallbacks();
            if (mEntriesToRemoveAfterExpand.contains(entry)) {
                mEntriesToRemoveAfterExpand.remove(entry);
            }
            if (!hasFullScreenIntent(entry)) {
                long finishTime = postTime + mHeadsUpNotificationDecay;
                long removeDelay = Math.max(finishTime - currentTime, mMinimumDisplayTime);