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

Commit cf4f6e65 authored by Silin Huang's avatar Silin Huang Committed by Automerger Merge Worker
Browse files

Merge "Polish Wallet empty state view." into sc-dev am: ebcaa39d

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

Change-Id: I3ab99166760fe34dd51ee3d282ed787b29b93004
parents cebaa1f4 ebcaa39d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
        android:id="@+id/wallet_empty_state"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginHorizontal="16dp"
        android:layout_marginHorizontal="48dp"
        android:layout_marginTop="48dp"
        android:background="@drawable/wallet_empty_state_bg"
        android:orientation="vertical"
+4 −3
Original line number Diff line number Diff line
@@ -54,9 +54,12 @@
                    android:id="@+id/label"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    style="@style/Wallet.TextAppearance"
                    android:layout_marginHorizontal="48dp"
                    android:textColor="?androidprv:attr/textColorPrimary"
                    android:textAlignment="center"/>

                <include layout="@layout/wallet_empty_state"/>

                <com.android.systemui.wallet.ui.WalletCardCarousel
                    android:id="@+id/card_carousel"
                    android:layout_width="match_parent"
@@ -97,8 +100,6 @@
            android:layout_marginVertical="24dp"/>
    </LinearLayout>

    <include layout="@layout/wallet_empty_state"/>

    <TextView
        android:id="@+id/error_view"
        android:layout_width="match_parent"
+2 −0
Original line number Diff line number Diff line
@@ -1653,6 +1653,8 @@
    <!-- Wallet strings -->
    <!-- Wallet empty state, title [CHAR LIMIT=32] -->
    <string name="wallet_title">Wallet</string>
    <!-- Wallet empty state label. [CHAR LIMIT=NONE] -->
    <string name="wallet_empty_state_label">Get set up to make faster, more secure purchases with your phone</string>
    <!-- Label of the button at the bottom prompting user enter wallet app. [CHAR LIMIT=NONE] -->
    <string name="wallet_app_button_label">Show all</string>
    <!-- Label of the button underneath the card carousel prompting user unlock device. [CHAR LIMIT=NONE] -->
+1 −4
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ import com.android.systemui.wallet.controller.QuickAccessWalletController;
import com.android.systemui.wallet.ui.WalletActivity;

import java.util.List;
import java.util.concurrent.Executor;

import javax.inject.Inject;

@@ -71,7 +70,6 @@ public class QuickAccessWalletTile extends QSTileImpl<QSTile.State> {
    private final KeyguardStateController mKeyguardStateController;
    private final PackageManager mPackageManager;
    private final SecureSettings mSecureSettings;
    private final Executor mExecutor;
    private final QuickAccessWalletController mController;
    private final FeatureFlags mFeatureFlags;

@@ -91,7 +89,6 @@ public class QuickAccessWalletTile extends QSTileImpl<QSTile.State> {
            KeyguardStateController keyguardStateController,
            PackageManager packageManager,
            SecureSettings secureSettings,
            @Main Executor executor,
            QuickAccessWalletController quickAccessWalletController,
            FeatureFlags featureFlags) {
        super(host, backgroundLooper, mainHandler, falsingManager, metricsLogger,
@@ -100,7 +97,6 @@ public class QuickAccessWalletTile extends QSTileImpl<QSTile.State> {
        mKeyguardStateController = keyguardStateController;
        mPackageManager = packageManager;
        mSecureSettings = secureSettings;
        mExecutor = executor;
        mFeatureFlags = featureFlags;
    }

@@ -118,6 +114,7 @@ public class QuickAccessWalletTile extends QSTileImpl<QSTile.State> {
        if (listening) {
            mController.setupWalletChangeObservers(mCardRetriever, DEFAULT_PAYMENT_APP_CHANGE);
            if (!mController.getWalletClient().isWalletServiceAvailable()) {
                Log.i(TAG, "QAW service is unavailable, recreating the wallet client.");
                mController.reCreateWalletClient();
            }
            mController.queryWalletCards(mCardRetriever);
+0 −5
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.provider.Settings;
import android.service.quickaccesswallet.GetWalletCardsRequest;
import android.service.quickaccesswallet.QuickAccessWalletClient;
import android.service.quickaccesswallet.QuickAccessWalletClientImpl;
import android.util.Log;

import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
@@ -143,10 +142,6 @@ public class QuickAccessWalletController {
     */
    public void queryWalletCards(
            QuickAccessWalletClient.OnWalletCardsRetrievedCallback cardsRetriever) {
        if (!mWalletEnabled) {
            Log.w(TAG, "QuickAccessWallet is unavailable, unable to query cards.");
            return;
        }
        int cardWidth =
                mContext.getResources().getDimensionPixelSize(R.dimen.wallet_tile_card_view_width);
        int cardHeight =
Loading