Add ScreenshotActionsController between provider and viewModel

The asynchronicity of various processes in screenshots/action providers
means that we can show actions that are associated with the wrong
screenshot (see bug for details).

This change removes direct access from the ScreenshotActionProvider to
the ScreenshotViewModel, and instead abstracts out the action providers
to a ScreenshotActionsController that only updates the ViewModel if the
actions are associated with the current "live" screenshot.

Bug: 329659738
Bug: 341062985
Fix: 341062985
Flag: com.android.systemui.screenshot_shelf_ui2
Test: manual via taking several screenshots in succession
Test: atest ScreenshotActionsControllerTest
Merged-In: Ie18396172239b30218372229630da3d3d716406b
Change-Id: Ie18396172239b30218372229630da3d3d716406b
5 files changed