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

Commit b1429339 authored by Stefan Andonian's avatar Stefan Andonian Committed by Automerger Merge Worker
Browse files

Do not leak launcher context from the SettingsAwareViewCapture. am: 9eee4075...

Do not leak launcher context from the SettingsAwareViewCapture. am: 9eee4075 am: 604f29c4 am: 56858c62

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/systemui/+/22102493



Change-Id: I23f26f67a187a22b2e124bbfa397785488b5ffc0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 477a0ee4 56858c62
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -68,8 +68,9 @@ internal constructor(private val context: Context, choreographer: Choreographer,
        @JvmStatic
        fun getInstance(context: Context): ViewCapture = when {
            INSTANCE != null -> INSTANCE!!
            Looper.myLooper() == Looper.getMainLooper() -> SettingsAwareViewCapture(context,
                    Choreographer.getInstance(), createAndStartNewLooperExecutor("SAViewCapture",
            Looper.myLooper() == Looper.getMainLooper() -> SettingsAwareViewCapture(
                    context.applicationContext, Choreographer.getInstance(),
                    createAndStartNewLooperExecutor("SAViewCapture",
                    Process.THREAD_PRIORITY_FOREGROUND)).also { INSTANCE = it }
            else -> try {
                MAIN_EXECUTOR.submit { getInstance(context) }.get()