Add new config and API for QuickAccessWallet features.
Adds a new configuration attribute for use in QuickAccessWalletService: * useTargetActivityForQuickAccess - this is a boolean, false by default. When true, the system will use the component specified by the android:targetActivity attribute instead of the SysUi's WalletActivity. Adds a new API method to QuickAccessWalletService: the method returns a PendingIntent that can be used in place of the targetActivity specified in the service's manifest entry. The method is not abstract; by default it returns null so that existing services will not have to make any changes to target android T. To make use of this feature, define a new method in QuickAccessWalletClient: useTargetActivityForQuickAccess() which provides the configuration for use by QuickAccessWalletController. Updates QuickAccessWalletController to define a new method: startQuickAccessUiIntent(), which reads the configuration as well as whether the service is providing any cards, and provides a centralized place to launch the correct Quick Access intent. The logic there is: 1. If a PendingIntent is provided from the service, use that. 2. If not, check for an active activity from the metadata in XML. 3. If that isn't available OR useTargetActivityForQuickAccess is false and the system is displaying cards, use WalletActivity provided by SystemUi. Addes tests for QuickAccessWalletController. CTS Test for QuickAccessWalletClient has new tests in a separate change in the same topic. In the course of development, discovered that unit tests for QuickAccessWalletController has been failing for as long as a year. Will fix that and update in a follow-up. Test: atest QuickAccessWalletControllerTest Test: atest QuickAccessWalletClientTest Bug: 215725263 Change-Id: Ifa3427d5e6f6b02e4afffa40453d1cb0f4f8ed67
Loading
Please register or sign in to comment