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

Commit 42ac293a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Return RESULT_OK RequestManageCredentials" into sc-dev

parents decaeda4 c82767f6
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();