Skip to content
Snippets Groups Projects
Commit cdb2ffba authored by Matt Casey's avatar Matt Casey
Browse files

Provide AssistContent to ScreenshotActionsProvider.

Bug: 329659738
Test: Validating flow via logging
Flag: ACONFIG com.android.systemui.screenshot_shelf_ui DEVELOPMENT
Change-Id: Ic8e92028b49c31f318594e1d5bffbabc6ec7eb9f
parent 8756fdba
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ import android.app.ActivityOptions
import android.app.BroadcastOptions
import android.app.ExitTransitionCoordinator
import android.app.PendingIntent
import android.app.assist.AssistContent
import android.content.Context
import android.content.Intent
import android.os.Process
......@@ -58,6 +59,8 @@ interface ScreenshotActionsProvider {
fun setCompletedScreenshot(result: SavedImageData)
fun isPendingSharedTransition(): Boolean
fun onAssistContentAvailable(assistContent: AssistContent) {}
interface Factory {
fun create(
request: ScreenshotData,
......
......@@ -453,6 +453,13 @@ public class ScreenshotController {
return Unit.INSTANCE;
});
saveScreenshotInBackground(screenshot, requestId, finisher);
if (screenshot.getTaskId() >= 0) {
mAssistContentRequester.requestAssistContent(screenshot.getTaskId(),
assistContent -> {
mActionsProvider.onAssistContentAvailable(assistContent);
});
}
} else {
saveScreenshotInWorkerThread(screenshot.getUserHandle(), finisher,
this::showUiOnActionsReady, this::showUiOnQuickShareActionReady);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment