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

Commit 8833128a authored by Silin Huang's avatar Silin Huang
Browse files

Support non-active tokens in QuickAccessWallet.

1. Individual card states (active, pendingActivation, suspended) have
their own header icon and label. When scrolling between cards that have
different states, the icon and label will fade in/out.
2. The pendingActivation cards will have a verification button
underneath the card view; the button text is parsed from cards label.
3. Add an overflow menu for wallet view, it will navigate to Lock Screen
Settings page. (TODO in next CL)
4. Update the way we render header icon: because gmscore now provide new
version of icons, the programmatical tweaks no longer needed on the SysUI side.
5. Add Falsing prevention for the locked state wallet view:
cardImage/actionButton/appButton
6. Other UI polish: change the Wallet Tile secondary label to card last4
digits, etc.

demo:
https://drive.google.com/file/d/1syNnPFdIGh24sHWU2So-wsPxZTIg7xI9/view?usp=sharing&resourcekey=0-Iw3ZotiOJlE8jPImK7QQhQ

Test: manual
Test: atest
Bug: 186496392
Bug: 150332483
Fix: 184057200
Fix: 184905963
Change-Id: I84f487154104ffe1636c98ef1538bf99102c0442
parent ec726a4a
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:height="56dp"
        android:width="56dp" />
    <solid android:color="@android:color/transparent" />
    <stroke android:width="2dp" android:color="@color/GM2_grey_300" />
</shape>
+7 −0
Original line number Diff line number Diff line
@@ -19,6 +19,13 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false">
    <Toolbar
      android:id="@+id/action_bar"
      style="?android:attr/actionBarStyle"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@android:color/transparent"
      android:navigationContentDescription="@null" />
    <LinearLayout
        android:id="@+id/card_carousel_container"
        android:layout_width="match_parent"
+10 −9
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 The Android Open Source Project
<!--
     Copyright (C) 2021 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -13,11 +14,11 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <size
        android:height="56dp"
        android:width="56dp" />
    <solid android:color="@android:color/transparent" />
    <stroke android:width="2dp" android:color="#AECBFA" />
</shape>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
  <item
    android:id="@+id/wallet_lockscreen_settings"
    android:enabled="true"
    android:showAsAction="never"
    android:title="@string/wallet_lockscreen_settings_label"
    android:visible="true" />
</menu>
+1 −0
Original line number Diff line number Diff line
@@ -1477,6 +1477,7 @@

    <!-- Wallet activity screen specs -->
    <dimen name="wallet_icon_size">36sp</dimen>
    <dimen name="wallet_view_header_icon_size">56dp</dimen>
    <dimen name="card_margin">16dp</dimen>
    <dimen name="card_carousel_dot_offset">24dp</dimen>
    <dimen name="card_carousel_dot_unselected_radius">2dp</dimen>
+3 −3
Original line number Diff line number Diff line
@@ -1656,14 +1656,14 @@
    <string name="wallet_app_button_label">Show all</string>
    <!-- Label of the button underneath the card carousel prompting user unlock device. [CHAR LIMIT=NONE] -->
    <string name="wallet_action_button_label_unlock">Unlock to pay</string>
    <!-- Secondary label of the quick access wallet tile if active. [CHAR LIMIT=32] -->
    <string name="wallet_secondary_label_active">Ready</string>
    <!-- Secondary label of the quick access wallet tile if no card. [CHAR LIMIT=NONE] -->
    <string name="wallet_secondary_label_no_card">Set up payment</string>
    <string name="wallet_secondary_label_no_card">Not set up</string>
    <!-- Secondary label of the quick access wallet tile if device locked. [CHAR LIMIT=NONE] -->
    <string name="wallet_secondary_label_device_locked">Unlock to use</string>
    <!-- Message shown when an unknown failure occurred when fetching cards. [CHAR LIMIT=NONE] -->
    <string name="wallet_error_generic">There was a problem getting your cards, please try again later</string>
    <!-- Overflow menu item label to open the lockscreen settings in wallet activity. [CHAR LIMIT=NONE] -->
    <string name="wallet_lockscreen_settings_label">Lock screen settings</string>

    <!-- Name of the work status bar icon. -->
    <string name="status_bar_work">Work profile</string>
Loading