Repo Created
This commit is contained in:
parent
eb305e2886
commit
a8c22c65db
4784 changed files with 329907 additions and 2 deletions
45
play-services-auth-base/build.gradle
Normal file
45
play-services-auth-base/build.gradle
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 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.auth"
|
||||
|
||||
compileSdkVersion androidCompileSdk
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
buildFeatures {
|
||||
aidl = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionName version
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
}
|
||||
|
||||
apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG implementation of play-services-auth-base'
|
||||
|
||||
dependencies {
|
||||
// Dependencies from play-services-auth-base:18.3.0
|
||||
api 'androidx.collection:collection:1.0.0'
|
||||
api project(':play-services-basement')
|
||||
api project(':play-services-base')
|
||||
api project(':play-services-tasks')
|
||||
api 'org.jetbrains.kotlin:kotlin-stdlib:1.9.0'
|
||||
|
||||
annotationProcessor project(':safe-parcel-processor')
|
||||
}
|
||||
6
play-services-auth-base/src/main/AndroidManifest.xml
Normal file
6
play-services-auth-base/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest />
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.google.android.auth;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.accounts.Account;
|
||||
|
||||
import com.google.android.gms.auth.AccountChangeEventsResponse;
|
||||
import com.google.android.gms.auth.AccountChangeEventsRequest;
|
||||
import com.google.android.gms.auth.GetHubTokenRequest;
|
||||
import com.google.android.gms.auth.GetHubTokenInternalResponse;
|
||||
import com.google.android.gms.auth.HasCapabilitiesRequest;
|
||||
|
||||
interface IAuthManagerService {
|
||||
Bundle getToken(String accountName, String scope, in Bundle extras) = 0;
|
||||
Bundle clearToken(String token, in Bundle extras) = 1;
|
||||
AccountChangeEventsResponse getChangeEvents(in AccountChangeEventsRequest request) = 2;
|
||||
|
||||
Bundle getTokenWithAccount(in Account account, String scope, in Bundle extras) = 4;
|
||||
Bundle getAccounts(in Bundle extras) = 5;
|
||||
Bundle removeAccount(in Account account) = 6;
|
||||
Bundle requestGoogleAccountsAccess(String packageName) = 7;
|
||||
int hasCapabilities(in HasCapabilitiesRequest request) = 8;
|
||||
GetHubTokenInternalResponse getHubToken(in GetHubTokenRequest request, in Bundle extras) = 9;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable AccountChangeEventsRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable AccountChangeEventsResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable GetAccountsRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable GetHubTokenInternalResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable GetHubTokenRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth;
|
||||
|
||||
parcelable HasCapabilitiesRequest;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IBundleCallback {
|
||||
void onBundle(in Status status, in Bundle bundle) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.auth.AccountChangeEventsResponse;
|
||||
|
||||
interface IGetAccountChangeEventsCallback {
|
||||
void onAccountChangeEventsResponse(in Status status, in AccountChangeEventsResponse response) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IGetAccountsCallback {
|
||||
void onBundle(in Status status, in List<Account> bundle) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.auth.GetHubTokenInternalResponse;
|
||||
|
||||
interface IGetHubTokenCallback {
|
||||
void onGetHubTokenResponse(in Status status, in GetHubTokenInternalResponse bundle) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IGetTokenWithDetailsCallback {
|
||||
void onTokenResults(in Status status, in Bundle bundle) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import android.accounts.Account;
|
||||
|
||||
import com.google.android.gms.auth.AccountChangeEventsRequest;
|
||||
import com.google.android.gms.auth.GetAccountsRequest;
|
||||
import com.google.android.gms.auth.GetHubTokenRequest;
|
||||
import com.google.android.gms.auth.HasCapabilitiesRequest;
|
||||
import com.google.android.gms.auth.account.data.IBundleCallback;
|
||||
import com.google.android.gms.auth.account.data.IGetAccountChangeEventsCallback;
|
||||
import com.google.android.gms.auth.account.data.IGetAccountsCallback;
|
||||
import com.google.android.gms.auth.account.data.IGetHubTokenCallback;
|
||||
import com.google.android.gms.auth.account.data.IGetTokenWithDetailsCallback;
|
||||
import com.google.android.gms.auth.account.data.IHasCapabilitiesCallback;
|
||||
import com.google.android.gms.auth.firstparty.dataservice.ClearTokenRequest;
|
||||
import com.google.android.gms.common.api.internal.IStatusCallback;
|
||||
|
||||
interface IGoogleAuthService {
|
||||
void getTokenWithDetails(IGetTokenWithDetailsCallback callback, in Account account, String service, in Bundle extras) = 0;
|
||||
void clearToken(IStatusCallback callback, in ClearTokenRequest request) = 1;
|
||||
void requestAccountsAccess(IBundleCallback callback, String str) = 2;
|
||||
void getAccountChangeEvents(IGetAccountChangeEventsCallback callback, in AccountChangeEventsRequest request) = 3;
|
||||
void getAccounts(IGetAccountsCallback callback, in GetAccountsRequest request) = 4;
|
||||
void removeAccount(IBundleCallback callback, in Account account) = 5;
|
||||
void hasCapabilities(IHasCapabilitiesCallback callback, in HasCapabilitiesRequest request) = 6;
|
||||
void getHubToken(IGetHubTokenCallback callback, in GetHubTokenRequest request) = 7;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.google.android.gms.auth.account.data;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IHasCapabilitiesCallback {
|
||||
void onHasCapabilities(in Status status, int mode) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.google.android.gms.auth.api.internal;
|
||||
|
||||
import com.google.android.gms.auth.api.proxy.ProxyResponse;
|
||||
|
||||
interface IAuthCallbacks {
|
||||
void onProxyResponse(in ProxyResponse response) = 0;
|
||||
void onSpatulaHeader(String spatulaHeader) = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.google.android.gms.auth.api.internal;
|
||||
|
||||
import com.google.android.gms.auth.api.internal.IAuthCallbacks;
|
||||
//import com.google.android.gms.auth.api.proxy.ProxyGrpcRequest;
|
||||
import com.google.android.gms.auth.api.proxy.ProxyRequest;
|
||||
|
||||
interface IAuthService {
|
||||
void performProxyRequest(IAuthCallbacks callbacks, in ProxyRequest request) = 0;
|
||||
// void performProxyGrpcRequest(IAuthCallback callbacks, in ProxyGrpcRequest request) = 1;
|
||||
void getSpatulaHeader(IAuthCallbacks callbacks) = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth.api.proxy;
|
||||
|
||||
parcelable ProxyRequest;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth.api.proxy;
|
||||
|
||||
parcelable ProxyResponse;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
package com.google.android.gms.auth.firstparty.dataservice;
|
||||
|
||||
parcelable ClearTokenRequest;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.firstparty.dataservice;
|
||||
|
||||
parcelable DeviceManagementInfoResponse;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
parcelable RecoveryRequest;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
parcelable RecoveryResult;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
parcelable SharedKey;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IBooleanCallback {
|
||||
void onResult(in Status status, boolean result);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IByteArrayCallback {
|
||||
void onResult(in Status status, in byte[] bArr);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IByteArrayListCallback {
|
||||
void onResult(in Status status, in List list);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IKeyRetrievalCallback {
|
||||
void onResult(in Status status);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IKeyRetrievalConsentCallback {
|
||||
void onResult(in Status status, boolean consent);
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.auth.folsom.RecoveryRequest;
|
||||
import com.google.android.gms.auth.folsom.SharedKey;
|
||||
import com.google.android.gms.common.api.ApiMetadata;
|
||||
import com.google.android.gms.auth.folsom.internal.IKeyRetrievalConsentCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IKeyRetrievalSyncStatusCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IKeyRetrievalCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.ISharedKeyCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IStringListCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IRecoveryResultCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IByteArrayListCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IByteArrayCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.ISecurityDomainMembersCallback;
|
||||
import com.google.android.gms.auth.folsom.internal.IBooleanCallback;
|
||||
import com.google.android.gms.common.api.internal.IStatusCallback;
|
||||
|
||||
interface IKeyRetrievalService {
|
||||
void setConsent(in IKeyRetrievalConsentCallback callback, String accountName, boolean force, in ApiMetadata metadata) = 0;
|
||||
void getConsent(in IKeyRetrievalConsentCallback callback, String accountName, in ApiMetadata metadata) = 1;
|
||||
void getSyncStatus(in IKeyRetrievalSyncStatusCallback callback, String accountName, in ApiMetadata metadata) = 2;
|
||||
void markLocalKeysAsStale(in IKeyRetrievalCallback callback, String accountName, in ApiMetadata metadata) = 3;
|
||||
void getKeyMaterial(in ISharedKeyCallback callback, String accountName, in ApiMetadata metadata) = 4;
|
||||
void setKeyMaterial(in IKeyRetrievalCallback callback, String accountName, in SharedKey[] keys, in ApiMetadata metadata) = 5;
|
||||
void getRecoveredSecurityDomains(in IStringListCallback callback, String accountName, in ApiMetadata metadata) = 6;
|
||||
void startRecoveryOperation(in IRecoveryResultCallback callback, in ApiMetadata metadata, in RecoveryRequest request) = 7;
|
||||
void listVaultsOperation(in IByteArrayListCallback callback, String accountName, in ApiMetadata metadata) = 8;
|
||||
void getProductDetails(in IByteArrayCallback callback, String accountName, in ApiMetadata metadata) = 9;
|
||||
void joinSecurityDomain(in IStatusCallback callback, String accountName, in byte[] bytes, int type, in ApiMetadata metadata) = 10;
|
||||
void startUxFlow(in IKeyRetrievalCallback callback, String accountName, int type, in ApiMetadata metadata) = 11;
|
||||
void promptForLskfConsent(in IKeyRetrievalCallback callback, String accountName, in ApiMetadata metadata) = 12;
|
||||
void resetSecurityDomain(in IStatusCallback callback, String accountName, in ApiMetadata metadata) = 13;
|
||||
void listSecurityDomainMembers(in ISecurityDomainMembersCallback callback, String accountName, in ApiMetadata metadata) = 14;
|
||||
void generateOpenVaultRequestOperation(in IByteArrayCallback callback, in RecoveryRequest request, in ApiMetadata metadata) = 15;
|
||||
void canSilentlyAddGaiaPassword(in IBooleanCallback callback, String accountName, in ApiMetadata metadata) = 16;
|
||||
void addGaiaPasswordMember(in IStatusCallback callback, String accountName, in ApiMetadata metadata) = 17;
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IKeyRetrievalSyncStatusCallback {
|
||||
void onResult(in Status status, boolean sync);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.auth.folsom.RecoveryResult;
|
||||
|
||||
interface IRecoveryResultCallback {
|
||||
void onResult(in Status status, in RecoveryResult recoveryResult);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface ISecurityDomainMembersCallback {
|
||||
void onResult(in Status status, in List list);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.auth.folsom.SharedKey;
|
||||
|
||||
interface ISharedKeyCallback {
|
||||
void onResult(in Status status, in SharedKey[] sharedKeyArr);
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
interface IStringListCallback {
|
||||
void onResult(in Status status, in String[] strArr);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2017 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class AccountChangeEvent extends AutoSafeParcelable {
|
||||
public static Creator<AccountChangeEvent> CREATOR = new AutoCreator<AccountChangeEvent>(AccountChangeEvent.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2017 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import static org.microg.gms.auth.AuthConstants.DEFAULT_ACCOUNT_TYPE;
|
||||
|
||||
import android.accounts.Account;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
public class AccountChangeEventsRequest extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
private int versionCode = 1;
|
||||
@Field(2)
|
||||
private int since;
|
||||
@Field(3)
|
||||
@Deprecated
|
||||
private String accountName;
|
||||
@Field(4)
|
||||
private Account account;
|
||||
|
||||
public Account getAccount() {
|
||||
if (account != null) return account;
|
||||
if (accountName != null) return new Account(accountName, DEFAULT_ACCOUNT_TYPE);
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Creator<AccountChangeEventsRequest> CREATOR = new AutoCreator<AccountChangeEventsRequest>(AccountChangeEventsRequest.class);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2017 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AccountChangeEventsResponse extends AutoSafeParcelable {
|
||||
@SafeParceled(1)
|
||||
private int versionCode = 1;
|
||||
@SafeParceled(value = 2, subClass = AccountChangeEvent.class)
|
||||
private List<AccountChangeEvent> events;
|
||||
|
||||
public AccountChangeEventsResponse() {
|
||||
events = new ArrayList<AccountChangeEvent>();
|
||||
}
|
||||
|
||||
public static Creator<AccountChangeEventsResponse> CREATOR = new AutoCreator<AccountChangeEventsResponse>(AccountChangeEventsResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2017 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class GetAccountsRequest extends AutoSafeParcelable {
|
||||
public static Creator<GetAccountsRequest> CREATOR = findCreator(GetAccountsRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Intent;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class GetHubTokenInternalResponse extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
public TokenData tokenData;
|
||||
@Field(2)
|
||||
public String status;
|
||||
@Field(3)
|
||||
public Intent recoveryIntent;
|
||||
public static final Creator<GetHubTokenInternalResponse> CREATOR = new AutoCreator<>(GetHubTokenInternalResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class GetHubTokenRequest extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
public String accountName;
|
||||
@Field(2)
|
||||
public String service;
|
||||
@Field(3)
|
||||
public String packageName;
|
||||
@Field(4)
|
||||
public int callerUid;
|
||||
public static final Creator<GetHubTokenRequest> CREATOR = new AutoCreator<>(GetHubTokenRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import android.accounts.Account;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class HasCapabilitiesRequest extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
public Account account;
|
||||
@Field(2)
|
||||
public String[] capabilities;
|
||||
public static final Creator<HasCapabilitiesRequest> CREATOR = new AutoCreator<>(HasCapabilitiesRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2017 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth;
|
||||
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
import org.microg.safeparcel.SafeParceled;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Hide
|
||||
public class TokenData extends AutoSafeParcelable {
|
||||
@Field(value = 1, versionCode = 1)
|
||||
private int versionCode = 1;
|
||||
|
||||
@Field(2)
|
||||
public final String token;
|
||||
|
||||
@Field(3)
|
||||
public final Long expiry;
|
||||
|
||||
@Field(5)
|
||||
public final boolean isOAuth;
|
||||
|
||||
@Field(6)
|
||||
public final List<String> scopes;
|
||||
|
||||
public TokenData() {
|
||||
token = null;
|
||||
expiry = null;
|
||||
isOAuth = false;
|
||||
scopes = null;
|
||||
}
|
||||
|
||||
public TokenData(String token, Long expiry, boolean isOAuth, List<Scope> scopes) {
|
||||
this.token = token;
|
||||
this.expiry = expiry;
|
||||
this.isOAuth = isOAuth;
|
||||
this.scopes = new ArrayList<>();
|
||||
if (scopes != null) {
|
||||
for (Scope scope : scopes) {
|
||||
this.scopes.add(scope.getScopeUri());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TokenData(String token, Long expiry) {
|
||||
this.token = token;
|
||||
this.expiry = expiry;
|
||||
this.isOAuth = false;
|
||||
this.scopes = null;
|
||||
}
|
||||
|
||||
public static final Creator<TokenData> CREATOR = new AutoCreator<TokenData>(TokenData.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.api.proxy;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class ProxyRequest extends AutoSafeParcelable {
|
||||
public static final int HTTP_METHOD_GET = 0;
|
||||
public static final int HTTP_METHOD_POST = 1;
|
||||
public static final int HTTP_METHOD_PUT = 2;
|
||||
public static final int HTTP_METHOD_DELETE = 3;
|
||||
public static final int HTTP_METHOD_HEAD = 4;
|
||||
public static final int HTTP_METHOD_OPTIONS = 5;
|
||||
public static final int HTTP_METHOD_TRACE = 6;
|
||||
public static final int HTTP_METHOD_PATCH = 7;
|
||||
|
||||
@Field(1000)
|
||||
private int versionCode = 2;
|
||||
@Field(1)
|
||||
public String url;
|
||||
@Field(2)
|
||||
public int httpMethod;
|
||||
@Field(3)
|
||||
public long timeoutMillis;
|
||||
@Field(4)
|
||||
public byte[] body;
|
||||
@Field(5)
|
||||
public Bundle headers;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public static final Creator<ProxyRequest> CREATOR = new AutoCreator<>(ProxyRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.api.proxy;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class ProxyResponse extends AutoSafeParcelable {
|
||||
public static final int STATUS_CODE_NO_CONNECTION = -1;
|
||||
|
||||
@Field(1000)
|
||||
private int versionCode = 1;
|
||||
@Field(1)
|
||||
public int gmsStatusCode;
|
||||
@Field(2)
|
||||
public PendingIntent recoveryAction;
|
||||
@Field(3)
|
||||
public int httpStatusCode;
|
||||
@Field(4)
|
||||
public Bundle headers;
|
||||
@Field(5)
|
||||
public byte[] body;
|
||||
|
||||
public static final Creator<ProxyResponse> CREATOR = new AutoCreator<>(ProxyResponse.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.firstparty.dataservice;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class ClearTokenRequest extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
private int versionCode = 1;
|
||||
@Field(2)
|
||||
public String token;
|
||||
|
||||
public static final Creator<ClearTokenRequest> CREATOR = findCreator(ClearTokenRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.firstparty.dataservice;
|
||||
|
||||
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 DeviceManagementInfoResponse extends AbstractSafeParcelable {
|
||||
@Field(1)
|
||||
public final int versionCode;
|
||||
@Field(2)
|
||||
public final String info;
|
||||
@Field(3)
|
||||
public final boolean status;
|
||||
|
||||
|
||||
@Constructor
|
||||
public DeviceManagementInfoResponse(@Param(1) int versionCode, @Param(2) String info, @Param(3) boolean status) {
|
||||
this.versionCode = versionCode;
|
||||
this.info = info;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public DeviceManagementInfoResponse(String info, boolean status) {
|
||||
this(1, info, status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
CREATOR.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final SafeParcelableCreatorAndWriter<DeviceManagementInfoResponse> CREATOR = findCreator(DeviceManagementInfoResponse.class);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
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 RecoveryRequest extends AbstractSafeParcelable {
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
CREATOR.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final SafeParcelableCreatorAndWriter<RecoveryRequest> CREATOR = findCreator(RecoveryRequest.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
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 RecoveryResult extends AbstractSafeParcelable {
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
CREATOR.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final SafeParcelableCreatorAndWriter<RecoveryResult> CREATOR = findCreator(RecoveryResult.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2025 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.auth.folsom;
|
||||
|
||||
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;
|
||||
|
||||
import org.microg.gms.utils.ToStringHelper;
|
||||
|
||||
@SafeParcelable.Class
|
||||
public class SharedKey extends AbstractSafeParcelable {
|
||||
|
||||
@Field(1)
|
||||
public int key;
|
||||
@Field(2)
|
||||
public byte[] keyMaterial;
|
||||
|
||||
public SharedKey() {
|
||||
}
|
||||
|
||||
@Constructor
|
||||
public SharedKey(@Param(1) int key, @Param(2) byte[] keyMaterial) {
|
||||
this.key = key;
|
||||
this.keyMaterial = keyMaterial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
CREATOR.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final SafeParcelableCreatorAndWriter<SharedKey> CREATOR = findCreator(SharedKey.class);
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringHelper.name("SharedKey").field("key", key).end();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 microG Project Team
|
||||
* SPDX-License-Identifier: CC-BY-4.0
|
||||
* Notice: Portions of this file are reproduced from work created and shared by Google and used
|
||||
* according to terms described in the Creative Commons 4.0 Attribution License.
|
||||
* See https://developers.google.com/readme/policies for details.
|
||||
*/
|
||||
/**
|
||||
* Contains classes for authenticating Google accounts.
|
||||
*/
|
||||
package com.google.android.gms.auth;
|
||||
Loading…
Add table
Add a link
Reference in a new issue