[SB][Screen chips] Don't change recording start time once it's started.
If the user is screen recording a single app, `ScreenRecordChipInteractor` emits two models very close together (~7ms apart): 1) Recording(taskPackage=null) 2) Recording(taskPackage="some.package") This is because the recording state comes from ScreenRecordRepository, but the taskPackage comes from MediaProjectionRepository, so the taskPackage comes in slightly later. Previously, ScreenRecordChipViewModel would change the start time when the second `Recording` event came in. Changing the start time on the Chronometer makes it skip a second, due to some of the internal workings of the Chronometer class. This CL updates the ScreenRecordChipViewModel to not change the start time once the recording has started. Fixes: 349620526 Bug: 332662551 Flag: com.android.systemui.status_bar_screen_sharing_chips Test: Screen record a single app -> verify chip timer doesn't skip from 00: 00 to 00:02 Test: atest ScreenRecordChipViewModelTest Change-Id: Ia6fb78ee050bad835403b781862b53028eacbb51
Loading
Please register or sign in to comment