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

Commit b3e70199 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove unused ScreenshotData.contextUrl field." into main

parents 2fc827de c2f12bf9
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -4,10 +4,10 @@ import android.content.ComponentName
import android.graphics.Bitmap
import android.graphics.Insets
import android.graphics.Rect
import android.net.Uri
import android.os.Process
import android.os.UserHandle
import android.view.Display
import android.view.WindowManager
import android.view.WindowManager.ScreenshotSource
import android.view.WindowManager.ScreenshotType
import androidx.annotation.VisibleForTesting
@@ -26,11 +26,9 @@ data class ScreenshotData(
    var insets: Insets,
    var bitmap: Bitmap?,
    var displayId: Int,
    /** App-provided URL representing the content the user was looking at in the screenshot. */
    var contextUrl: Uri? = null,
) {
    val packageNameString: String
        get() = if (topComponent == null) "" else topComponent!!.packageName
    val packageNameString
        get() = topComponent?.packageName ?: ""

    fun getUserOrDefault(): UserHandle {
        return userHandle ?: Process.myUserHandle()
@@ -54,8 +52,8 @@ data class ScreenshotData(
        @VisibleForTesting
        fun forTesting() =
            ScreenshotData(
                type = 0,
                source = 0,
                type = WindowManager.TAKE_SCREENSHOT_FULLSCREEN,
                source = ScreenshotSource.SCREENSHOT_KEY_CHORD,
                userHandle = null,
                topComponent = null,
                screenBounds = null,