Commit 5b798b01 authored by Romain Hunault's avatar Romain Hunault
Browse files

Merge branch 'upstream/master' into 3161-merge-v0.2.19.211515

parents 0163eb74 ab36b32d
Pipeline #114716 passed with stage
in 8 minutes and 43 seconds
......@@ -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.
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
~ SPDX-FileCopyrightText: 2021, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="48mm"
height="48mm"
viewBox="0 0 48 48"
version="1.1"
id="svg8">
<defs
id="defs2">
<linearGradient
id="linearGradient883"
x1="52.914062"
y1="90.708984"
x2="52.914062"
y2="78.548767"
gradientUnits="userSpaceOnUse">
<stop
style="stop-color:#1e88e5;stop-opacity:1"
offset="0"
id="stop877" />
<stop
style="stop-color:#2196f3;stop-opacity:1"
offset="1"
id="stop879" />
</linearGradient>
<linearGradient
id="linearGradient887"
gradientUnits="userSpaceOnUse"
x1="52.914062"
y1="90.708984"
x2="52.914062"
y2="78.548767"
gradientTransform="matrix(0,0.26458333,-0.26458333,0,48.00017,-8.2278639e-8)">
<stop
style="stop-color:#3949ab;stop-opacity:1"
offset="0"
id="stop904" />
<stop
style="stop-color:#3f51b5;stop-opacity:1"
offset="1"
id="stop906" />
</linearGradient>
<linearGradient
id="linearGradient918"
x1="24.000086"
y1="1.9998779"
x2="46.000294"
y2="24.000086"
gradientUnits="userSpaceOnUse">
<stop
style="stop-color:#ffffff;stop-opacity:0.09411765"
offset="0"
id="stop912" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop914" />
</linearGradient>
</defs>
<g
id="layer1">
<path
id="circle855"
style="fill:#bdbdbd;fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 7.5585938,90.708984 V 153.07227 L 22.445312,138.18555 a 83.149605,83.149605 0 0 0 36.44336,29.34375 83.149605,83.149605 0 0 0 90.615238,-18.02539 L 117.43359,117.43359 A 37.795276,37.795276 0 0 1 90.708984,128.50391 37.795276,37.795276 0 0 1 55.695312,104.93555 L 69.921875,90.708984 H 52.914062 Z"
transform="scale(0.26458333)" />
<path
id="circle857"
style="fill:url(#linearGradient883);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 28.345703,7.5585938 43.232422,22.445312 A 83.149605,83.149605 0 0 0 7.5585938,90.708984 H 52.914062 A 37.795276,37.795276 0 0 1 76.482422,55.695312 L 90.708984,69.921875 V 52.914062 7.5585938 h -0.257812 z"
transform="scale(0.26458333)" />
<path
id="path885"
style="fill:url(#linearGradient887);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 46.000292,7.4997999 42.061515,11.438578 A 21.999999,21.999999 0 0 0 24.000085,1.9998779 V 14.000179 a 10,10 0 0 1 9.264034,6.235795 l -3.764112,3.764111 h 4.499984 12.000301 v -0.06821 z" />
<path
id="path910"
style="fill:url(#linearGradient918);fill-opacity:1;stroke:#000000;stroke-width:0"
d="M 46.000292,7.4997999 42.061515,11.438578 C 37.949082,5.5254753 31.202646,1.9998641 24.000085,1.9998779 L 46.000292,24.000085 v -0.06821 z" />
</g>
</svg>
......@@ -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"))
......
......@@ -5,7 +5,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
dependencies {
api project(':firebase-auth-api')
......
package com.google.android.gms.facs.cache;
parcelable FacsCacheCallOptions;
package com.google.android.gms.facs.cache;
parcelable ForceSettingsCacheRefreshResult;
package com.google.android.gms.facs.cache;
parcelable GetActivityControlsSettingsResult;
package com.google.android.gms.facs.cache;
parcelable ReadDeviceLevelSettingsResult;
package com.google.android.gms.facs.cache;
parcelable UpdateActivityControlsSettingsResult;
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;
}
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;
}
package com.google.android.gms.safetynet;
parcelable HarmfulAppsInfo;
package com.google.android.gms.safetynet;
parcelable RecaptchaResultData;
package com.google.android.gms.safetynet;
parcelable RemoveHarmfulAppData;
......@@ -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> 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;
}
......@@ -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;
}
/*
* 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<IdToken> tokens;
@SafeParceled(5)
@Field(5)
private String password;
@SafeParceled(6)
@Field(6)
private String accountType;
@SafeParceled(7)
@Field(7)
private String generatedPassword;
private Credential() {
......
/*
* 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;
......
/*
* 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<CredentialRequest> CREATOR = new AutoCreator<CredentialRequest>(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();
}
}
}
/*
* 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<HintRequest> 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.
*/