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

Commit 0eb13964 authored by Omer Ozer's avatar Omer Ozer Committed by Automerger Merge Worker
Browse files

Merge "Clear/restore calling app identity prior to ui launch." into udc-dev...

Merge "Clear/restore calling app identity prior to ui launch." into udc-dev am: 89b4148c am: a0d328ba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22144642



Change-Id: I52023ad69c358bb01f05fb1ed071ff8559a55032
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 83b8fa24 a0d328ba
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.credentials.GetCredentialResponse;
import android.credentials.IGetCredentialCallback;
import android.credentials.ui.ProviderData;
import android.credentials.ui.RequestInfo;
import android.os.Binder;
import android.os.CancellationSignal;
import android.os.RemoteException;
import android.service.credentials.CallingAppInfo;
@@ -84,11 +85,12 @@ public class GetRequestSession extends RequestSession<GetCredentialRequest,
    protected void launchUiWithProviderData(ArrayList<ProviderData> providerDataList) {
        mChosenProviderFinalPhaseMetric.setUiCallStartTimeNanoseconds(System.nanoTime());
        try {
            Binder.withCleanCallingIdentity(() ->
                    mClientCallback.onPendingIntent(mCredentialManagerUi.createPendingIntent(
                    RequestInfo.newGetRequestInfo(
                            mRequestId, mClientRequest, mClientAppInfo.getPackageName()),
                    providerDataList));
        } catch (RemoteException e) {
                    providerDataList)));
        } catch (RuntimeException e) {
            mChosenProviderFinalPhaseMetric.setUiReturned(false);
            respondToClientWithErrorAndFinish(
                    GetCredentialException.TYPE_UNKNOWN, "Unable to instantiate selector");