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

Commit b0c08fdf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11890100 from ea1510d6 to 24Q3-release

Change-Id: I252645cb1774c39da89d1df393051a879213101d
parents b38fb835 ea1510d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@
         fresh, it will be used as the current location by Telephony to decide whether satellite
         services should be allowed.
         -->
    <integer name="config_oem_enabled_satellite_location_fresh_duration">600</integer>
    <integer name="config_oem_enabled_satellite_location_fresh_duration">300</integer>
    <java-symbol type="integer" name="config_oem_enabled_satellite_location_fresh_duration" />

    <!-- Whether enhanced IWLAN handover check is enabled. If enabled, telephony frameworks
+0 −2
Original line number Diff line number Diff line
@@ -118,8 +118,6 @@ class GroupExpansionManagerTest : SysuiTestCase() {
        underTest.setGroupExpanded(summary1, false)

        // Expanding again should throw.
        // TODO(b/320238410): Remove this check when robolectric supports wtf assertions.
        Assume.assumeFalse(Build.FINGERPRINT.contains("robolectric"))
        assertLogsWtf { underTest.setGroupExpanded(summary1, true) }
    }

+7 −7
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar
            public void onLayoutChange(View v, int left, int top, int right, int bottom,
                    int oldLeft, int oldTop, int oldRight, int oldBottom) {
                if (shouldBeVisible()) {
                    updateTopEntry();
                    updateTopEntry("onLayoutChange");

                    // trigger scroller to notify the latest panel translation
                    mStackScrollerController.requestLayout();
@@ -220,7 +220,7 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar

    @Override
    public void onHeadsUpPinned(NotificationEntry entry) {
        updateTopEntry();
        updateTopEntry("onHeadsUpPinned");
        updateHeader(entry);
        updateHeadsUpAndPulsingRoundness(entry);
    }
@@ -231,7 +231,7 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar
        mPhoneStatusBarTransitions.onHeadsUpStateChanged(isHeadsUp);
    }

    private void updateTopEntry() {
    private void updateTopEntry(String reason) {
        NotificationEntry newEntry = null;
        if (shouldBeVisible()) {
            newEntry = mHeadsUpManager.getTopEntry();
@@ -370,7 +370,7 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar

    @Override
    public void onHeadsUpUnPinned(NotificationEntry entry) {
        updateTopEntry();
        updateTopEntry("onHeadsUpUnPinned");
        updateHeader(entry);
        updateHeadsUpAndPulsingRoundness(entry);
    }
@@ -388,7 +388,7 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar
            updateHeadsUpHeaders();
        }
        if (isExpanded() != oldIsExpanded) {
            updateTopEntry();
            updateTopEntry("setAppearFraction");
        }
    }

@@ -462,11 +462,11 @@ public class HeadsUpAppearanceController extends ViewController<HeadsUpStatusBar
    }

    public void onStateChanged() {
        updateTopEntry();
        updateTopEntry("onStateChanged");
    }

    @Override
    public void onFullyHiddenChanged(boolean isFullyHidden) {
        updateTopEntry();
        updateTopEntry("onFullyHiddenChanged");
    }
}
+4 −4
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
            for (NotificationEntry entry : mEntriesToRemoveAfterExpand) {
                if (isHeadsUpEntry(entry.getKey())) {
                    // Maybe the heads-up was removed already
                    removeEntry(entry.getKey());
                    removeEntry(entry.getKey(), "onExpandingFinished");
                }
            }
        }
@@ -381,7 +381,7 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
        for (NotificationEntry entry : mEntriesToRemoveWhenReorderingAllowed) {
            if (isHeadsUpEntry(entry.getKey())) {
                // Maybe the heads-up was removed already
                removeEntry(entry.getKey());
                removeEntry(entry.getKey(), "mOnReorderingAllowedListener");
            }
        }
        mEntriesToRemoveWhenReorderingAllowed.clear();
@@ -572,7 +572,7 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
                } else if (mTrackingHeadsUp) {
                    mEntriesToRemoveAfterExpand.add(entry);
                } else {
                    removeEntry(entry.getKey());
                    removeEntry(entry.getKey(), "createRemoveRunnable");
                }
            };
        }
@@ -661,7 +661,7 @@ public class HeadsUpManagerPhone extends BaseHeadsUpManager implements
                    }
                }
                for (String key : keysToRemove) {
                    removeEntry(key);
                    removeEntry(key, "mStatusBarStateListener");
                }
            }
        }
+25 −10
Original line number Diff line number Diff line
@@ -79,7 +79,8 @@ constructor(
            runnable.run()
            return
        }
        val fn = "[$label] => AvalancheController.update [${getKey(entry)}]"
        log { "\n "}
        val fn = "$label => AvalancheController.update ${getKey(entry)}"
        if (entry == null) {
            log { "Entry is NULL, stop update." }
            return
@@ -88,13 +89,13 @@ constructor(
            debugRunnableLabelMap[runnable] = label
        }
        if (isShowing(entry)) {
            log { "\n$fn => [update showing]" }
            log { "\n$fn => update showing" }
            runnable.run()
        } else if (entry in nextMap) {
            log { "\n$fn => [update next]" }
            log { "\n$fn => update next" }
            nextMap[entry]?.add(runnable)
        } else if (headsUpEntryShowing == null) {
            log { "\n$fn => [showNow]" }
            log { "\n$fn => showNow" }
            showNow(entry, arrayListOf(runnable))
        } else {
            // Clean up invalid state when entry is in list but not map and vice versa
@@ -133,20 +134,22 @@ constructor(
            runnable.run()
            return
        }
        val fn = "[$label] => AvalancheController.delete " + getKey(entry)
        log { "\n "}
        val fn = "$label => AvalancheController.delete " + getKey(entry)
        if (entry == null) {
            log { "$fn => cannot remove NULL entry" }
            log { "$fn => entry NULL, running runnable" }
            runnable.run()
            return
        }
        if (entry in nextMap) {
            log { "$fn => [remove from next]" }
            log { "$fn => remove from next" }
            if (entry in nextMap) nextMap.remove(entry)
            if (entry in nextList) nextList.remove(entry)
        } else if (entry in debugDropSet) {
            log { "$fn => [remove from dropset]" }
            log { "$fn => remove from dropset" }
            debugDropSet.remove(entry)
        } else if (isShowing(entry)) {
            log { "$fn => [remove showing ${getKey(entry)}]" }
            log { "$fn => remove showing ${getKey(entry)}" }
            previousHunKey = getKey(headsUpEntryShowing)
            // Show the next HUN before removing this one, so that we don't tell listeners
            // onHeadsUpPinnedModeChanged, which causes
@@ -155,7 +158,7 @@ constructor(
            showNext()
            runnable.run()
        } else {
            log { "$fn => [removing untracked ${getKey(entry)}]" }
            log { "$fn => removing untracked ${getKey(entry)}" }
        }
        logState("after $fn")
    }
@@ -239,6 +242,18 @@ constructor(
        return keyList
    }

    fun getWaitingEntry(key: String): HeadsUpEntry? {
        if (!NotificationThrottleHun.isEnabled) {
            return null
        }
        for (headsUpEntry in nextMap.keys) {
            if (headsUpEntry.mEntry?.key.equals(key)) {
                return headsUpEntry
            }
        }
        return null
    }

    private fun isShowing(entry: HeadsUpEntry): Boolean {
        return headsUpEntryShowing != null && entry.mEntry?.key == headsUpEntryShowing?.mEntry?.key
    }
Loading