Merge "Remove @callbackExecutor from QAWController, because we don't have a dedicated CallbackExecutor in SysUI, it defaults to main or background." into tm-dev am: 34526c1ccf

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

Change-Id: Idf93ccd116c3f07a23c828bcbfe9eab096f77cee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Silin Huang
2022-05-12 17:26:44 +00:00
committed by Automerger Merge Worker
3 changed files with 10 additions and 11 deletions

View File

@@ -1198,15 +1198,19 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
if (tileIcon != null) { if (tileIcon != null) {
mWalletButton.setImageDrawable(tileIcon); mWalletButton.setImageDrawable(tileIcon);
} }
updateWalletVisibility(); post(() -> {
updateAffordanceColors(); updateWalletVisibility();
updateAffordanceColors();
});
} }
@Override @Override
public void onWalletCardRetrievalError(@NonNull GetWalletCardsError error) { public void onWalletCardRetrievalError(@NonNull GetWalletCardsError error) {
mHasCard = false; mHasCard = false;
updateWalletVisibility(); post(() -> {
updateAffordanceColors(); updateWalletVisibility();
updateAffordanceColors();
});
} }
} }
} }

View File

@@ -19,7 +19,6 @@ package com.android.systemui.wallet.controller;
import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.DEFAULT_PAYMENT_APP_CHANGE; import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.DEFAULT_PAYMENT_APP_CHANGE;
import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.WALLET_PREFERENCE_CHANGE; import static com.android.systemui.wallet.controller.QuickAccessWalletController.WalletChangeEvent.WALLET_PREFERENCE_CHANGE;
import android.annotation.CallbackExecutor;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@@ -65,7 +64,6 @@ public class QuickAccessWalletController {
private static final long RECREATION_TIME_WINDOW = TimeUnit.MINUTES.toMillis(10L); private static final long RECREATION_TIME_WINDOW = TimeUnit.MINUTES.toMillis(10L);
private final Context mContext; private final Context mContext;
private final Executor mExecutor; private final Executor mExecutor;
private final Executor mCallbackExecutor;
private final Executor mBgExecutor; private final Executor mBgExecutor;
private final SecureSettings mSecureSettings; private final SecureSettings mSecureSettings;
private final SystemClock mClock; private final SystemClock mClock;
@@ -82,14 +80,12 @@ public class QuickAccessWalletController {
public QuickAccessWalletController( public QuickAccessWalletController(
Context context, Context context,
@Main Executor executor, @Main Executor executor,
@CallbackExecutor Executor callbackExecutor,
@Background Executor bgExecutor, @Background Executor bgExecutor,
SecureSettings secureSettings, SecureSettings secureSettings,
QuickAccessWalletClient quickAccessWalletClient, QuickAccessWalletClient quickAccessWalletClient,
SystemClock clock) { SystemClock clock) {
mContext = context; mContext = context;
mExecutor = executor; mExecutor = executor;
mCallbackExecutor = callbackExecutor;
mBgExecutor = bgExecutor; mBgExecutor = bgExecutor;
mSecureSettings = secureSettings; mSecureSettings = secureSettings;
mQuickAccessWalletClient = quickAccessWalletClient; mQuickAccessWalletClient = quickAccessWalletClient;
@@ -180,7 +176,7 @@ public class QuickAccessWalletController {
int iconSizePx = mContext.getResources().getDimensionPixelSize(R.dimen.wallet_icon_size); int iconSizePx = mContext.getResources().getDimensionPixelSize(R.dimen.wallet_icon_size);
GetWalletCardsRequest request = GetWalletCardsRequest request =
new GetWalletCardsRequest(cardWidth, cardHeight, iconSizePx, /* maxCards= */ 1); new GetWalletCardsRequest(cardWidth, cardHeight, iconSizePx, /* maxCards= */ 1);
mQuickAccessWalletClient.getWalletCards(mExecutor, request, cardsRetriever); mQuickAccessWalletClient.getWalletCards(mBgExecutor, request, cardsRetriever);
} }
/** /**
@@ -212,7 +208,7 @@ public class QuickAccessWalletController {
public void startQuickAccessUiIntent(ActivityStarter activityStarter, public void startQuickAccessUiIntent(ActivityStarter activityStarter,
ActivityLaunchAnimator.Controller animationController, ActivityLaunchAnimator.Controller animationController,
boolean hasCard) { boolean hasCard) {
mQuickAccessWalletClient.getWalletPendingIntent(mCallbackExecutor, mQuickAccessWalletClient.getWalletPendingIntent(mBgExecutor,
walletPendingIntent -> { walletPendingIntent -> {
if (walletPendingIntent != null) { if (walletPendingIntent != null) {
startQuickAccessViaPendingIntent(walletPendingIntent, activityStarter, startQuickAccessViaPendingIntent(walletPendingIntent, activityStarter,

View File

@@ -100,7 +100,6 @@ public class QuickAccessWalletControllerTest extends SysuiTestCase {
mContext, mContext,
MoreExecutors.directExecutor(), MoreExecutors.directExecutor(),
MoreExecutors.directExecutor(), MoreExecutors.directExecutor(),
MoreExecutors.directExecutor(),
mSecureSettings, mSecureSettings,
mQuickAccessWalletClient, mQuickAccessWalletClient,
mClock); mClock);