mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-02 15:45:56 +01:00
Add Cronet
This commit is contained in:
parent
2e64427734
commit
a43048995c
4
.gitignore
vendored
4
.gitignore
vendored
@ -7,3 +7,7 @@ build/
|
||||
user.gradle
|
||||
local.properties
|
||||
.directory
|
||||
|
||||
.settings
|
||||
.classpath
|
||||
.project
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
ext.cronetVersion = '91.0.4472.120'
|
||||
ext.nlpVersion = '2.0-alpha6'
|
||||
ext.remoteDroidGuardVersion = '0.1.2'
|
||||
ext.safeParcelVersion = '1.7.0'
|
||||
|
@ -43,6 +43,7 @@ dependencies {
|
||||
implementation project(':play-services-base-core')
|
||||
implementation project(':play-services-base-core-ui')
|
||||
implementation project(':play-services-conscrypt-provider-core')
|
||||
implementation project(':play-services-cronet-core')
|
||||
implementation project(':play-services-location-core')
|
||||
implementation project(':play-services-vision-core')
|
||||
withNearbyImplementation project(':play-services-nearby-core')
|
||||
|
@ -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
|
||||
|
38
play-services-cronet-core/build.gradle
Normal file
38
play-services-cronet-core/build.gradle
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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
|
||||
}
|
||||
}
|
||||
|
||||
apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG service implementation for play-services-cronet'
|
11
play-services-cronet-core/src/main/AndroidManifest.xml
Normal file
11
play-services-cronet-core/src/main/AndroidManifest.xml
Normal 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>
|
@ -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"
|
||||
);
|
||||
}
|
@ -22,6 +22,7 @@ include ':play-services-wearable-proto'
|
||||
|
||||
include ':play-services-base-core'
|
||||
include ':play-services-conscrypt-provider-core'
|
||||
include ':play-services-cronet-core'
|
||||
include ':play-services-location-core'
|
||||
include ':play-services-maps-core-mapbox'
|
||||
include ':play-services-maps-core-vtm'
|
||||
|
Loading…
Reference in New Issue
Block a user