Skip to content

Commit 564a08d

Browse files
authored
Add more dummies to TapAndPay service (#2577)
1 parent 35ab8af commit 564a08d

File tree

5 files changed

+54
-3
lines changed

5 files changed

+54
-3
lines changed

play-services-tapandpay/core/src/main/kotlin/org/microg/gms/tapandpay/TapAndPayService.kt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package org.microg.gms.tapandpay
66

77
import android.os.Parcel
8-
import android.os.RemoteException
98
import android.util.Log
109
import android.util.SparseArray
1110
import com.google.android.gms.common.Feature
@@ -36,20 +35,38 @@ class TapAndPayService : BaseService(TAG, GmsService.TAP_AND_PAY) {
3635
features = arrayOf(
3736
Feature("tapandpay", 1),
3837
Feature("tapandpay_account_linking", 1),
38+
Feature("tapandpay_add_service_listener", 1),
3939
Feature("tapandpay_block_payment_cards", 1),
4040
Feature("tapandpay_check_contactless_eligibility", 1),
4141
Feature("tapandpay_dismiss_quick_access_wallet", 1),
42+
Feature("tapandpay_enable_secure_keyguard", 1),
43+
Feature("tapandpay_felica_tos", 1),
44+
Feature("tapandpay_get_active_wallet_infos", 1L),
4245
Feature("tapandpay_get_all_cards_for_account", 1),
4346
Feature("tapandpay_get_contactless_setup_configuration", 1),
47+
Feature("tapandpay_get_environment", 1L),
4448
Feature("tapandpay_get_last_attestation_result", 1),
45-
Feature("tapandpay_get_token_pan", 1),
49+
Feature("tapandpay_get_stable_hardware_id", 1L),
50+
Feature("tapandpay_get_token_details", 1L),
51+
Feature("tapandpay_get_token_status", 1L),
4652
Feature("tapandpay_global_actions", 1),
53+
Feature("tapandpay_has_eligible_tokenization_target", 1L),
4754
Feature("tapandpay_issuer_api", 2),
4855
Feature("tapandpay_perform_tokenization_operation", 1),
4956
Feature("tapandpay_push_tokenize", 1),
57+
Feature("tapandpay_override_payment_network", 3L),
58+
Feature("tapandpay_get_parental_consent_intent", 1L),
59+
Feature("tapandpay_perform_secure_element_management_operation", 1L),
60+
Feature("tapandpay_perform_tokenization_operation", 1L),
5061
Feature("tapandpay_push_tokenize_session", 6),
62+
Feature("tapandpay_push_tokenize", 1L),
5163
Feature("tapandpay_quick_access_wallet", 1),
64+
Feature("tapandpay_report_unlock", 1L),
65+
Feature("tapandpay_request_delete_token", 1L),
66+
Feature("tapandpay_request_select_token", 1L),
5267
Feature("tapandpay_secureelement", 1),
68+
Feature("tapandpay_settings", 2L),
69+
Feature("tapandpay_token_listing_with_request", 1L),
5370
Feature("tapandpay_show_wear_card_management_view", 1),
5471
Feature("tapandpay_send_wear_request_to_phone", 1),
5572
Feature("tapandpay_sync_device_info", 1),
@@ -58,6 +75,8 @@ class TapAndPayService : BaseService(TAG, GmsService.TAP_AND_PAY) {
5875
Feature("tapandpay_tokenize_pan", 1),
5976
Feature("tapandpay_transmission_event", 1),
6077
Feature("tapandpay_token_listing", 3),
78+
Feature("tapandpay_wallet_ui_shown_status", 1L),
79+
Feature("tapandpay_wallet_set_tap_doodle_enabled", 1L),
6180
Feature("tapandpay_wallet_feedback_psd", 1)
6281
)
6382
})
@@ -101,6 +120,11 @@ class TapAndPayImpl : ITapAndPayService.Stub() {
101120
callbacks.onRefreshSeCardsResponse(Status.SUCCESS, RefreshSeCardsResponse())
102121
}
103122

123+
override fun getListTokens(callbacks: ITapAndPayServiceCallbacks) {
124+
Log.d(TAG, "getListTokensRequest: ")
125+
callbacks.onListTokensRetrieved(Status.SUCCESS, emptyArray())
126+
}
127+
104128
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean =
105129
warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
106130
}

play-services-tapandpay/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayService.aidl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ interface ITapAndPayService {
4747
void refreshSeCards(in RefreshSeCardsRequest request, ITapAndPayServiceCallbacks callbacks) = 56;
4848
// void tokenizeAccount(in TokenizeAccountRequest request, ITapAndPayServiceCallbacks callbacks) = 57;
4949
// void syncDeviceInfo(in SyncDeviceInfoRequest request, ITapAndPayServiceCallbacks callbacks) = 64;
50+
void getListTokens(ITapAndPayServiceCallbacks callbacks) = 73;
5051
}

play-services-tapandpay/src/main/aidl/com/google/android/gms/tapandpay/internal/ITapAndPayServiceCallbacks.aidl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import com.google.android.gms.tapandpay.firstparty.GetActiveAccountResponse;
55
import com.google.android.gms.tapandpay.firstparty.GetAllCardsResponse;
66
import com.google.android.gms.tapandpay.firstparty.RefreshSeCardsResponse;
77
import com.google.android.gms.tapandpay.issuer.TokenStatus;
8+
import com.google.android.gms.tapandpay.issuer.TokenInfo;
89

910
interface ITapAndPayServiceCallbacks {
1011
void onTokenSelected(in Status status) = 1;
@@ -50,7 +51,7 @@ interface ITapAndPayServiceCallbacks {
5051
// void onQuickAccessWalletConfig(in Status status, in QuickAccessWalletConfig config) = 46;
5152
// void onContactlessSetupStatusRetrieved(in Status status, in GetContactlessSetupStatusResponse response) = 47;
5253
void onIsTokenizedRetrieved(in Status status, boolean isTokenized) = 48;
53-
// void onListTokensRetrieved(in Status status, in TokenInfo[] tokens) = 49;
54+
void onListTokensRetrieved(in Status status, in TokenInfo[] tokens) = 49;
5455
// void onContactlessEligibilityRetrieved(in Status status, in CheckContactlessEligibilityResponse response) = 50;
5556
void onProto(in Status status, in byte[] proto) = 51;
5657
// void onPushProvisionSessionContextRetrieved(in Status status, in PushProvisionSessionContext context) = 52;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package com.google.android.gms.tapandpay.issuer;
2+
3+
parcelable TokenInfo;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 microG Project Team
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
package com.google.android.gms.tapandpay.issuer;
6+
7+
import android.os.Parcel;
8+
9+
import androidx.annotation.NonNull;
10+
11+
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
12+
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
13+
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter;
14+
15+
@SafeParcelable.Class
16+
public class TokenInfo extends AbstractSafeParcelable {
17+
public static final SafeParcelableCreatorAndWriter<TokenInfo> CREATOR = findCreator(TokenInfo.class);
18+
@Override
19+
public void writeToParcel(@NonNull Parcel dest, int flags) {
20+
CREATOR.writeToParcel(this, dest, flags);
21+
}
22+
}

0 commit comments

Comments
 (0)