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

This commit is contained in:
Silin Huang
2022-05-12 16:38:13 +00:00
committed by Android (Google) Code Review
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) {
mWalletButton.setImageDrawable(tileIcon);
}
updateWalletVisibility();
updateAffordanceColors();
post(() -> {
updateWalletVisibility();
updateAffordanceColors();
});
}
@Override
public void onWalletCardRetrievalError(@NonNull GetWalletCardsError error) {
mHasCard = false;
updateWalletVisibility();
updateAffordanceColors();
post(() -> {
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.WALLET_PREFERENCE_CHANGE;
import android.annotation.CallbackExecutor;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@@ -65,7 +64,6 @@ public class QuickAccessWalletController {
private static final long RECREATION_TIME_WINDOW = TimeUnit.MINUTES.toMillis(10L);
private final Context mContext;
private final Executor mExecutor;
private final Executor mCallbackExecutor;
private final Executor mBgExecutor;
private final SecureSettings mSecureSettings;
private final SystemClock mClock;
@@ -82,14 +80,12 @@ public class QuickAccessWalletController {
public QuickAccessWalletController(
Context context,
@Main Executor executor,
@CallbackExecutor Executor callbackExecutor,
@Background Executor bgExecutor,
SecureSettings secureSettings,
QuickAccessWalletClient quickAccessWalletClient,
SystemClock clock) {
mContext = context;
mExecutor = executor;
mCallbackExecutor = callbackExecutor;
mBgExecutor = bgExecutor;
mSecureSettings = secureSettings;
mQuickAccessWalletClient = quickAccessWalletClient;
@@ -180,7 +176,7 @@ public class QuickAccessWalletController {
int iconSizePx = mContext.getResources().getDimensionPixelSize(R.dimen.wallet_icon_size);
GetWalletCardsRequest request =
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,
ActivityLaunchAnimator.Controller animationController,
boolean hasCard) {
mQuickAccessWalletClient.getWalletPendingIntent(mCallbackExecutor,
mQuickAccessWalletClient.getWalletPendingIntent(mBgExecutor,
walletPendingIntent -> {
if (walletPendingIntent != null) {
startQuickAccessViaPendingIntent(walletPendingIntent, activityStarter,

View File

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