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

Commit d5080aa6 authored by Charles Wang's avatar Charles Wang Committed by Android (Google) Code Review
Browse files

Merge "Add new APIs for launching Wallet on power double tap." into main

parents 7bf5ada9 4ba7833e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42075,6 +42075,7 @@ package android.service.quickaccesswallet {
  public abstract class QuickAccessWalletService extends android.app.Service {
    ctor public QuickAccessWalletService();
    method @FlaggedApi("android.service.quickaccesswallet.launch_wallet_option_on_power_double_tap") @Nullable public android.app.PendingIntent getGestureTargetActivityPendingIntent();
    method @Nullable public android.app.PendingIntent getTargetActivityPendingIntent();
    method @Nullable public android.os.IBinder onBind(@NonNull android.content.Intent);
    method public abstract void onWalletCardSelected(@NonNull android.service.quickaccesswallet.SelectWalletCardRequest);
+5 −0
Original line number Diff line number Diff line
@@ -3240,6 +3240,7 @@ package android.service.quickaccesswallet {
    method @Nullable public android.content.Intent createWalletIntent();
    method @Nullable public android.content.Intent createWalletSettingsIntent();
    method public void disconnect();
    method @FlaggedApi("android.service.quickaccesswallet.launch_wallet_option_on_power_double_tap") public void getGestureTargetActivityPendingIntent(@NonNull java.util.concurrent.Executor, @NonNull android.service.quickaccesswallet.QuickAccessWalletClient.GesturePendingIntentCallback);
    method public void getWalletCards(@NonNull android.service.quickaccesswallet.GetWalletCardsRequest, @NonNull android.service.quickaccesswallet.QuickAccessWalletClient.OnWalletCardsRetrievedCallback);
    method public void getWalletCards(@NonNull java.util.concurrent.Executor, @NonNull android.service.quickaccesswallet.GetWalletCardsRequest, @NonNull android.service.quickaccesswallet.QuickAccessWalletClient.OnWalletCardsRetrievedCallback);
    method public void getWalletPendingIntent(@NonNull java.util.concurrent.Executor, @NonNull android.service.quickaccesswallet.QuickAccessWalletClient.WalletPendingIntentCallback);
@@ -3251,6 +3252,10 @@ package android.service.quickaccesswallet {
    method public void selectWalletCard(@NonNull android.service.quickaccesswallet.SelectWalletCardRequest);
  }

  @FlaggedApi("android.service.quickaccesswallet.launch_wallet_option_on_power_double_tap") public static interface QuickAccessWalletClient.GesturePendingIntentCallback {
    method @FlaggedApi("android.service.quickaccesswallet.launch_wallet_option_on_power_double_tap") public void onGesturePendingIntentRetrieved(@Nullable android.app.PendingIntent);
  }

  public static interface QuickAccessWalletClient.OnWalletCardsRetrievedCallback {
    method public void onWalletCardRetrievalError(@NonNull android.service.quickaccesswallet.GetWalletCardsError);
    method public void onWalletCardsRetrieved(@NonNull android.service.quickaccesswallet.GetWalletCardsResponse);
+2 −0
Original line number Diff line number Diff line
@@ -43,4 +43,6 @@ interface IQuickAccessWalletService {
    oneway void unregisterWalletServiceEventListener(in WalletServiceEventListenerRequest request);
    // Request to get a PendingIntent to launch an activity from which the user can manage their cards.
    oneway void onTargetActivityIntentRequested(in IQuickAccessWalletServiceCallbacks callbacks);
    // Request to get a PendingIntent to launch an activity, triggered when the user performs a gesture.
    oneway void onGestureTargetActivityIntentRequested(in IQuickAccessWalletServiceCallbacks callbacks);
   }
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -37,4 +37,6 @@ interface IQuickAccessWalletServiceCallbacks {
    oneway void onWalletServiceEvent(in WalletServiceEvent event);
    // Called in response to onTargetActivityIntentRequested. May only be called once per request.
    oneway void onTargetActivityPendingIntentReceived(in PendingIntent pendingIntent);
    //Called in response to onGesturePendingIntent
    oneway void onGestureTargetActivityPendingIntentReceived(in PendingIntent pendingIntent);
}
 No newline at end of file
+18 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.service.quickaccesswallet;

import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
@@ -180,6 +181,23 @@ public interface QuickAccessWalletClient extends Closeable {
        void onWalletPendingIntentRetrieved(@Nullable PendingIntent walletPendingIntent);
    }

    /**
     * Gets the {@link PendingIntent} provided by QuickAccessWalletService to be sent when the user
     * launches Wallet via gesture.
     */
    @FlaggedApi(Flags.FLAG_LAUNCH_WALLET_OPTION_ON_POWER_DOUBLE_TAP)
    void getGestureTargetActivityPendingIntent(
            @NonNull @CallbackExecutor Executor executor,
            @NonNull GesturePendingIntentCallback gesturePendingIntentCallback);

    /** Callback interface for getGesturePendingIntent. */
    @FlaggedApi(Flags.FLAG_LAUNCH_WALLET_OPTION_ON_POWER_DOUBLE_TAP)
    interface GesturePendingIntentCallback {
        /** Callback method for getGesturePendingIntent */
        @FlaggedApi(Flags.FLAG_LAUNCH_WALLET_OPTION_ON_POWER_DOUBLE_TAP)
        void onGesturePendingIntentRetrieved(@Nullable PendingIntent pendingIntent);
    }

    /**
     * The manifest entry for the QuickAccessWalletService may also publish information about the
     * activity that hosts the Wallet view. This is typically the home screen of the Wallet
Loading