Merge pull request #149 from Oizaro/master

Update to latest upstream
This commit is contained in:
KevinX8 2021-06-27 22:09:31 +01:00 committed by GitHub
commit 6b9aa61849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 173 additions and 18 deletions

4
.gitignore vendored
View File

@ -8,3 +8,7 @@ user.gradle
local.properties
.directory
play-services-core/release
.settings
.classpath
.project

View File

@ -4,6 +4,7 @@
*/
buildscript {
ext.cronetVersion = '91.0.4472.120'
ext.safeParcelVersion = '1.7.0'
ext.kotlinVersion = '1.4.32'
@ -45,8 +46,8 @@ allprojects {
apply plugin: 'idea'
group = 'org.microg.gms'
version = "0.2.19.211712"
ext.appVersionCode = 211712001
version = "0.2.20.212415"
ext.appVersionCode = 212415001
ext.isReleaseVersion = false
}

View File

@ -32,6 +32,8 @@ public class CredentialRequest extends AutoSafeParcelable {
@Field(4)
private CredentialPickerConfig credentialHintPickerConfig;
private CredentialRequest() { }
public CredentialRequest(boolean passwordLoginSupported, String[] accountTypes, CredentialPickerConfig credentialPickerConfig, CredentialPickerConfig credentialHintPickerConfig) {
this.passwordLoginSupported = passwordLoginSupported;
this.accountTypes = accountTypes;

View File

@ -26,6 +26,7 @@ dependencies {
// implementation "su.litvak.chromecast:api-v2:0.10.4"
implementation "info.armills.chromecast-java-api-v2:api-v2-raw-request:0.10.4-raw-request-1"
implementation project(':play-services-cronet-core')
implementation project(':play-services-core-proto')
implementation project(':play-services-core:microg-ui-tools') // deprecated
implementation project(':play-services-api')
@ -62,7 +63,7 @@ android {
targetSdkVersion androidTargetSdk
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
abiFilters "armeabi-v7a", "arm64-v8a", "x86"
}
}

View File

@ -277,7 +277,7 @@
android:exported="true" />
<activity
android:name="org.microg.gms.ui.CredentialPickerActivity"
android:name="org.microg.gms.auth.CredentialPickerActivity"
android:process=":ui">
<intent-filter>
<action android:name="com.google.android.gms.auth.api.credentials.PICKER" />
@ -285,6 +285,12 @@
</intent-filter>
</activity>
<service android:name="org.microg.gms.auth.CredentialsService">
<intent-filter>
<action android:name="com.google.android.gms.auth.api.credentials.service.START" />
</intent-filter>
</service>
<!-- Cast -->
<service android:name="com.google.android.gms.cast.media.CastMediaRouteProviderService">
@ -470,7 +476,6 @@
<action android:name="com.google.android.gms.common.service.START" />
<action android:name="com.google.android.contextmanager.service.ContextManagerService.START" />
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
<action android:name="com.google.android.gms.auth.api.credentials.service.START" />
<action android:name="com.google.android.gms.gass.START" />
<action android:name="com.google.android.gms.audit.service.START" />
</intent-filter>

View File

@ -28,6 +28,8 @@ public class DynamiteContext extends ContextWrapper {
private Context gmsContext;
private DynamiteContext appContext;
private ClassLoader classLoader;
public DynamiteContext(DynamiteModuleInfo moduleInfo, Context base, Context gmsContext, DynamiteContext appContext) {
super(base);
this.moduleInfo = moduleInfo;
@ -38,6 +40,7 @@ public class DynamiteContext extends ContextWrapper {
@Override
public ClassLoader getClassLoader() {
if (classLoader == null) {
StringBuilder nativeLoaderDirs = new StringBuilder(gmsContext.getApplicationInfo().nativeLibraryDir);
if (Build.VERSION.SDK_INT >= 23 && Process.is64Bit()) {
for (String abi : Build.SUPPORTED_64_BIT_ABIS) {
@ -50,7 +53,9 @@ public class DynamiteContext extends ContextWrapper {
} else {
nativeLoaderDirs.append(File.pathSeparator).append(gmsContext.getApplicationInfo().sourceDir).append("!/lib/").append(Build.CPU_ABI);
}
return new PathClassLoader(gmsContext.getApplicationInfo().sourceDir, nativeLoaderDirs.toString(), new FilteredClassLoader(originalContext.getClassLoader(), moduleInfo.getMergedClasses(), moduleInfo.getMergedPackages()));
classLoader = new PathClassLoader(gmsContext.getApplicationInfo().sourceDir, nativeLoaderDirs.toString(), new FilteredClassLoader(originalContext.getClassLoader(), moduleInfo.getMergedClasses(), moduleInfo.getMergedPackages()));
}
return classLoader;
}
@Override

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.auth
import android.app.Activity
import android.os.Bundle

View File

@ -0,0 +1,53 @@
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.auth
import android.os.Bundle
import android.util.Log
import com.google.android.gms.auth.api.credentials.CredentialRequest
import com.google.android.gms.auth.api.credentials.internal.*
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.api.Status
import com.google.android.gms.common.internal.GetServiceRequest
import com.google.android.gms.common.internal.IGmsCallbacks
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
const val TAG = "GmsCredentials"
class CredentialsService : BaseService(TAG, GmsService.CREDENTIALS) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, CredentialsServiceImpl(), Bundle())
}
}
class CredentialsServiceImpl : ICredentialsService.Stub() {
override fun request(callbacks: ICredentialsCallbacks, request: CredentialRequest) {
Log.d(TAG, "request($request)")
callbacks.onStatus(Status.CANCELED)
}
override fun save(callbacks: ICredentialsCallbacks, request: SaveRequest) {
Log.d(TAG, "save($request)")
callbacks.onStatus(Status.CANCELED)
}
override fun delete(callbacks: ICredentialsCallbacks, request: DeleteRequest) {
Log.d(TAG, "delete($request)")
callbacks.onStatus(Status.CANCELED)
}
override fun disableAutoSignIn(callbacks: ICredentialsCallbacks) {
Log.d(TAG, "disableAutoSignIn()")
callbacks.onStatus(Status.SUCCESS)
}
override fun generatePassword(callbacks: ICredentialsCallbacks, request: GeneratePasswordRequest) {
Log.d(TAG, "generatePassword($request)")
callbacks.onStatus(Status.SUCCESS)
}
}

View File

@ -0,0 +1,34 @@
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
dependencies {
implementation("org.microg:cronet-api:$cronetVersion")
implementation("org.microg:cronet-common:$cronetVersion")
implementation("org.microg:cronet-native:$cronetVersion")
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
lintOptions {
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2021, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.gms.net.core">
<application>
</application>
</manifest>

View File

@ -0,0 +1,37 @@
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.dynamite.descriptors.com.google.android.gms.cronet_dynamite;
import java.util.Arrays;
import java.util.List;
public class ModuleDescriptor {
public static final String MODULE_ID = "com.google.android.gms.cronet_dynamite";
public static final int MODULE_VERSION = 2;
public static final List<String> MERGED_CLASSES = Arrays.asList(
"org.chromium.net.ApiVersion",
"org.chromium.net.BidirectionalStream",
"org.chromium.net.CallbackException",
"org.chromium.net.CronetEngine",
"org.chromium.net.CronetException",
"org.chromium.net.CronetProvider",
"org.chromium.net.ExperimentalBidirectionalStream",
"org.chromium.net.ExperimentalCronetEngine",
"org.chromium.net.ExperimentalUrlRequest",
"org.chromium.net.ICronetEngineBuilder",
"org.chromium.net.InlineExecutionProhibitedException",
"org.chromium.net.NetworkException",
"org.chromium.net.NetworkQualityRttListener",
"org.chromium.net.NetworkQualityThroughputListener",
"org.chromium.net.QuicException",
"org.chromium.net.RequestFinishedInfo",
"org.chromium.net.UploadDataProvider",
"org.chromium.net.UploadDataProviders",
"org.chromium.net.UploadDataSink",
"org.chromium.net.UrlRequest",
"org.chromium.net.UrlResponseInfo"
);
}

View File

@ -12,6 +12,8 @@ include ':play-services-api'
include ':play-services-core-proto'
include ':play-services-cronet-core'
include ':play-services-core:microg-ui-tools' // Legacy
include ':play-services-core'