Loading core/java/android/credentials/CredentialManager.java +7 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.IntentSender; import android.os.Binder; import android.os.Bundle; import android.os.CancellationSignal; import android.os.IBinder; import android.os.ICancellationSignal; Loading @@ -58,6 +59,9 @@ import java.util.concurrent.Executor; @SystemService(Context.CREDENTIAL_SERVICE) public final class CredentialManager { private static final String TAG = "CredentialManager"; private static final Bundle OPTIONS_SENDER_BAL_OPTIN = ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle(); /** @hide */ @IntDef( Loading Loading @@ -757,9 +761,7 @@ public final class CredentialManager { public void onPendingIntent(PendingIntent pendingIntent) { try { mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle()); OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e( TAG, Loading Loading @@ -817,7 +819,8 @@ public final class CredentialManager { @Override public void onPendingIntent(PendingIntent pendingIntent) { try { mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0); mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e( TAG, Loading core/java/android/credentials/PrepareGetCredentialResponse.java +10 −2 Original line number Diff line number Diff line Loading @@ -22,9 +22,11 @@ import android.annotation.CallbackExecutor; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.Context; import android.content.IntentSender; import android.os.Bundle; import android.os.CancellationSignal; import android.os.OutcomeReceiver; import android.util.Log; Loading @@ -41,6 +43,10 @@ import java.util.concurrent.Executor; */ public final class PrepareGetCredentialResponse { private static final Bundle OPTIONS_SENDER_BAL_OPTIN = ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle(); /** * A handle that represents a pending get-credential operation. Pass this handle to {@link * CredentialManager#getCredential(Context, PendingGetCredentialHandle, CancellationSignal, Loading Loading @@ -80,7 +86,8 @@ public final class PrepareGetCredentialResponse { @Override public void onPendingIntent(PendingIntent pendingIntent) { try { context.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0); context.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "startIntentSender() failed for intent for show()", e); executor.execute(() -> callback.onError( Loading @@ -101,7 +108,8 @@ public final class PrepareGetCredentialResponse { }); try { context.startIntentSender(mPendingIntent.getIntentSender(), null, 0, 0, 0); context.startIntentSender(mPendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "startIntentSender() failed for intent for show()", e); executor.execute(() -> callback.onError( Loading Loading
core/java/android/credentials/CredentialManager.java +7 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.ComponentName; import android.content.Context; import android.content.IntentSender; import android.os.Binder; import android.os.Bundle; import android.os.CancellationSignal; import android.os.IBinder; import android.os.ICancellationSignal; Loading @@ -58,6 +59,9 @@ import java.util.concurrent.Executor; @SystemService(Context.CREDENTIAL_SERVICE) public final class CredentialManager { private static final String TAG = "CredentialManager"; private static final Bundle OPTIONS_SENDER_BAL_OPTIN = ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle(); /** @hide */ @IntDef( Loading Loading @@ -757,9 +761,7 @@ public final class CredentialManager { public void onPendingIntent(PendingIntent pendingIntent) { try { mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle()); OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e( TAG, Loading Loading @@ -817,7 +819,8 @@ public final class CredentialManager { @Override public void onPendingIntent(PendingIntent pendingIntent) { try { mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0); mContext.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e( TAG, Loading
core/java/android/credentials/PrepareGetCredentialResponse.java +10 −2 Original line number Diff line number Diff line Loading @@ -22,9 +22,11 @@ import android.annotation.CallbackExecutor; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.Context; import android.content.IntentSender; import android.os.Bundle; import android.os.CancellationSignal; import android.os.OutcomeReceiver; import android.util.Log; Loading @@ -41,6 +43,10 @@ import java.util.concurrent.Executor; */ public final class PrepareGetCredentialResponse { private static final Bundle OPTIONS_SENDER_BAL_OPTIN = ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED).toBundle(); /** * A handle that represents a pending get-credential operation. Pass this handle to {@link * CredentialManager#getCredential(Context, PendingGetCredentialHandle, CancellationSignal, Loading Loading @@ -80,7 +86,8 @@ public final class PrepareGetCredentialResponse { @Override public void onPendingIntent(PendingIntent pendingIntent) { try { context.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0); context.startIntentSender(pendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "startIntentSender() failed for intent for show()", e); executor.execute(() -> callback.onError( Loading @@ -101,7 +108,8 @@ public final class PrepareGetCredentialResponse { }); try { context.startIntentSender(mPendingIntent.getIntentSender(), null, 0, 0, 0); context.startIntentSender(mPendingIntent.getIntentSender(), null, 0, 0, 0, OPTIONS_SENDER_BAL_OPTIN); } catch (IntentSender.SendIntentException e) { Log.e(TAG, "startIntentSender() failed for intent for show()", e); executor.execute(() -> callback.onError( Loading