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

Commit 0fa6a646 authored by Song Chun Fan's avatar Song Chun Fan Committed by Android (Google) Code Review
Browse files

Merge "[PM] Fix the error dialog disappears quickly issue for ADI" into main

parents d70b2373 c0d332a0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -873,7 +873,10 @@ class InstallRepository(private val context: Context) : EventResultPersister.Eve
            sessionId, DEVELOPER_VERIFICATION_USER_RESPONSE_ABORT
        )
        return InstallAborted(
            ABORT_REASON_DONE, activityResultCode = Activity.RESULT_OK
            ABORT_REASON_DONE,
            activityResultCode = Activity.RESULT_OK,
            // Set the errorDialogType to show the error dialog for the user
            errorDialogType = DLG_PACKAGE_ERROR
        )
    }

+4 −1
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ class InstallLaunch : FragmentActivity(), InstallActionListener {
            Log.d(LOG_TAG, "Negative button clicked. StageCode: $stageCode")
        }
        var resultCode = RESULT_CANCELED
        var shouldFinish = true
        when (stageCode) {
            InstallStage.STAGE_USER_ACTION_REQUIRED -> installViewModel!!.cleanupInstall()
            InstallStage.STAGE_STAGING -> installViewModel!!.abortStaging()
@@ -320,9 +321,11 @@ class InstallLaunch : FragmentActivity(), InstallActionListener {
                // the installation. Don't abandon the session. Let the installation fail through.
                resultCode = RESULT_OK
                installViewModel!!.onNegativeVerificationUserResponse()
                // Don't finish the activity at this time, it shows App not installed dialog later
                shouldFinish = false
            }
        }
        setResult(resultCode, null, true)
        setResult(resultCode, null, shouldFinish)
    }

    override fun onNegativeResponse(resultCode: Int, data: Intent?) {