Repo Created
This commit is contained in:
parent
eb305e2886
commit
a8c22c65db
4784 changed files with 329907 additions and 2 deletions
41
play-services-tapandpay/build.gradle
Normal file
41
play-services-tapandpay/build.gradle
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
android {
|
||||
namespace "com.google.android.gms.tapandpay"
|
||||
|
||||
compileSdkVersion androidCompileSdk
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
buildFeatures {
|
||||
aidl = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionName version
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing to publish yet
|
||||
//apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG API for play-services-tapandpay'
|
||||
|
||||
dependencies {
|
||||
api project(':play-services-base')
|
||||
|
||||
implementation "androidx.annotation:annotation:$annotationVersion"
|
||||
}
|
||||
56
play-services-tapandpay/core/build.gradle
Normal file
56
play-services-tapandpay/core/build.gradle
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
dependencies {
|
||||
api project(':play-services-tapandpay')
|
||||
|
||||
implementation project(':play-services-base-core')
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "org.microg.gms.tapandpay.core"
|
||||
|
||||
compileSdkVersion androidCompileSdk
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
defaultConfig {
|
||||
versionName version
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDirs = ['src/main/kotlin']
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'MissingTranslation'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = 1.8
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing to publish yet
|
||||
//apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG service implementation for play-services-tapandpay'
|
||||
16
play-services-tapandpay/core/src/main/AndroidManifest.xml
Normal file
16
play-services-tapandpay/core/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application>
|
||||
<service android:name="org.microg.gms.tapandpay.TapAndPayService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.tapandpay.service.BIND"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
package org.microg.gms.tapandpay
|
||||
|
||||
import android.os.Parcel
|
||||
import android.util.Log
|
||||
import android.util.SparseArray
|
||||
import com.google.android.gms.common.Feature
|
||||
import com.google.android.gms.common.api.CommonStatusCodes
|
||||
import com.google.android.gms.common.api.Status
|
||||
import com.google.android.gms.common.internal.ConnectionInfo
|
||||
import com.google.android.gms.common.internal.GetServiceRequest
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks
|
||||
import com.google.android.gms.tapandpay.TapAndPayStatusCodes.TAP_AND_PAY_NO_ACTIVE_WALLET
|
||||
import com.google.android.gms.tapandpay.firstparty.GetActiveAccountResponse
|
||||
import com.google.android.gms.tapandpay.firstparty.GetAllCardsResponse
|
||||
import com.google.android.gms.tapandpay.firstparty.RefreshSeCardsResponse
|
||||
import com.google.android.gms.tapandpay.internal.ITapAndPayService
|
||||
import com.google.android.gms.tapandpay.internal.ITapAndPayServiceCallbacks
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.GetActiveAccountRequest
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.GetAllCardsRequest
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.RefreshSeCardsRequest
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.SetActiveAccountRequest
|
||||
import org.microg.gms.BaseService
|
||||
import org.microg.gms.common.GmsService
|
||||
import org.microg.gms.utils.warnOnTransactionIssues
|
||||
|
||||
private const val TAG = "GmsTapAndPay"
|
||||
|
||||
class TapAndPayService : BaseService(TAG, GmsService.TAP_AND_PAY) {
|
||||
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
|
||||
callback.onPostInitCompleteWithConnectionInfo(CommonStatusCodes.SUCCESS, TapAndPayImpl(), ConnectionInfo().apply {
|
||||
features = arrayOf(
|
||||
Feature("tapandpay", 1),
|
||||
Feature("tapandpay_account_linking", 1),
|
||||
Feature("tapandpay_add_service_listener", 1),
|
||||
Feature("tapandpay_backup_and_restore_tokenize", 1),
|
||||
Feature("tapandpay_block_payment_cards", 1),
|
||||
Feature("tapandpay_check_contactless_eligibility", 1),
|
||||
Feature("tapandpay_check_notification_governance", 1),
|
||||
Feature("tapandpay_dismiss_quick_access_wallet", 1),
|
||||
Feature("tapandpay_enable_secure_keyguard", 1),
|
||||
Feature("tapandpay_felica_tos", 1),
|
||||
Feature("tapandpay_get_active_wallet_infos", 1L),
|
||||
Feature("tapandpay_get_all_cards_for_account", 1),
|
||||
Feature("tapandpay_get_contactless_setup_configuration", 1),
|
||||
Feature("tapandpay_get_data_for_backup", 1),
|
||||
Feature("tapandpay_get_environment", 1L),
|
||||
Feature("tapandpay_get_last_attestation_result", 1),
|
||||
Feature("tapandpay_get_quick_access_tile_status", 1),
|
||||
Feature("tapandpay_get_stable_hardware_id", 1L),
|
||||
Feature("tapandpay_get_token_details", 1L),
|
||||
Feature("tapandpay_get_token_status", 1L),
|
||||
Feature("tapandpay_global_actions", 1),
|
||||
Feature("tapandpay_has_eligible_tokenization_target", 1L),
|
||||
Feature("tapandpay_issuer_api", 2),
|
||||
Feature("tapandpay_issuer_tokenize", 1),
|
||||
Feature("tapandpay_override_payment_network", 3L),
|
||||
Feature("tapandpay_get_parental_consent_intent", 1L),
|
||||
Feature("tapandpay_set_supervised_child_account_type_and_reset_onboarding_info", 1L),
|
||||
Feature("tapandpay_get_is_supervised_child_wallet_user", 1L),
|
||||
Feature("tapandpay_perform_secure_element_management_operation", 1L),
|
||||
Feature("tapandpay_perform_tokenization_operation", 1L),
|
||||
Feature("tapandpay_polling_frame_handler", 1L),
|
||||
Feature("tapandpay_push_tokenize_session", 6),
|
||||
Feature("tapandpay_push_tokenize", 1L),
|
||||
Feature("tapandpay_quick_access_wallet", 1),
|
||||
Feature("tapandpay_report_unlock", 1L),
|
||||
Feature("tapandpay_request_delete_token", 1L),
|
||||
Feature("tapandpay_request_select_token", 1L),
|
||||
Feature("tapandpay_secureelement", 1),
|
||||
Feature("tapandpay_send_wear_request_to_phone", 1),
|
||||
Feature("tapandpay_settings", 2L),
|
||||
Feature("tapandpay_screen_logging", 1L),
|
||||
Feature("tapandpay_show_wear_card_management_view", 1),
|
||||
Feature("tapandpay_sync_device_info", 1),
|
||||
Feature("tapandpay_token_listing", 3),
|
||||
Feature("tapandpay_token_listing_with_request", 1),
|
||||
Feature("tapandpay_tokenize_account", 1),
|
||||
Feature("tapandpay_tokenize_cache", 1),
|
||||
Feature("tapandpay_tokenize_pan", 1),
|
||||
Feature("tapandpay_transmission_event", 1),
|
||||
Feature("tapandpay_wallet_feedback_psd", 1),
|
||||
Feature("tapandpay_wallet_set_tap_doodle_enabled", 1L),
|
||||
Feature("tapandpay_wallet_ui_shown_status", 1L),
|
||||
Feature("tapandpay_set_receives_ineligible_card_notification", 1L)
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
class TapAndPayImpl : ITapAndPayService.Stub() {
|
||||
|
||||
override fun getAllCards(request: GetAllCardsRequest?, callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getAllCards()")
|
||||
callbacks.onAllCardsRetrieved(Status.SUCCESS, GetAllCardsResponse(emptyArray(), null, null, null, SparseArray(), ByteArray(0)))
|
||||
}
|
||||
|
||||
override fun setActiveAccount(request: SetActiveAccountRequest?, callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "setActiveAccount(${request?.accountName})")
|
||||
callbacks.onActiveAccountSet(Status.SUCCESS)
|
||||
}
|
||||
|
||||
override fun getActiveAccount(request: GetActiveAccountRequest?, callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getActiveAccount()")
|
||||
callbacks.onActiveAccountDetermined(Status.SUCCESS, GetActiveAccountResponse(null))
|
||||
}
|
||||
|
||||
override fun registerDataChangedListener(callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "registerDataChangedListener()")
|
||||
callbacks.onStatus(Status.SUCCESS)
|
||||
}
|
||||
|
||||
override fun getActiveWalletId(callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getActiveWalletId: ")
|
||||
callbacks.onActiveWalletIdRetrieved(Status(TAP_AND_PAY_NO_ACTIVE_WALLET), "")
|
||||
}
|
||||
|
||||
override fun getTokenStatus(tokenProvider: Int, issuerTokenId: String, callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getTokenStatus($tokenProvider, $issuerTokenId)")
|
||||
callbacks.onTokenStatusRetrieved(Status(TAP_AND_PAY_NO_ACTIVE_WALLET), null)
|
||||
}
|
||||
|
||||
override fun getStableHardwareId(callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getStableHardwareId()")
|
||||
callbacks.onStableHardwareIdRetrieved(Status.SUCCESS, "")
|
||||
}
|
||||
|
||||
override fun refreshSeCards(request: RefreshSeCardsRequest?, callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "refreshSeCards()")
|
||||
callbacks.onRefreshSeCardsResponse(Status.SUCCESS, RefreshSeCardsResponse())
|
||||
}
|
||||
|
||||
override fun getListTokens(callbacks: ITapAndPayServiceCallbacks) {
|
||||
Log.d(TAG, "getListTokensRequest: ")
|
||||
callbacks.onListTokensRetrieved(Status.SUCCESS, emptyArray())
|
||||
}
|
||||
|
||||
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean =
|
||||
warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
|
||||
}
|
||||
6
play-services-tapandpay/src/main/AndroidManifest.xml
Normal file
6
play-services-tapandpay/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest />
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
parcelable GetActiveAccountResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
parcelable GetAllCardsResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
parcelable RefreshSeCardsResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
parcelable TokenStatus;
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.google.android.gms.tapandpay.internal;
|
||||
|
||||
import com.google.android.gms.tapandpay.internal.ITapAndPayServiceCallbacks;
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.GetActiveAccountRequest;
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.GetAllCardsRequest;
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.RefreshSeCardsRequest;
|
||||
import com.google.android.gms.tapandpay.internal.firstparty.SetActiveAccountRequest;
|
||||
|
||||
interface ITapAndPayService {
|
||||
// void setSelectedToken(in SetSelectedTokenRequest request, ITapAndPayServiceCallbacks callbacks) = 0;
|
||||
void getAllCards(in GetAllCardsRequest request, ITapAndPayServiceCallbacks callbacks) = 1;
|
||||
// void deleteToken(in DeleteTokenRequest request, ITapAndPayServiceCallbacks callbacks) = 2;
|
||||
// void firstPartyTokenizePan(in FirstPartyTokenizePanRequest request, ITapAndPayServiceCallbacks callbacks) = 3;
|
||||
void setActiveAccount(in SetActiveAccountRequest request, ITapAndPayServiceCallbacks callbacks) = 4;
|
||||
// void showSecurityPrompt(in ShowSecurityPromptRequest request, ITapAndPayServiceCallbacks callbacks) = 7;
|
||||
void getActiveAccount(in GetActiveAccountRequest request, ITapAndPayServiceCallbacks callbacks) = 8;
|
||||
void registerDataChangedListener(ITapAndPayServiceCallbacks callbacks) = 9;
|
||||
// void isDeviceUnlockedForPayment(in IsDeviceUnlockedForPaymentRequest request, ITapAndPayServiceCallbacks callbacks) = 10;
|
||||
// void promptDeviceUnlockForPayment(in PromptDeviceUnlockForPaymentRequest request, ITapAndPayServiceCallbacks callbacks) = 11;
|
||||
// void sendTapEvent(in SendTapEventRequest request, ITapAndPayServiceCallbacks callbacks) = 12;
|
||||
// void getReceivesTransactionNotification(in GetReceivesTransactionNotificationsRequest request, ITapAndPayServiceCallbacks callbacks) = 13;
|
||||
// void setReceivesTransactionNotification(in SetReceivesTransactionNotificationsRequest request, ITapAndPayServiceCallbacks callbacks) = 14;
|
||||
// void retrieveInAppPaymentCredential(in RetrieveInAppPaymentCredentialRequest request, ITapAndPayServiceCallbacks callbacks) = 15;
|
||||
// void getActiveCardsForAccount(in GetActiveCardsForAccountRequest request, ITapAndPayServiceCallbacks callbacks) = 17;
|
||||
// void getAnalyticsContext(ITapAndPayServiceCallbacks callbacks) = 19;
|
||||
void getActiveWalletId(ITapAndPayServiceCallbacks callbacks) = 20;
|
||||
void getTokenStatus(int tokenProvider, String issuerTokenId, ITapAndPayServiceCallbacks callbacks) = 21;
|
||||
// void issuerTokenize(int tokenProvider, String issuerTokenId, String s2, ITapAndPayServiceCallbacks callbacks) = 22;
|
||||
// void requestSelectToken(int tokenProvider, String issuerTokenId, ITapAndPayServiceCallbacks callbacks) = 23;
|
||||
// void requestDeleteToken(int tokenProvider, String issuerTokenId, ITapAndPayServiceCallbacks callbacks) = 24;
|
||||
// void isDeviceUnlockedForInAppPayment(in IsDeviceUnlockedForInAppPaymentRequest request, ITapAndPayServiceCallbacks callbacks) = 25;
|
||||
// void reportInAppTransactionCompleted(in ReportInAppTransactionCompletedRequest request, ITapAndPayServiceCallbacks callbacks) = 26;
|
||||
// void pushTokenize(in PushTokenizeRequest request, ITapAndPayServiceCallbacks callbacks) = 27;
|
||||
// void createWallet(ITapAndPayServiceCallbacks callbacks) = 28;
|
||||
void getStableHardwareId(ITapAndPayServiceCallbacks callbacks) = 29;
|
||||
// void getEnvironment(ITapAndPayServiceCallbacks callbacks) = 30;
|
||||
// void enablePayOnWear(in EnablePayOnWearRequest request, ITapAndPayServiceCallbacks callbacks) = 31;
|
||||
// void isPayPalAvailable(ITapAndPayServiceCallbacks callbacks) = 32;
|
||||
// void getSecurityParams(ITapAndPayServiceCallbacks callbacks) = 34;
|
||||
// void getNotificationSettings(in GetNotificationSettingsRequest request, ITapAndPayServiceCallbacks callbacks) = 36;
|
||||
// void setNotificationSettings(in SetNotificationSettingsRequest request, ITapAndPayServiceCallbacks callbacks) = 37;
|
||||
// void addOtherPaymentOption(in AddOtherPaymentOptionRequest request, ITapAndPayServiceCallbacks callbacks) = 38;
|
||||
// void getAvailableOtherPaymentMethods(in GetAvailableOtherPaymentMethodsRequest request, ITapAndPayServiceCallbacks callbacks) = 39;
|
||||
// Status enableNfc() = 42;
|
||||
// void getSeChipTransactions(in GetSeChipTransactionsRequest request, ITapAndPayServiceCallbacks callbacks) = 48;
|
||||
// void disableSelectedToken(in DisableSelectedTokenRequest request, ITapAndPayServiceCallbacks callbacks) = 52;
|
||||
void refreshSeCards(in RefreshSeCardsRequest request, ITapAndPayServiceCallbacks callbacks) = 56;
|
||||
// void tokenizeAccount(in TokenizeAccountRequest request, ITapAndPayServiceCallbacks callbacks) = 57;
|
||||
// void syncDeviceInfo(in SyncDeviceInfoRequest request, ITapAndPayServiceCallbacks callbacks) = 64;
|
||||
void getListTokens(ITapAndPayServiceCallbacks callbacks) = 73;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.google.android.gms.tapandpay.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.tapandpay.firstparty.GetActiveAccountResponse;
|
||||
import com.google.android.gms.tapandpay.firstparty.GetAllCardsResponse;
|
||||
import com.google.android.gms.tapandpay.firstparty.RefreshSeCardsResponse;
|
||||
import com.google.android.gms.tapandpay.issuer.TokenStatus;
|
||||
import com.google.android.gms.tapandpay.issuer.TokenInfo;
|
||||
|
||||
interface ITapAndPayServiceCallbacks {
|
||||
void onTokenSelected(in Status status) = 1;
|
||||
void onHandleStatusPendingIntent(in Status status, in Bundle data) = 2;
|
||||
void onAllCardsRetrieved(in Status status, in GetAllCardsResponse response) = 3;
|
||||
void onTokenDeleted(in Status status) = 4;
|
||||
void onActiveAccountSet(in Status status) = 5;
|
||||
void onActiveAccountDetermined(in Status status, in GetActiveAccountResponse response) = 7;
|
||||
void onStatus(in Status status) = 8;
|
||||
void onDataChanged() = 9;
|
||||
void onDeviceUnlockStatusDetermined(in Status status, boolean isDeviceUnlockedForPayment) = 10;
|
||||
void onTapSent(in Status status) = 11;
|
||||
void onReceivesTransactionNotificationsRetrieved(in Status status, boolean receivesTransactionNotifications) = 12;
|
||||
void onReceivesTransactionNotificationsSet(in Status status) = 13;
|
||||
// void onActiveCardsForAccountRetrieved(in Status status, in GetActiveCardsForAccountResponse response) = 14;
|
||||
// void onInAppPaymentCredentialRetrieved(in Status status, in RetrieveInAppPaymentCredentialResponse response) = 16;
|
||||
void onAnalyticsContextRetrieved(in Status status, String analyticsContext) = 17;
|
||||
void onActiveWalletIdRetrieved(in Status status, String walletId) = 18;
|
||||
void onTokenStatusRetrieved(in Status status, in TokenStatus tokenStatus) = 19;
|
||||
void onDeviceUnlockStatusDeterminedForInAppPayment(in Status status, boolean isDeviceUnlockedForInAppPayment) = 20;
|
||||
void onIncreaseInAppTransaction(in Status status) = 21;
|
||||
void onStableHardwareIdRetrieved(in Status status, String stableHardwareId) = 22;
|
||||
void onEnvironmentRetrieved(in Status status, String env) = 23;
|
||||
void onEnablePayOnWear(in Status status) = 24;
|
||||
void onIsPayPalAvailableResponse(in Status status, boolean IsPayPalAvailable) = 25;
|
||||
// void onSecurityPraramsDetermined(in Status status, in GetSecurityParamsResponse response) = 26;
|
||||
// void onNotificationSettingsRetrieved(in Status status, in GetNotificationSettingsResponse response) = 27;
|
||||
void onNotificationSettingsSet(in Status status) = 28;
|
||||
// void onAvailableOtherPaymentMethodsRetrieved(in Status status, in GetAvailableOtherPaymentMethodsResponse response) = 29;
|
||||
// void onActiveTokensForAccountRetrieved(in Status status, in GetActiveTokensForAccountResponse response) = 30;
|
||||
// void onSeChipTransactionsRetrieved(in Status status, in GetSeChipTransactionsResponse response) = 34;
|
||||
// void onReserveResourceResponse(in Status status, in ReserveResourceResponse response) = 35;
|
||||
void onReleaseResourceResponse(in Status status) = 36;
|
||||
void onSelectedTokenDisabled(in Status status) = 37;
|
||||
// void onFelicaTosAcceptanceRetrieved(in Status status, in GetFelicaTosAcceptanceResponse response) = 38;
|
||||
void onFelicaTosAcceptanceSet(in Status status) = 39;
|
||||
void onRefreshSeCardsResponse(in Status status, in RefreshSeCardsResponse response) = 40;
|
||||
// void onGlobalActionCardsRetrieved(in Status status, in GetGlobalActionCardsResponse response) = 41;
|
||||
void onLinkingTokenRetrieved(in Status status, String linkingToken) = 42;
|
||||
void onPaymentCardsBlocked(in Status status) = 43;
|
||||
void onPaymentCardsUnblocked(in Status status) = 44;
|
||||
// void onLastAttestationResultRetrieved(in Status status, in GetLastAttestationResultResponse response) = 45;
|
||||
// void onQuickAccessWalletConfig(in Status status, in QuickAccessWalletConfig config) = 46;
|
||||
// void onContactlessSetupStatusRetrieved(in Status status, in GetContactlessSetupStatusResponse response) = 47;
|
||||
void onIsTokenizedRetrieved(in Status status, boolean isTokenized) = 48;
|
||||
void onListTokensRetrieved(in Status status, in TokenInfo[] tokens) = 49;
|
||||
// void onContactlessEligibilityRetrieved(in Status status, in CheckContactlessEligibilityResponse response) = 50;
|
||||
void onProto(in Status status, in byte[] proto) = 51;
|
||||
// void onPushProvisionSessionContextRetrieved(in Status status, in PushProvisionSessionContext context) = 52;
|
||||
void onTokenPanRetrieved(in Status status, String tokenPan) = 53;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
parcelable GetActiveAccountRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
parcelable GetAllCardsRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
parcelable RefreshSeCardsRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
parcelable SetActiveAccountRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.issuer;
|
||||
|
||||
parcelable TokenInfo;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.tapandpay.issuer;
|
||||
|
||||
parcelable TokenStatus;
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay;
|
||||
|
||||
import com.google.android.gms.common.api.CommonStatusCodes;
|
||||
|
||||
import org.microg.gms.common.PublicApi;
|
||||
|
||||
@PublicApi
|
||||
public class TapAndPayStatusCodes extends CommonStatusCodes {
|
||||
public static final int TAP_AND_PAY_NO_ACTIVE_WALLET = 15002;
|
||||
public static final int TAP_AND_PAY_TOKEN_NOT_FOUND = 15003;
|
||||
public static final int TAP_AND_PAY_INVALID_TOKEN_STATE = 15004;
|
||||
public static final int TAP_AND_PAY_ATTESTATION_ERROR = 15005;
|
||||
public static final int TAP_AND_PAY_UNAVAILABLE = 15009;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import org.microg.gms.utils.ToStringHelper;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AccountInfo extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public final String accountId;
|
||||
@Field(3)
|
||||
public final String accountName;
|
||||
|
||||
private AccountInfo() {
|
||||
accountId = null;
|
||||
accountName = null;
|
||||
}
|
||||
|
||||
public AccountInfo(String accountId, String accountName) {
|
||||
this.accountId = accountId;
|
||||
this.accountName = accountName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (!(obj instanceof AccountInfo)) return false;
|
||||
return Objects.equals(accountId, ((AccountInfo) obj).accountId) && Objects.equals(accountName, ((AccountInfo) obj).accountName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(new Object[]{accountId, accountName});
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringHelper("AccountInfo")
|
||||
.field("accountId", accountId)
|
||||
.field("accountName", accountName)
|
||||
.end();
|
||||
}
|
||||
|
||||
public static final Creator<AccountInfo> CREATOR = new AutoCreator<>(AccountInfo.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class CardInfo extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public String billingCardId;
|
||||
@Field(3)
|
||||
public byte[] serverToken;
|
||||
@Field(4)
|
||||
public String cardholderName;
|
||||
@Field(5)
|
||||
public String displayName;
|
||||
@Field(6)
|
||||
public int cardNetwork;
|
||||
@Field(7)
|
||||
public TokenStatus tokenStatus;
|
||||
@Field(8)
|
||||
public String panLastDigits;
|
||||
@Field(9)
|
||||
public String cardImageUrl;
|
||||
@Field(10)
|
||||
public int cardColor;
|
||||
@Field(11)
|
||||
public int overlayTextColor;
|
||||
// @Field(12)
|
||||
// public IssuerInfo issuerInfo;
|
||||
@Field(13)
|
||||
public String tokenLastDigits;
|
||||
// @Field(15)
|
||||
// public TransactionInfo transactionInfo;
|
||||
@Field(16)
|
||||
public String ssuerTokenId;
|
||||
@Field(17)
|
||||
public byte[] inAppCardToken;
|
||||
@Field(18)
|
||||
public int cachedEligibility;
|
||||
@Field(20)
|
||||
public int paymentProtocol;
|
||||
@Field(21)
|
||||
public int tokenType;
|
||||
// @Field(22)
|
||||
// public InStoreCvmConfig inStoreCvmConfig;
|
||||
// @Field(23)
|
||||
// public InAppCvmConfig inAppCvmConfig;
|
||||
@Field(24)
|
||||
public String tokenDisplayName;
|
||||
// @Field(25)
|
||||
// public OnlineAccountCardLinkInfo[] onlineAccountCardLinkInfos;
|
||||
@Field(26)
|
||||
public boolean allowAidSelection;
|
||||
// @Field(27)
|
||||
// public List badges;
|
||||
@Field(28)
|
||||
public boolean upgradeAvailable;
|
||||
@Field(29)
|
||||
public boolean requiresSignature;
|
||||
@Field(30)
|
||||
public long googleTokenId;
|
||||
@Field(31)
|
||||
public long lastTapTimestamp;
|
||||
@Field(32)
|
||||
public boolean isTransit;
|
||||
@Field(33)
|
||||
public long googleWalletId;
|
||||
@Field(34)
|
||||
public String devicePaymentMethodId;
|
||||
@Field(35)
|
||||
public String cloudPaymentMethodId;
|
||||
// @Field(36)
|
||||
// public CardRewardsInfo cardRewardsInfo;
|
||||
@Field(37)
|
||||
public int tapStrategy;
|
||||
@Field(38)
|
||||
public boolean hideFromGlobalActions;
|
||||
@Field(39)
|
||||
public String rawPanLastDigits;
|
||||
@Field(40)
|
||||
public int cardDisplayType;
|
||||
|
||||
public static final Creator<CardInfo> CREATOR = new AutoCreator<>(CardInfo.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class GetActiveAccountResponse extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
@Nullable
|
||||
public final AccountInfo accountInfo;
|
||||
|
||||
private GetActiveAccountResponse() {
|
||||
accountInfo = null;
|
||||
}
|
||||
|
||||
public GetActiveAccountResponse(@Nullable AccountInfo accountInfo) {
|
||||
this.accountInfo = accountInfo;
|
||||
}
|
||||
|
||||
public static final Creator<GetActiveAccountResponse> CREATOR = new AutoCreator<>(GetActiveAccountResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import android.util.SparseArray;
|
||||
import androidx.annotation.Nullable;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class GetAllCardsResponse extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public final CardInfo[] cardInfos;
|
||||
@Field(3)
|
||||
public final AccountInfo accountInfo;
|
||||
@Field(4)
|
||||
public final String defaultClientTokenId;
|
||||
@Field(5)
|
||||
public final String overrideClientTokenId;
|
||||
// FIXME: Add support for SparseArray in SafeParcelable library
|
||||
// @Field(6)
|
||||
public final SparseArray<String> seDefaultCards;
|
||||
@Field(7)
|
||||
public final byte[] wearSortOrder;
|
||||
|
||||
private GetAllCardsResponse() {
|
||||
cardInfos = new CardInfo[0];
|
||||
accountInfo = null;
|
||||
defaultClientTokenId = null;
|
||||
overrideClientTokenId = null;
|
||||
seDefaultCards = new SparseArray<>();
|
||||
wearSortOrder = new byte[0];
|
||||
}
|
||||
|
||||
public GetAllCardsResponse(CardInfo[] cardInfos, AccountInfo accountInfo, String defaultClientTokenId, String overrideClientTokenId, SparseArray<String> seDefaultCards, byte[] wearSortOrder) {
|
||||
this.cardInfos = cardInfos;
|
||||
this.accountInfo = accountInfo;
|
||||
this.defaultClientTokenId = defaultClientTokenId;
|
||||
this.overrideClientTokenId = overrideClientTokenId;
|
||||
this.seDefaultCards = seDefaultCards;
|
||||
this.wearSortOrder = wearSortOrder;
|
||||
}
|
||||
|
||||
public static final Creator<GetAllCardsResponse> CREATOR = new AutoCreator<>(GetAllCardsResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class RefreshSeCardsResponse extends AutoSafeParcelable {
|
||||
public static final Creator<RefreshSeCardsResponse> CREATOR = new AutoCreator<>(RefreshSeCardsResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class TokenReference extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public String tokenReferenceId;
|
||||
@Field(3)
|
||||
public int tokenProvider;
|
||||
|
||||
public static final Creator<TokenReference> CREATOR = new AutoCreator<>(TokenReference.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class TokenStatus extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public TokenReference tokenReference;
|
||||
@Field(3)
|
||||
public int tokenState;
|
||||
@Field(4)
|
||||
public boolean isSelected;
|
||||
|
||||
public static final Creator<TokenStatus> CREATOR = new AutoCreator<>(TokenStatus.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class GetActiveAccountRequest extends AutoSafeParcelable {
|
||||
public static final Creator<GetActiveAccountRequest> CREATOR = new AutoCreator<>(GetActiveAccountRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
import android.accounts.Account;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class GetAllCardsRequest extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public boolean refreshSeCards;
|
||||
@Field(3)
|
||||
public Account account;
|
||||
@Field(4)
|
||||
public int sortOrderCollectionId;
|
||||
|
||||
public static final Creator<GetAllCardsRequest> CREATOR = new AutoCreator<>(GetAllCardsRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class RefreshSeCardsRequest extends AutoSafeParcelable {
|
||||
public static final Creator<RefreshSeCardsRequest> CREATOR = new AutoCreator<>(RefreshSeCardsRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.internal.firstparty;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class SetActiveAccountRequest extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public String accountName;
|
||||
@Field(3)
|
||||
public boolean allowSetupErrorMessage;
|
||||
|
||||
public static final Creator<SetActiveAccountRequest> CREATOR = new AutoCreator<>(SetActiveAccountRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2024 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
package com.google.android.gms.tapandpay.issuer;
|
||||
|
||||
import android.os.Parcel;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter;
|
||||
|
||||
@SafeParcelable.Class
|
||||
public class TokenInfo extends AbstractSafeParcelable {
|
||||
public static final SafeParcelableCreatorAndWriter<TokenInfo> CREATOR = findCreator(TokenInfo.class);
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
CREATOR.writeToParcel(this, dest, flags);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.tapandpay.issuer;
|
||||
|
||||
import org.microg.gms.common.PublicApi;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@PublicApi
|
||||
public class TokenStatus extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
@PublicApi(exclude = true)
|
||||
public String issuerTokenId;
|
||||
@Field(3)
|
||||
@PublicApi(exclude = true)
|
||||
private int tokenState;
|
||||
@Field(4)
|
||||
@PublicApi(exclude = true)
|
||||
private boolean isSelected;
|
||||
|
||||
public int getTokenState() {
|
||||
return tokenState;
|
||||
}
|
||||
|
||||
public boolean isSelected() {
|
||||
return isSelected;
|
||||
}
|
||||
|
||||
public static final Creator<TokenStatus> CREATOR = new AutoCreator<>(TokenStatus.class);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue