diff --git a/.gitignore b/.gitignore index d819b41d..df0fcc88 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ gen bin build +user.gradle diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f4c902ba..e8c2042a 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -16,88 +16,86 @@ --> + package="com.google.android.gms" + android:versionCode="6111030"> - + - - - - - - + + + + + + - - - + + - + - - - - - - - + + + + + + + - - - + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + - - - - - + + + + - + - - - + + + diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..1c86c0b7 --- /dev/null +++ b/build.gradle @@ -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' +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..5a725c35 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include 'UnifiedNlpLib', 'UnifiedNlpLib:compat', 'UnifiedNlpApi' diff --git a/src/org/microg/gms/maps/GoogleMapImpl.java b/src/org/microg/gms/maps/GoogleMapImpl.java index b91e41ed..b2af0a39 100644 --- a/src/org/microg/gms/maps/GoogleMapImpl.java +++ b/src/org/microg/gms/maps/GoogleMapImpl.java @@ -187,7 +187,9 @@ public class GoogleMapImpl { public void redraw() { mapView.postInvalidate(); 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) { Log.w(TAG, "MapView does not support extended microg features", e); }