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

Commit 16124ee0 authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Run screenshot scroll capture even if type is PROVIDED_IMAGE

Scrolling screenshots don't work in work profile, because we convert
even fullscreen screenshots to "PROVIDED_IMAGE" (and just capture the
app itself) and we don't currently attempt scroll capture for provided
image. This change removes the gate on PROVIDED_IMAGE (since it will
just not run anyway if the task ID is not available) to restore
scrolling functionality to work profile screenshots.

Bug: 385022562
Fix: 385022562
Test: manual
Flag: EXEMPT minor bugfix
Change-Id: If41064dbea02c65aa08d10e7510d624bd1581be8
parent 87e94275
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import android.util.Log
import android.view.Display
import android.view.ScrollCaptureResponse
import android.view.ViewRootImpl.ActivityConfigCallback
import android.view.WindowManager
import android.view.WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE
import android.widget.Toast
import android.window.WindowContext
@@ -218,9 +217,7 @@ internal constructor(
        window.setFocusable(true)
        viewProxy.requestFocus()

        if (screenshot.type != WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE) {
        enqueueScrollCaptureRequest(requestId, screenshot.userHandle)
        }

        window.attachWindow()

+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ class ScreenshotCrossProfileService : Service() {

    private val mBinder: IBinder =
        object : ICrossProfileService.Stub() {
            override fun launchIntent(intent: Intent, bundle: Bundle) {
            override fun launchIntent(intent: Intent, bundle: Bundle?) {
                startActivity(intent, bundle)
            }
        }