diff options
| author | 2024-02-15 18:34:18 +0000 | |
|---|---|---|
| committer | 2024-02-15 18:34:18 +0000 | |
| commit | 686d17dc01c11b0b5a011750b8cc56ea2d00afd7 (patch) | |
| tree | 6b6db66ac48288c1171eb151e3e7258d37afca44 | |
| parent | 22ce6097e53874f189fd7f7d80818241135eb363 (diff) | |
| parent | 605512442aaf8187e617a5da654b8e8047d48be5 (diff) | |
Merge "Fix NPE from dismissing more options" into main
| -rw-r--r-- | services/autofill/java/com/android/server/autofill/Session.java | 13 | ||||
| -rw-r--r-- | services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java | 3 |
2 files changed, 10 insertions, 6 deletions
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java index 96c65565c96b..d47245eb2272 100644 --- a/services/autofill/java/com/android/server/autofill/Session.java +++ b/services/autofill/java/com/android/server/autofill/Session.java @@ -5108,12 +5108,13 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState } } } else if (resultCode == FAILURE_CREDMAN_SELECTOR) { - GetCredentialException exception = resultData.getParcelable( - CredentialProviderService.EXTRA_GET_CREDENTIAL_EXCEPTION, - GetCredentialException.class); - Slog.d(TAG, "Credman bottom sheet from pinned " - + "entry failed with: + " + exception.getType() + " , " - + exception.getMessage()); + String[] exception = resultData.getStringArray( + CredentialProviderService.EXTRA_GET_CREDENTIAL_EXCEPTION); + if (exception != null && exception.length >= 2) { + Slog.w(TAG, "Credman bottom sheet from pinned " + + "entry failed with: + " + exception[0] + " , " + + exception[1]); + } } else { Slog.d(TAG, "Unknown resultCode from credential " + "manager bottom sheet: " + resultCode); diff --git a/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java index adb1b72cf3ee..d06d4d869192 100644 --- a/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java +++ b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java @@ -168,6 +168,9 @@ public class GetCandidateRequestSession extends RequestSession<GetCredentialRequ mRequestSessionMetric.collectFrameworkException(exception); if (finalResponseReceiver != null) { Bundle resultData = new Bundle(); + resultData.putStringArray( + CredentialProviderService.EXTRA_GET_CREDENTIAL_EXCEPTION, + new String[] {exception, message}); finalResponseReceiver.send(Constants.FAILURE_CREDMAN_SELECTOR, resultData); } else { respondToClientWithErrorAndFinish(exception, message); |