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

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

Snap for 8736075 from 483aff40 to tm-qpr1-release

Change-Id: I70cbd353a5006b4c0f917549ae7eeefa542b6913
parents 70258e8f 483aff40
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;
        }
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ message Transition {
  State state = 5;
  int32 flags = 6;
  repeated ChangeInfo change = 7;
  uint64 start_transaction_id = 8;
  uint64 finish_transaction_id = 9;
}

message ChangeInfo {
+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 −10
Original line number Diff line number Diff line
@@ -216,24 +216,24 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange

    /** Applies new configuration, returns {@code false} if there's no effect to the layout. */
    public boolean updateConfiguration(Configuration configuration) {
        // Always update configuration after orientation changed to make sure to render divider bar
        // with proper resources that matching screen orientation.
        final int orientation = configuration.orientation;
        if (mOrientation != orientation) {
            mContext = mContext.createConfigurationContext(configuration);
            mSplitWindowManager.setConfiguration(configuration);
            mOrientation = orientation;
        }

        // Update the split bounds when necessary. Besides root bounds changed, split bounds need to
        // be updated when the rotation changed to cover the case that users rotated the screen 180
        // degrees.
        // Make sure to render the divider bar with proper resources that matching the screen
        // orientation.
        final int rotation = configuration.windowConfiguration.getRotation();
        final Rect rootBounds = configuration.windowConfiguration.getBounds();
        if (mRotation == rotation && mRootBounds.equals(rootBounds)) {
        final int orientation = configuration.orientation;

        if (mOrientation == orientation
                && mRotation == rotation
                && mRootBounds.equals(rootBounds)) {
            return false;
        }

        mContext = mContext.createConfigurationContext(configuration);
        mSplitWindowManager.setConfiguration(configuration);
        mOrientation = orientation;
        mTempRect.set(mRootBounds);
        mRootBounds.set(rootBounds);
        mRotation = rotation;
Loading