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

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

Snap for 8735997 from 25019b37 to tm-release

Change-Id: I98d1ae2abf73e477f360504955f20f5304e57c46
parents 508f6ee4 25019b37
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ public class ZipFilePerfTest {
        BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        while (state.keepRunning()) {
            ZipFile zf = new ZipFile(mFile);
            state.pauseTiming();
            zf.close();
            state.resumeTiming();
        }
    }

+6 −3
Original line number Diff line number Diff line
@@ -4503,10 +4503,13 @@ public class BatteryStatsImpl extends BatteryStats {
            for (Map.Entry<HistoryTag, Integer> entry: mHistoryTagPool.entrySet()) {
                entry.setValue(entry.getValue() | TAG_FIRST_OCCURRENCE_FLAG);
            }
            // Make a copy of mHistoryCur.
            HistoryItem copy = new HistoryItem();
            copy.setTo(cur);
            // startRecordingHistory will reset mHistoryCur.
            startRecordingHistory(elapsedRealtimeMs, uptimeMs, false);
            HistoryItem newItem = new HistoryItem();
            newItem.setTo(cur);
            addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, newItem);
            // Add the copy into history buffer.
            addHistoryBufferLocked(elapsedRealtimeMs, HistoryItem.CMD_UPDATE, copy);
            return;
        }
+9 −7
Original line number Diff line number Diff line
@@ -154,19 +154,21 @@ public class BatteryStatsHistoryIteratorTest {

        for (int i = 0; i < eventCount; i++) {
            String name = "a" + (i % 10);
            do {
                assertThat(iterator.next(item)).isTrue();
                // Skip a blank event inserted at the start of every buffer
            if (item.eventCode == BatteryStats.HistoryItem.EVENT_NONE) {
                assertThat(iterator.next(item)).isTrue();
            }
            } while (item.cmd != BatteryStats.HistoryItem.CMD_UPDATE
                    || item.eventCode == BatteryStats.HistoryItem.EVENT_NONE);

            assertThat(item.eventCode).isEqualTo(BatteryStats.HistoryItem.EVENT_ALARM
                    | BatteryStats.HistoryItem.EVENT_FLAG_START);
            assertThat(item.eventTag.string).isEqualTo(name);

            do {
                assertThat(iterator.next(item)).isTrue();
            if (item.eventCode == BatteryStats.HistoryItem.EVENT_NONE) {
                assertThat(iterator.next(item)).isTrue();
            }
            } while (item.cmd != BatteryStats.HistoryItem.CMD_UPDATE
                    || item.eventCode == BatteryStats.HistoryItem.EVENT_NONE);

            assertThat(item.eventCode).isEqualTo(BatteryStats.HistoryItem.EVENT_ALARM
                    | BatteryStats.HistoryItem.EVENT_FLAG_FINISH);
            assertThat(item.eventTag.string).isEqualTo(name);
+10 −0
Original line number Diff line number Diff line
@@ -485,6 +485,8 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
     */
    private IRemoteAnimationRunner mKeyguardExitAnimationRunner;

    private CentralSurfaces mCentralSurfaces;

    private final DeviceConfig.OnPropertiesChangedListener mOnPropertiesChangedListener =
            new DeviceConfig.OnPropertiesChangedListener() {
            @Override
@@ -845,6 +847,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
                            + mOccluded);
                }

                @Override
                public void onLaunchAnimationEnd(boolean launchIsFullScreen) {
                    if (launchIsFullScreen) {
                        mCentralSurfaces.instantCollapseNotificationPanel();
                    }
                }

                @NonNull
                @Override
                public ViewGroup getLaunchContainer() {
@@ -2846,6 +2855,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
            @Nullable PanelExpansionStateManager panelExpansionStateManager,
            BiometricUnlockController biometricUnlockController,
            View notificationContainer, KeyguardBypassController bypassController) {
        mCentralSurfaces = centralSurfaces;
        mKeyguardViewControllerLazy.get().registerCentralSurfaces(
                centralSurfaces,
                panelView,
+17 −1
Original line number Diff line number Diff line
@@ -216,4 +216,20 @@ data class MediaDeviceData

    /** Unique id for this device */
    val id: String? = null
)
) {
    /**
     * Check whether [MediaDeviceData] objects are equal in all fields except the icon. The icon
     * is ignored because it can change by reference frequently depending on the device type's
     * implementation, but this is not usually relevant unless other info has changed
     */
    fun equalsWithoutIcon(other: MediaDeviceData?): Boolean {
        if (other == null) {
            return false
        }

        return enabled == other.enabled &&
            name == other.name &&
            intent == other.intent &&
            id == other.id
    }
}
Loading