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

Commit c82767f6 authored by Alex Johnston's avatar Alex Johnston
Browse files

Return RESULT_OK RequestManageCredentials

Bug: 177979648
Test: Manual testing
Change-Id: I3b4968131f8c7b811752704808d0ef4df617a658
parent 4357b145
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public class RequestManageCredentials extends Activity {
                    .write();
            finishWithResultCancelled();
        });
        allowButton.setOnClickListener(b -> setOrUpdateCredentialManagementApp());
        allowButton.setOnClickListener(b -> setOrUpdateCredentialManagementAppAndFinish());
    }

    private void loadExtendedFloatingActionButton() {
@@ -220,13 +220,14 @@ public class RequestManageCredentials extends Activity {
        });
    }

    private void setOrUpdateCredentialManagementApp() {
    private void setOrUpdateCredentialManagementAppAndFinish() {
        try {
            mKeyChainConnection.getService().setCredentialManagementApp(
                    mCredentialManagerPackage, mAuthenticationPolicy);
            DevicePolicyEventLogger
                    .createEvent(DevicePolicyEnums.CREDENTIAL_MANAGEMENT_APP_REQUEST_ACCEPTED)
                    .write();
            setResult(RESULT_OK);
        } catch (RemoteException e) {
            Log.e(TAG, "Unable to set credential manager app", e);
            logRequestFailure();