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:
@@ -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();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user