mirror of https://github.com/YTVanced/VancedMicroG
Add gradle build for GmsCore
This commit is contained in:
parent
de24dcc33c
commit
52138a69e5
|
@ -2,3 +2,4 @@
|
||||||
gen
|
gen
|
||||||
bin
|
bin
|
||||||
build
|
build
|
||||||
|
user.gradle
|
||||||
|
|
|
@ -16,88 +16,86 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.android.gms"
|
package="com.google.android.gms"
|
||||||
android:versionCode="6111030">
|
android:versionCode="6111030">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="16" />
|
<uses-sdk android:minSdkVersion="16" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
|
<uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
<uses-permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE" />
|
<uses-permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE" />
|
||||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:label="@string/gms_app_name">
|
android:label="@string/gms_app_name">
|
||||||
<uses-library
|
<uses-library
|
||||||
android:name="com.android.location.provider"
|
android:name="com.google.android.maps"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
<uses-library
|
|
||||||
android:name="com.google.android.maps"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
<meta-data android:name="fake-signature" android:value="@string/fake_signature" />
|
<meta-data android:name="fake-signature"
|
||||||
|
android:value="@string/fake_signature" />
|
||||||
|
|
||||||
<!-- Jelly Bean / KitKat -->
|
<!-- Jelly Bean / KitKat -->
|
||||||
<service
|
<service
|
||||||
android:name="org.microg.nlp.location.LocationServiceV2"
|
android:name="org.microg.nlp.location.LocationServiceV2"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<!-- KitKat changed the action name but nothing else, hence we handle it the same -->
|
<!-- KitKat changed the action name but nothing else, hence we handle it the same -->
|
||||||
<action android:name="com.android.location.service.v3.NetworkLocationProvider" />
|
<action android:name="com.android.location.service.v3.NetworkLocationProvider" />
|
||||||
<action android:name="com.android.location.service.v2.NetworkLocationProvider" />
|
<action android:name="com.android.location.service.v2.NetworkLocationProvider" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="serviceVersion"
|
android:name="serviceVersion"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="serviceIsMultiuser"
|
android:name="serviceIsMultiuser"
|
||||||
android:value="false" />
|
android:value="false" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="org.microg.nlp.geocode.GeocodeServiceV1"
|
android:name="org.microg.nlp.geocode.GeocodeServiceV1"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<!-- Jelly Bean changed the action name but nothing else, hence we handle it the same -->
|
<!-- Jelly Bean changed the action name but nothing else, hence we handle it the same -->
|
||||||
<action android:name="com.android.location.service.GeocodeProvider" />
|
<action android:name="com.android.location.service.GeocodeProvider" />
|
||||||
<action android:name="com.google.android.location.GeocodeProvider" />
|
<action android:name="com.google.android.location.GeocodeProvider" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="serviceVersion"
|
android:name="serviceVersion"
|
||||||
android:value="2" />
|
android:value="2" />
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="serviceIsMultiuser"
|
android:name="serviceIsMultiuser"
|
||||||
android:value="false" />
|
android:value="false" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="org.microg.nlp.ui.SettingsActivity"
|
android:name="org.microg.nlp.ui.SettingsActivity"
|
||||||
android:label="@string/nlp_settings_label">
|
android:label="@string/nlp_settings_label">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<receiver android:name="org.microg.nlp.PackageReceiver" >
|
<receiver android:name="org.microg.nlp.PackageReceiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_CHANGED" />
|
<action android:name="android.intent.action.PACKAGE_CHANGED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_UPGRADED" />
|
<action android:name="android.intent.action.PACKAGE_UPGRADED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_REMOVED" />
|
<action android:name="android.intent.action.PACKAGE_REMOVED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
||||||
<action android:name="android.intent.action.PACKAGE_RESTARTED" />
|
<action android:name="android.intent.action.PACKAGE_RESTARTED" />
|
||||||
|
|
||||||
<data android:scheme="package" />
|
<data android:scheme="package" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="com.google.android.location.internal.server.GoogleLocationService"
|
android:name="com.google.android.location.internal.server.GoogleLocationService"
|
||||||
|
@ -106,29 +104,37 @@
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.android.location.internal.GMS_NLP" />
|
<action android:name="com.google.android.location.internal.GMS_NLP" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<meta-data android:name="minProtocolVersion" android:value="1" />
|
<meta-data android:name="minProtocolVersion"
|
||||||
<meta-data android:name="maxProtocolVersion" android:value="1" />
|
android:value="1" />
|
||||||
<meta-data android:name="releaseVersion" android:value="2007" />
|
<meta-data android:name="maxProtocolVersion"
|
||||||
<meta-data android:name="nlpServiceIntent" android:value="com.google.android.location.internal.GMS_NLP" />
|
android:value="1" />
|
||||||
|
<meta-data android:name="releaseVersion"
|
||||||
|
android:value="2007" />
|
||||||
|
<meta-data android:name="nlpServiceIntent"
|
||||||
|
android:value="com.google.android.location.internal.GMS_NLP" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name="com.google.android.location.internal.GoogleLocationManagerService"
|
android:name="com.google.android.location.internal.GoogleLocationManagerService"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.android.location.internal.GoogleLocationManagerService.START" />
|
<action android:name="com.google.android.location.internal.GoogleLocationManagerService.START" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<activity android:name="org.microg.tools.AccountPickerActivity" android:exported="true"
|
<activity android:name="org.microg.tools.AccountPickerActivity"
|
||||||
android:excludeFromRecents="true" android:theme="@android:style/Theme.Holo.Dialog">
|
android:exported="true"
|
||||||
|
android:excludeFromRecents="true"
|
||||||
|
android:theme="@android:style/Theme.Holo.Dialog">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="com.google.android.gms.common.account.CHOOSE_ACCOUNT" />
|
<action android:name="com.google.android.gms.common.account.CHOOSE_ACCOUNT" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<service android:name=".auth.GetToken" android:exported="true" />
|
<service android:name=".auth.GetToken"
|
||||||
<activity android:name=".auth.TokenActivity" android:exported="true" />
|
android:exported="true" />
|
||||||
</application>
|
<activity android:name=".auth.TokenActivity"
|
||||||
|
android:exported="true" />
|
||||||
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:1.0.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile 'com.android.support:support-v4:21.0.2'
|
||||||
|
compile 'com.android.support:appcompat-v7:21.0.2'
|
||||||
|
compile project(':UnifiedNlpLib')
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
/**
|
||||||
|
* Temporarily use Google APIs for the Maps API.
|
||||||
|
* Maps API v2 will stop redirecting to Maps API v1 in the future so this is
|
||||||
|
* not a big problem right now.
|
||||||
|
*/
|
||||||
|
compileSdkVersion 'Google Inc.:Google APIs:21'
|
||||||
|
buildToolsVersion "21.0.2"
|
||||||
|
lintOptions.abortOnError false
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
java.srcDirs = ['src']
|
||||||
|
aidl.srcDirs = ['src']
|
||||||
|
res.srcDirs = ['res']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
GmsCore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file('user.gradle').exists()) {
|
||||||
|
apply from: 'user.gradle'
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
include 'UnifiedNlpLib', 'UnifiedNlpLib:compat', 'UnifiedNlpApi'
|
|
@ -187,7 +187,9 @@ public class GoogleMapImpl {
|
||||||
public void redraw() {
|
public void redraw() {
|
||||||
mapView.postInvalidate();
|
mapView.postInvalidate();
|
||||||
try {
|
try {
|
||||||
((MapView.WrappedMapView) mapView.getWrapped()).postInvalidate();
|
Class.forName("com.google.android.maps.MapView.WrappedMapView")
|
||||||
|
.getDeclaredMethod("postInvalidate")
|
||||||
|
.invoke(MapView.class.getDeclaredMethod("getWrapped").invoke(mapView));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.w(TAG, "MapView does not support extended microg features", e);
|
Log.w(TAG, "MapView does not support extended microg features", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue