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

Commit defe3b75 authored by Miranda Kephart's avatar Miranda Kephart Committed by Android (Google) Code Review
Browse files

Merge "Catch binder transaction failure in ScreenshotProxyService" into main

parents 67a16df7 2d9f02a7
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -17,15 +17,16 @@ package com.android.systemui.screenshot

import android.content.Intent
import android.os.IBinder
import android.os.RemoteException
import android.util.Log
import androidx.lifecycle.LifecycleService
import androidx.lifecycle.lifecycleScope
import com.android.app.tracing.coroutines.launch
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.shade.ShadeExpansionStateManager
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import com.android.app.tracing.coroutines.launch
import kotlinx.coroutines.withContext

/** Provides state from the main SystemUI process on behalf of the Screenshot process. */
@@ -56,7 +57,13 @@ constructor(
    private suspend fun executeAfterDismissing(callback: IOnDoneCallback) =
        withContext(mMainDispatcher) {
            activityStarter.executeRunnableDismissingKeyguard(
                Runnable { callback.onDone(true) },
                {
                    try {
                        callback.onDone(true)
                    } catch (e: RemoteException) {
                        Log.w(TAG, "Failed to complete callback transaction", e)
                    }
                },
                null,
                true /* dismissShade */,
                true /* afterKeyguardGone */,