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

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

Merge "Add new config and API for QuickAccessWallet features."

parents 2c78597f 21d16aec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1642,6 +1642,7 @@ package android {
    field public static final int useEmbeddedDex = 16844190; // 0x101059e
    field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
    field public static final int useLevel = 16843167; // 0x101019f
    field public static final int useTargetActivityForQuickAccess;
    field public static final int userVisible = 16843409; // 0x1010291
    field public static final int usesCleartextTraffic = 16844012; // 0x10104ec
    field public static final int usesPermissionFlags = 16844356; // 0x1010644
@@ -38995,6 +38996,7 @@ package android.service.quickaccesswallet {
  public abstract class QuickAccessWalletService extends android.app.Service {
    ctor public QuickAccessWalletService();
    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);
    method public abstract void onWalletCardsRequested(@NonNull android.service.quickaccesswallet.GetWalletCardsRequest, @NonNull android.service.quickaccesswallet.GetWalletCardsCallback);
+6 −0
Original line number Diff line number Diff line
@@ -2357,12 +2357,14 @@ package android.service.quickaccesswallet {
    method public void disconnect();
    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);
    method public boolean isWalletFeatureAvailable();
    method public boolean isWalletFeatureAvailableWhenDeviceLocked();
    method public boolean isWalletServiceAvailable();
    method public void notifyWalletDismissed();
    method public void removeWalletServiceEventListener(@NonNull android.service.quickaccesswallet.QuickAccessWalletClient.WalletServiceEventListener);
    method public void selectWalletCard(@NonNull android.service.quickaccesswallet.SelectWalletCardRequest);
    method public boolean useTargetActivityForQuickAccess();
  }

  public static interface QuickAccessWalletClient.OnWalletCardsRetrievedCallback {
@@ -2370,6 +2372,10 @@ package android.service.quickaccesswallet {
    method public void onWalletCardsRetrieved(@NonNull android.service.quickaccesswallet.GetWalletCardsResponse);
  }

  public static interface QuickAccessWalletClient.WalletPendingIntentCallback {
    method public void onWalletPendingIntentRetrieved(@Nullable android.app.PendingIntent);
  }

  public static interface QuickAccessWalletClient.WalletServiceEventListener {
    method public void onWalletServiceEvent(@NonNull android.service.quickaccesswallet.WalletServiceEvent);
  }
+3 −1
Original line number Diff line number Diff line
@@ -41,4 +41,6 @@ interface IQuickAccessWalletService {
        in IQuickAccessWalletServiceCallbacks callback);
    // Unregister an event listener
    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);
   }
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.service.quickaccesswallet;

import android.app.PendingIntent;
import android.service.quickaccesswallet.GetWalletCardsError;
import android.service.quickaccesswallet.GetWalletCardsResponse;
import android.service.quickaccesswallet.WalletServiceEvent;
@@ -34,4 +35,6 @@ interface IQuickAccessWalletServiceCallbacks {
    // Called in response to registerWalletServiceEventListener. May be called multiple times as
    // long as the event listener is registered.
    oneway void onWalletServiceEvent(in WalletServiceEvent event);
    // Called in response to onTargetActivityIntentRequested. May only be called once per request.
    oneway void onTargetActivityPendingIntentReceived(in PendingIntent pendingIntent);
}
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.CallbackExecutor;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.TestApi;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
@@ -152,6 +153,21 @@ public interface QuickAccessWalletClient extends Closeable {
     */
    void disconnect();

    /**
     * The QuickAccessWalletService may provide a {@link PendingIntent} to start the activity that
     * hosts the Wallet view. This is typically the home screen of the Wallet application. If this
     * method returns null, the value returned by getWalletIntent() will be used instead.
     */
    void getWalletPendingIntent(@NonNull @CallbackExecutor Executor executor,
            @NonNull WalletPendingIntentCallback walletPendingIntentCallback);

    /**
     * Callback for getWalletPendingIntent.
     */
    interface WalletPendingIntentCallback {
        void onWalletPendingIntentRetrieved(@Nullable PendingIntent walletPendingIntent);
    }

    /**
     * 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
@@ -212,4 +228,15 @@ public interface QuickAccessWalletClient extends Closeable {
     */
    @Nullable
    CharSequence getShortcutLongLabel();

    /**
     * Return whether the system should use the component specified by the
     * {@link android:targetActivity} or
     * {@link QuickAccessWalletService#getTargetActivityPendingIntent()}
     * as the "quick access" , invoked directly by the system.
     * If false, the system will use the built-in UI instead of the component specified
     * in {@link android:targetActivity} or
     * {@link QuickAccessWalletService#getTargetActivityPendingIntent()}.
     */
    boolean useTargetActivityForQuickAccess();
}
Loading