diff --git a/README.md b/README.md index 48d7bca1d6c51ba1ef5dbf3f0abb4c8fb837de82..ffcefc7b9fccedc1e3c4cf558b9e2faa04abd0eb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ microG GmsCore is a FLOSS (Free/Libre Open Source Software) framework to allow a License ------- - Copyright 2013-2020 microG Project Team + Copyright 2013-2021 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. diff --git a/artwork/ic_recaptcha.svg b/artwork/ic_recaptcha.svg new file mode 100644 index 0000000000000000000000000000000000000000..6c807289d5f94ead3e2cd4a99309b95d805bbb2f --- /dev/null +++ b/artwork/ic_recaptcha.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.gradle b/build.gradle index c42bb3b4d42c6a4afa1b1224fa43051f9d553ba3..c38d74493855e2385cdbe128e1f94fb9bed8b5ce 100644 --- a/build.gradle +++ b/build.gradle @@ -9,28 +9,29 @@ buildscript { ext.safeParcelVersion = '1.7.0' ext.wearableVersion = '0.1.1' - ext.kotlinVersion = '1.4.10' - ext.coroutineVersion = '1.3.7' + ext.kotlinVersion = '1.4.32' + ext.coroutineVersion = '1.3.8' - ext.annotationVersion = '1.1.0' + ext.annotationVersion = '1.2.0' ext.appcompatVersion = '1.2.0' ext.coreVersion = '1.3.0' ext.fragmentVersion = '1.2.5' - ext.lifecycleVersion = '2.2.0' - ext.mediarouterVersion = '1.2.0' + ext.lifecycleVersion = '2.3.1' + ext.mediarouterVersion = '1.2.2' ext.multidexVersion = '2.0.1' - ext.navigationVersion = '2.3.1' + ext.navigationVersion = '2.3.5' ext.preferenceVersion = '1.1.1' ext.recyclerviewVersion = '1.1.0' + ext.webkitVersion = '1.4.0' ext.supportLibraryVersion = '28.0.0' ext.slf4jVersion = '1.7.25' - ext.volleyVersion = '1.1.1' + ext.volleyVersion = '1.2.0' ext.wireVersion = '3.2.2' ext.androidBuildGradleVersion = '4.1.0' - ext.androidBuildVersionTools = '29.0.3' + ext.androidBuildVersionTools = '30.0.2' ext.androidMinSdk = 14 ext.androidTargetSdk = 29 @@ -57,7 +58,7 @@ def execResult(...args) { return stdout.toString().trim() } -def gmsVersion = "20.47.14" +def gmsVersion = "21.15.15" def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', '')) def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').substring(1) def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD")) diff --git a/firebase-auth-core/build.gradle b/firebase-auth-core/build.gradle index b5f4499635d3a785b1893dac1a38dd1adc6d3210..e5024a6dbe0fdab92a822b42c3416d79cbeb9c4c 100644 --- a/firebase-auth-core/build.gradle +++ b/firebase-auth-core/build.gradle @@ -5,7 +5,6 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' dependencies { api project(':firebase-auth-api') diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl new file mode 100644 index 0000000000000000000000000000000000000000..72a9af0638dda7b3c7b2c9e1933f618cb12440e2 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/FacsCacheCallOptions.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.facs.cache; + +parcelable FacsCacheCallOptions; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl new file mode 100644 index 0000000000000000000000000000000000000000..5bac21a727844cfe16fd385a09772950abc0b024 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.facs.cache; + +parcelable ForceSettingsCacheRefreshResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl new file mode 100644 index 0000000000000000000000000000000000000000..627417d4c697bb502cc60ee20a5d2e1bb8442f7e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.facs.cache; + +parcelable GetActivityControlsSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl new file mode 100644 index 0000000000000000000000000000000000000000..936f2ee59c3fa92b47be947631426bb1c6073a46 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.facs.cache; + +parcelable ReadDeviceLevelSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl new file mode 100644 index 0000000000000000000000000000000000000000..051f9e0f0caed7b1286122ae57edb6b411f4c8b8 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.facs.cache; + +parcelable UpdateActivityControlsSettingsResult; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl new file mode 100644 index 0000000000000000000000000000000000000000..ecea95ab20c9aed424fc79986a41bbf3826e84fa --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheCallbacks.aidl @@ -0,0 +1,15 @@ +package com.google.android.gms.facs.cache.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.facs.cache.ForceSettingsCacheRefreshResult; +import com.google.android.gms.facs.cache.GetActivityControlsSettingsResult; +import com.google.android.gms.facs.cache.ReadDeviceLevelSettingsResult; +import com.google.android.gms.facs.cache.UpdateActivityControlsSettingsResult; + +interface IFacsCacheCallbacks { + void onForceSettingsCacheRefreshResult(in Status status, in ForceSettingsCacheRefreshResult result) = 0; + void onUpdateActivityControlsSettingsResult(in Status status, in UpdateActivityControlsSettingsResult result) = 1; + void onGetActivityControlsSettingsResult(in Status status, in GetActivityControlsSettingsResult result) = 2; + void onWriteDeviceLevelSettingsResult(in Status status) = 3; + void onReadDeviceLevelSettingsResult(in Status status, in ReadDeviceLevelSettingsResult result) = 4; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl new file mode 100644 index 0000000000000000000000000000000000000000..534c9de43c9936ed70085b5e6ec34994bb15d852 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/facs/cache/internal/IFacsCacheService.aidl @@ -0,0 +1,12 @@ +package com.google.android.gms.facs.cache.internal; + +import com.google.android.gms.facs.cache.FacsCacheCallOptions; +import com.google.android.gms.facs.cache.internal.IFacsCacheCallbacks; + +interface IFacsCacheService { + void forceSettingsCacheRefresh(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 0; + void updateActivityControlsSettings(IFacsCacheCallbacks callbacks, in byte[] bytes, in FacsCacheCallOptions options) = 1; + void getActivityControlsSettings(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 2; + void readDeviceLevelSettings(IFacsCacheCallbacks callbacks) = 3; + void writeDeviceLevelSettings(IFacsCacheCallbacks callbacks, in byte[] bytes) = 4; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsInfo.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsInfo.aidl new file mode 100644 index 0000000000000000000000000000000000000000..becadfaf911fb9a0422c7a702af69946d6bd0559 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsInfo.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable HarmfulAppsInfo; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RecaptchaResultData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RecaptchaResultData.aidl new file mode 100644 index 0000000000000000000000000000000000000000..ec4cbb4f18ea25c598d508e468771adf28610fcf --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RecaptchaResultData.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable RecaptchaResultData; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RemoveHarmfulAppData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RemoveHarmfulAppData.aidl new file mode 100644 index 0000000000000000000000000000000000000000..af859cde08b20132f4e8cc8c62722274cd88e36e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/RemoveHarmfulAppData.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable RemoveHarmfulAppData; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl index fe57be6d96cbcf8865c2c362a62789a9e3a9594b..13e1ee40d9576a838b64ebd9d2cc0ed2ab418f67 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl @@ -3,6 +3,9 @@ package com.google.android.gms.safetynet.internal; import com.google.android.gms.common.api.Status; import com.google.android.gms.safetynet.AttestationData; import com.google.android.gms.safetynet.HarmfulAppsData; +import com.google.android.gms.safetynet.HarmfulAppsInfo; +import com.google.android.gms.safetynet.RecaptchaResultData; +import com.google.android.gms.safetynet.RemoveHarmfulAppData; import com.google.android.gms.safetynet.SafeBrowsingData; interface ISafetyNetCallbacks { @@ -11,4 +14,7 @@ interface ISafetyNetCallbacks { void onSafeBrowsingData(in Status status, in SafeBrowsingData safeBrowsingData) = 2; void onBoolean(in Status status, boolean b) = 3; void onHarmfulAppsData(in Status status, in List harmfulAppsData) = 4; -} \ No newline at end of file + void onRecaptchaResult(in Status status, in RecaptchaResultData recaptchaResultData) = 5; + void onHarmfulAppsInfo(in Status status, in HarmfulAppsInfo harmfulAppsInfo) = 7; + void onRemoveHarmfulAppData(in Status status, in RemoveHarmfulAppData removeHarmfulAppData) = 14; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl index 7dfc749b8a2ee520304530dbe49037c66ade3d2d..5cf8b2a1b902bac41e239ed2b1809d7deed42745 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl @@ -9,4 +9,5 @@ interface ISafetyNetService { void lookupUri(ISafetyNetCallbacks callbacks, String s1, in int[] threatTypes, int i, String s2) = 2; void init(ISafetyNetCallbacks callbacks) = 3; void getHarmfulAppsList(ISafetyNetCallbacks callbacks) = 4; -} \ No newline at end of file + void verifyWithRecaptcha(ISafetyNetCallbacks callbacks, String siteKey) = 5; +} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java index 13ee988edc903dbf24835d262a5955b56759e1c8..f0f63321c887e6bec3f1438105d46cd2dea58869 100644 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java @@ -1,17 +1,9 @@ /* - * 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. + * SPDX-FileCopyrightText: 2016, microG Project Team + * SPDX-License-Identifier: Apache-2.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. */ package com.google.android.gms.auth.api.credentials; @@ -30,28 +22,22 @@ import java.util.Locale; @PublicApi public class Credential extends AutoSafeParcelable { - @SafeParceled(1000) + @Field(1000) private int versionCode = 1; - @SafeParceled(1) + @Field(1) private String id; - - @SafeParceled(2) + @Field(2) private String name; - - @SafeParceled(3) + @Field(3) private Uri profilePictureUri; - - @SafeParceled(value = 4, subClass = IdToken.class) + @Field(value = 4, subClass = IdToken.class) private List tokens; - - @SafeParceled(5) + @Field(5) private String password; - - @SafeParceled(6) + @Field(6) private String accountType; - - @SafeParceled(7) + @Field(7) private String generatedPassword; private Credential() { diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java index 67d66c05bf337f422389fd2a0982e1c69efd1015..e072efd0d4590617b76052ceb1b9c3d6058fc754 100644 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java @@ -1,36 +1,28 @@ /* - * 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. + * SPDX-FileCopyrightText: 2016, microG Project Team + * SPDX-License-Identifier: Apache-2.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. */ package com.google.android.gms.auth.api.credentials; +import org.microg.gms.common.PublicApi; import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.SafeParceled; +@PublicApi public class CredentialPickerConfig extends AutoSafeParcelable { - @SafeParceled(1000) + @Field(1000) private int versionCode = 1; - @SafeParceled(1) + @Field(1) private boolean showAddAccountButton; - - @SafeParceled(2) + @Field(2) private boolean showCancelButton; - - @SafeParceled(3) + @Field(3) private boolean forNewAccount; private CredentialPickerConfig() { @@ -42,6 +34,10 @@ public class CredentialPickerConfig extends AutoSafeParcelable { this.forNewAccount = forNewAccount; } + /** + * @deprecated It was determined that this method was not useful for developers. + */ + @Deprecated public boolean isForNewAccount() { return forNewAccount; } @@ -54,6 +50,14 @@ public class CredentialPickerConfig extends AutoSafeParcelable { return showCancelButton; } + @Override + public String toString() { + return "CredentialPickerConfig{" + + "showAddAccountButton=" + showAddAccountButton + + ", showCancelButton=" + showCancelButton + + '}'; + } + public class Builder { private boolean showAddAccountButton; private boolean showCancelButton; diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java index 80819c714db59bb8d1df57c082fdc1901a044267..9a5fa917169680ec71ae8a68a18bae5271d095ee 100644 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java @@ -1,17 +1,9 @@ /* - * 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. + * SPDX-FileCopyrightText: 2016, microG Project Team + * SPDX-License-Identifier: Apache-2.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. */ package com.google.android.gms.auth.api.credentials; @@ -25,19 +17,16 @@ import org.microg.safeparcel.SafeParceled; */ public class CredentialRequest extends AutoSafeParcelable { - @SafeParceled(1000) + @Field(1000) private int versionCode = 1; - @SafeParceled(1) + @Field(1) private boolean passwordLoginSupported; - - @SafeParceled(2) + @Field(2) private String[] accountTypes; - - @SafeParceled(3) + @Field(3) private CredentialPickerConfig credentialPickerConfig; - - @SafeParceled(4) + @Field(4) private CredentialPickerConfig credentialHintPickerConfig; public CredentialRequest(boolean passwordLoginSupported, String[] accountTypes, CredentialPickerConfig credentialPickerConfig, CredentialPickerConfig credentialHintPickerConfig) { @@ -72,4 +61,15 @@ public class CredentialRequest extends AutoSafeParcelable { } public static final Creator CREATOR = new AutoCreator(CredentialRequest.class); + + public static class Builder { + private boolean passwordLoginSupported; + private String[] accountTypes; + private CredentialPickerConfig credentialPickerConfig; + private CredentialPickerConfig credentialHintPickerConfig; + + public void setAccountTypes(String... accountTypes) { + this.accountTypes = accountTypes.clone(); + } + } } diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java new file mode 100644 index 0000000000000000000000000000000000000000..e6a4f1b8eb846e3c947fcdea51f7c32280a7da58 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java @@ -0,0 +1,170 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.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. + */ + +package com.google.android.gms.auth.api.credentials; + +import org.microg.gms.common.PublicApi; +import org.microg.safeparcel.AutoSafeParcelable; + +import java.util.Arrays; + +/** + * Parameters for requesting the display of the hint picker, via {@link CredentalsApi#getHintPickerIntent()}. + * Instances can be created using {@link HintRequest.Builder}. + */ +@PublicApi +public class HintRequest extends AutoSafeParcelable { + @Field(1000) + private int versionCode = 2; + + @Field(1) + private CredentialPickerConfig hintPickerConfig; + @Field(2) + private boolean emailAddressIdentifierSupported; + @Field(3) + private boolean phoneNumberIdentifierSupported; + @Field(4) + private String[] accountTypes; + @Field(5) + private boolean idTokenRequested = true; + @Field(6) + private String serverClientId; + @Field(7) + private String idTokenNonce; + + private HintRequest() { + } + + public HintRequest(CredentialPickerConfig hintPickerConfig, boolean emailAddressIdentifierSupported, boolean phoneNumberIdentifierSupported, String[] accountTypes, boolean idTokenRequested, String serverClientId, String idTokenNonce) { + this.hintPickerConfig = hintPickerConfig; + this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; + this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; + this.accountTypes = accountTypes; + this.idTokenRequested = idTokenRequested; + this.serverClientId = serverClientId; + this.idTokenNonce = idTokenNonce; + } + + public String[] getAccountTypes() { + return accountTypes; + } + + public CredentialPickerConfig getHintPickerConfig() { + return hintPickerConfig; + } + + public String getIdTokenNonce() { + return idTokenNonce; + } + + public String getServerClientId() { + return serverClientId; + } + + public boolean isEmailAddressIdentifierSupported() { + return emailAddressIdentifierSupported; + } + + public boolean isPhoneNumberIdentifierSupported() { + return phoneNumberIdentifierSupported; + } + + public boolean isIdTokenRequested() { + return idTokenRequested; + } + + public static final Creator CREATOR = new AutoCreator<>(HintRequest.class); + + @Override + public String toString() { + return "HintRequest{" + + "hintPickerConfig=" + hintPickerConfig + + ", emailAddressIdentifierSupported=" + emailAddressIdentifierSupported + + ", phoneNumberIdentifierSupported=" + phoneNumberIdentifierSupported + + ", accountTypes=" + Arrays.toString(accountTypes) + + ", idTokenRequested=" + idTokenRequested + + ", serverClientId='" + serverClientId + '\'' + + ", idTokenNonce='" + idTokenNonce + '\'' + + '}'; + } + + public static class Builder { + private CredentialPickerConfig hintPickerConfig; + private boolean emailAddressIdentifierSupported; + private boolean phoneNumberIdentifierSupported; + private String[] accountTypes; + private boolean idTokenRequested = true; + private String serverClientId; + private String idTokenNonce; + + /** + * Builds a {@link HintRequest}. + */ + public HintRequest build() { + return new HintRequest(hintPickerConfig, emailAddressIdentifierSupported, phoneNumberIdentifierSupported, accountTypes, idTokenRequested, serverClientId, idTokenNonce); + } + + /** + * Sets the account types (identity providers) that are accepted by this application. + * It is strongly recommended that the strings listed in {@link IdentityProviders} be used for the most common + * identity providers, and strings representing the login domain of the identity provider be used for any + * others which are not listed. + * + * @param accountTypes The list of account types (identity providers) supported by the app. + * typically in the form of the associated login domain for each identity provider. + */ + public void setAccountTypes(String... accountTypes) { + this.accountTypes = accountTypes.clone(); + } + + /** + * Enables returning {@link Credential} hints where the identifier is an email address, intended for use with a password chosen by the user. + */ + public void setEmailAddressIdentifierSupported(boolean emailAddressIdentifierSupported) { + this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; + } + + /** + * Sets the configuration for the hint picker dialog. + */ + public void setHintPickerConfig(CredentialPickerConfig hintPickerConfig) { + this.hintPickerConfig = hintPickerConfig; + } + + /** + * Specify a nonce value that should be included in any generated ID token for this request. + */ + public void setIdTokenNonce(String idTokenNonce) { + this.idTokenNonce = idTokenNonce; + } + + /** + * Specify whether an ID token should be acquired for hints, if available for the selected credential identifier. + * This is enabled by default; disable this if your app does not use ID tokens as part of authentication to decrease latency in retrieving credentials and credential hints. + */ + public void setIdTokenRequested(boolean idTokenRequested) { + this.idTokenRequested = idTokenRequested; + } + + /** + * Enables returning {@link Credential} hints where the identifier is a phone number, intended for use with a password chosen by the user or SMS verification. + */ + public void setPhoneNumberIdentifierSupported(boolean phoneNumberIdentifierSupported) { + this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; + } + + /** + * Specify the server client ID for the backend associated with this app. + * If a Google ID token can be generated for a retrieved credential or hint, and the specified server client ID is correctly configured to be associated with the app, then it will be used as the audience of the generated token. + * If a null value is specified, the default audience will be used for the generated ID token. + */ + public void setServerClientId(String serverClientId) { + this.serverClientId = serverClientId; + } + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java index 2ef78f95b5e463205b3888334308acb0b7578881..4c3d1c0585737fffe2f81700ef68e68d3af71310 100644 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java @@ -1,17 +1,9 @@ /* - * 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. + * SPDX-FileCopyrightText: 2016, microG Project Team + * SPDX-License-Identifier: Apache-2.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. */ package com.google.android.gms.auth.api.credentials; @@ -23,13 +15,13 @@ import org.microg.safeparcel.SafeParceled; @PublicApi public class IdToken extends AutoSafeParcelable { - @SafeParceled(1000) + @Field(1000) private int versionCode = 1; - @SafeParceled(1) + @Field(1) private String accountType; - @SafeParceled(2) + @Field(2) private String id; private IdToken() { diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java new file mode 100644 index 0000000000000000000000000000000000000000..8cd24eedc07197f762c850a838258ef4ea1405b9 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java @@ -0,0 +1,34 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.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. + */ + +package com.google.android.gms.auth.api.credentials; + +import android.accounts.Account; + +/** + * Identity provider constants for use with {@link CredentialRequest.Builder#setAccountTypes(String...)} + */ +public final class IdentityProviders { + public static final String FACEBOOK = "//www.facebook.com"; + public static final String GOOGLE = "//accounts.google.com"; + public static final String LINKEDIN = "//www.linkedin.com"; + public static final String MICROSOFT = "//login.live.com"; + public static final String PAYPAL = "//www.paypal.com"; + public static final String TWITTER = "//twitter.com"; + public static final String YAHOO = "//login.yahoo.com"; + + /** + * Attempts to translate the account type in the provided account into the string that should be used in the credentials API. + * + * @param account an account on the device. + * @return The identity provider string for use with the Credentials API, or {@code null} if the account type is unknown. + */ + public static String getIdentityProviderForAccount(Account account) { + return null; + } +} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java new file mode 100644 index 0000000000000000000000000000000000000000..c74383e4e49b381219b3b72a549e17c42ac269b3 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/FacsCacheCallOptions.java @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class FacsCacheCallOptions extends AutoSafeParcelable { + @Field(1) + public String instanceId; + @Field(2) + public long version; + + public static final Creator CREATOR = new AutoCreator<>(FacsCacheCallOptions.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java new file mode 100644 index 0000000000000000000000000000000000000000..18f2177b2b1c4151eb631efee0fd4a2d3853564d --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ForceSettingsCacheRefreshResult.java @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ForceSettingsCacheRefreshResult extends AutoSafeParcelable { + + public static final Creator CREATOR = new AutoCreator<>(ForceSettingsCacheRefreshResult.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java new file mode 100644 index 0000000000000000000000000000000000000000..6be6139af6d78c2743fa15bf483ec80cb28b4d40 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/GetActivityControlsSettingsResult.java @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class GetActivityControlsSettingsResult extends AutoSafeParcelable { + + public static final Creator CREATOR = new AutoCreator<>(GetActivityControlsSettingsResult.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java new file mode 100644 index 0000000000000000000000000000000000000000..b89f861ac29185916f4f7e762e46c223d7baf280 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/ReadDeviceLevelSettingsResult.java @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ReadDeviceLevelSettingsResult extends AutoSafeParcelable { + + public static final Creator CREATOR = new AutoCreator<>(ReadDeviceLevelSettingsResult.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java b/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java new file mode 100644 index 0000000000000000000000000000000000000000..4ef2c91de5d6e8096c783d3c253ec079ed372b5b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/facs/cache/UpdateActivityControlsSettingsResult.java @@ -0,0 +1,13 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.0 + */ + +package com.google.android.gms.facs.cache; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class UpdateActivityControlsSettingsResult extends AutoSafeParcelable { + + public static final Creator CREATOR = new AutoCreator<>(UpdateActivityControlsSettingsResult.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java index 7ac285fee2ccaea8f0844e258fb73bb55ea2d162..e043522b491afcb74c09e39b4a42c6518153f0d2 100644 --- a/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java @@ -1,23 +1,49 @@ /* - * 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. + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.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. */ package com.google.android.gms.safetynet; +import org.microg.gms.common.PublicApi; import org.microg.safeparcel.AutoSafeParcelable; +/** + * APK information pertaining to one potentially harmful app. + */ +@PublicApi public class HarmfulAppsData extends AutoSafeParcelable { + /** + * The package name of the potentially harmful app. + */ + @Field(2) + public final String apkPackageName; + /** + * The SHA-256 of the potentially harmful app APK file. + */ + @Field(3) + public final byte[] apkSha256; + /** + * The potentially harmful app category defined in {@link VerifyAppsConstants}. + */ + @Field(4) + public final int apkCategory; + + private HarmfulAppsData() { + apkPackageName = null; + apkSha256 = null; + apkCategory = 0; + } + + @PublicApi(exclude = true) + public HarmfulAppsData(String apkPackageName, byte[] apkSha256, int apkCategory) { + this.apkPackageName = apkPackageName; + this.apkSha256 = apkSha256; + this.apkCategory = apkCategory; + } + public static final Creator CREATOR = new AutoCreator(HarmfulAppsData.class); } diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsInfo.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..6ae6bf6537ad2cb4a9deec928ba69eb3eb81efa1 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsInfo.java @@ -0,0 +1,32 @@ +/* + * 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.safetynet; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class HarmfulAppsInfo extends AutoSafeParcelable { + @Field(2) + public long field2; + @Field(3) + public HarmfulAppsData[] data; + @Field(4) + public int field4; + @Field(5) + public boolean field5; + + public static final Creator CREATOR = new AutoCreator(HarmfulAppsInfo.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/RecaptchaResultData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/RecaptchaResultData.java new file mode 100644 index 0000000000000000000000000000000000000000..748f112935095ad2ec7c60770c98b14db560d314 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/RecaptchaResultData.java @@ -0,0 +1,26 @@ +/* + * 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.safetynet; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class RecaptchaResultData extends AutoSafeParcelable { + @Field(2) + public String token; + + public static final Creator CREATOR = new AutoCreator(RecaptchaResultData.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/RemoveHarmfulAppData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/RemoveHarmfulAppData.java new file mode 100644 index 0000000000000000000000000000000000000000..32901e077debb98f9c7bdca4926c92454237fffa --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/RemoveHarmfulAppData.java @@ -0,0 +1,28 @@ +/* + * 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.safetynet; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class RemoveHarmfulAppData extends AutoSafeParcelable { + @Field(2) + public int field2; + @Field(3) + public boolean field3; + + public static final Creator CREATOR = new AutoCreator(RemoveHarmfulAppData.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java index 80fc8c5ceca123ded1ffefffcf80d98066796aa5..f0017e6af3bee60fd4f98b7abfe6f09926806bb2 100644 --- a/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java @@ -16,18 +16,30 @@ package com.google.android.gms.safetynet; +import android.os.ParcelFileDescriptor; + import com.google.android.gms.common.data.DataHolder; import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.SafeParceled; +import java.io.File; + public class SafeBrowsingData extends AutoSafeParcelable { - @SafeParceled(1) - private int versionCode = 1; - @SafeParceled(2) - private String status; - @SafeParceled(3) - private DataHolder data; + @Field(1) + public int versionCode = 1; + @Field(2) + public String status; + @Field(3) + public DataHolder data; + @Field(4) + public ParcelFileDescriptor fileDescriptor; + public File file; + public byte[] fileContents; + @Field(5) + public long field5; + @Field(6) + public byte[] field6; public static final Creator CREATOR = new AutoCreator(SafeBrowsingData.class); } diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/SafetyNetStatusCodes.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafetyNetStatusCodes.java new file mode 100644 index 0000000000000000000000000000000000000000..203cb0c4e128c35408c26715075e95c50fa7a307 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafetyNetStatusCodes.java @@ -0,0 +1,37 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.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. + */ + +package com.google.android.gms.safetynet; + +import com.google.android.gms.common.api.CommonStatusCodes; + +/** + * Status codes for the SafetyNet API. + */ +public class SafetyNetStatusCodes extends CommonStatusCodes { + public static final int SAFE_BROWSING_UNSUPPORTED_THREAT_TYPES = 12000; + public static final int SAFE_BROWSING_MISSING_API_KEYINT = 12001; + public static final int SAFE_BROWSING_API_NOT_AVAILABLE = 12002; + public static final int VERIFY_APPS_NOT_AVAILABLE = 12003; + public static final int VERIFY_APPS_INTERNAL_ERROR = 12004; + public static final int VERIFY_APPS_NOT_ENABLED = 12005; + public static final int UNSUPPORTED_SDK_VERSION = 12006; + /** + * Cannot start the reCAPTCHA service because site key parameter is not valid. + */ + public static final int RECAPTCHA_INVALID_SITEKEY = 12007; + /** + * Cannot start the reCAPTCHA service because type of site key is not valid. + */ + public static final int RECAPTCHA_INVALID_KEYTYPE = 12008; + public static final int SAFE_BROWSING_API_NOT_INITIALIZED = 12009; + /** + * Cannot start the reCAPTCHA service because calling package name is not matched with site key. + */ + public static final int RECAPTCHA_INVALID_PACKAGE_NAME = 12013; +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/VerifyAppsConstants.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/VerifyAppsConstants.java new file mode 100644 index 0000000000000000000000000000000000000000..bec6b746cad107c74c0f1437df58380876148212 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/VerifyAppsConstants.java @@ -0,0 +1,52 @@ +/* + * SPDX-FileCopyrightText: 2021, microG Project Team + * SPDX-License-Identifier: Apache-2.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. + */ + +package com.google.android.gms.safetynet; + +import org.microg.gms.common.PublicApi; + +/** + * Constants pertaining to the Verify Apps SafetyNet API. + */ +@PublicApi +public class VerifyAppsConstants { + /** + * An action that is broadcasted when harmful apps are discovered. + */ + public static final String ACTION_HARMFUL_APPS_FOUND = "com.google.android.gms.safetynet.action.HARMFUL_APPS_FOUND"; + /** + * An action that is broadcasted when a harmful app is blocked from installation. + */ + public static final String ACTION_HARMFUL_APP_BLOCKED = "com.google.android.gms.safetynet.action.HARMFUL_APP_BLOCKED"; + /** + * An action that is broadcasted when a harmful app is installed. + */ + public static final String ACTION_HARMFUL_APP_INSTALLED = "com.google.android.gms.safetynet.action.HARMFUL_APP_INSTALLED"; + + public static final int HARMFUL_CATEGORY_RANSOMWARE = 1; + public static final int HARMFUL_CATEGORY_PHISHING = 2; + public static final int HARMFUL_CATEGORY_TROJAN = 3; + public static final int HARMFUL_CATEGORY_UNCOMMON = 4; + public static final int HARMFUL_CATEGORY_FRAUDWARE = 5; + public static final int HARMFUL_CATEGORY_TOLL_FRAUD = 6; + public static final int HARMFUL_CATEGORY_WAP_FRAUD = 7; + public static final int HARMFUL_CATEGORY_CALL_FRAUD = 8; + public static final int HARMFUL_CATEGORY_BACKDOOR = 9; + public static final int HARMFUL_CATEGORY_SPYWARE = 10; + public static final int HARMFUL_CATEGORY_GENERIC_MALWARE = 11; + public static final int HARMFUL_CATEGORY_HARMFUL_SITE = 12; + public static final int HARMFUL_CATEGORY_WINDOWS_MALWARE = 13; + public static final int HARMFUL_CATEGORY_HOSTILE_DOWNLOADER = 14; + public static final int HARMFUL_CATEGORY_NON_ANDROID_THREAT = 15; + public static final int HARMFUL_CATEGORY_ROOTING = 16; + public static final int HARMFUL_CATEGORY_PRIVILEGE_ESCALATION = 17; + public static final int HARMFUL_CATEGORY_TRACKING = 18; + public static final int HARMFUL_CATEGORY_SPAM = 19; + public static final int HARMFUL_CATEGORY_DENIAL_OF_SERVICE = 20; + public static final int HARMFUL_CATEGORY_DATA_COLLECTION = 21; +} diff --git a/play-services-base-core-ui/build.gradle b/play-services-base-core-ui/build.gradle index 5388b32a4705511e9fa0305dd44be784a12e25a9..710712fe65c97f6ae5f236c35144a70a1f36c654 100644 --- a/play-services-base-core-ui/build.gradle +++ b/play-services-base-core-ui/build.gradle @@ -6,7 +6,6 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' apply plugin: 'maven-publish' apply plugin: 'signing' @@ -17,11 +16,9 @@ dependencies { implementation "androidx.multidex:multidex:$multidexVersion" implementation "androidx.appcompat:appcompat:$appcompatVersion" implementation "androidx.mediarouter:mediarouter:$mediarouterVersion" - implementation "androidx.preference:preference:$preferenceVersion" + implementation "androidx.preference:preference-ktx:$preferenceVersion" // Navigation - implementation "androidx.navigation:navigation-fragment:$navigationVersion" - implementation "androidx.navigation:navigation-ui:$navigationVersion" implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion" implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion" @@ -39,8 +36,8 @@ android { targetSdkVersion androidTargetSdk } - dataBinding { - enabled = true + buildFeatures { + dataBinding = true } sourceSets { diff --git a/play-services-base-core-ui/src/main/res/values/themes.xml b/play-services-base-core-ui/src/main/res/values/themes.xml index a32388e211324c289a9a01bc860e9df0070e9bf9..2130e27803aeda77bce973dd518029cdcec17383 100644 --- a/play-services-base-core-ui/src/main/res/values/themes.xml +++ b/play-services-base-core-ui/src/main/res/values/themes.xml @@ -6,6 +6,11 @@ + +