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

Commit c0d332a0 authored by Ivan Chiang's avatar Ivan Chiang
Browse files

[PM] Fix the error dialog disappears quickly issue for ADI

Bug: 434769846
Bug: 360129657
FLAG: android.content.pm.verification_service
Test: manual
Change-Id: I348326fcd5336f44321f881eb887da99fe99bd3f
parent e9592db2
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?) {