mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-02-01 21:47:31 +01:00
Java 6 compat
This commit is contained in:
parent
bd1be63f6b
commit
7c48d43efc
2
extern/GmsApi
vendored
2
extern/GmsApi
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8928053170b6a819befa297f264e5ba7e2f9342b
|
Subproject commit deb757edfb0684f41ccc493b7c35a98878571a56
|
2
extern/UnifiedNlp
vendored
2
extern/UnifiedNlp
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 114355071bfc42a4306556381c0d0040d9ae44ff
|
Subproject commit 9bd476a0498cf6f5ef0fb82108955751445c176a
|
@ -35,19 +35,15 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.android.support:support-v4:22.0.0'
|
compile 'com.android.support:support-v4:22.0.0'
|
||||||
compile 'com.android.support:appcompat-v7:22.0.0'
|
compile 'com.android.support:appcompat-v7:22.0.0'
|
||||||
|
|
||||||
compile 'de.hdodenhof:circleimageview:1.2.1'
|
compile 'de.hdodenhof:circleimageview:1.2.1'
|
||||||
compile 'com.squareup.wire:wire-runtime:1.6.1'
|
compile 'com.squareup.wire:wire-runtime:1.6.1'
|
||||||
|
|
||||||
compile project(':play-services-api')
|
compile project(':play-services-api')
|
||||||
compile project(':unifiednlp-base')
|
compile project(':unifiednlp-base')
|
||||||
|
|
||||||
// vtm from ./libs
|
// vtm from ./libs
|
||||||
compile group: 'org.oscim', name: 'vtm-android', version: '0.6.0-SNAPSHOT', ext: 'aar'
|
compile 'org.oscim:vtm-android:0.6.0-SNAPSHOT@aar'
|
||||||
compile group: 'org.oscim', name: 'vtm-themes', version: '0.6.0-SNAPSHOT'
|
compile 'org.oscim:vtm-themes:0.6.0-SNAPSHOT'
|
||||||
compile group: 'org.oscim', name: 'vtm-extras', version: '0.6.0-SNAPSHOT'
|
compile 'org.oscim:vtm-extras:0.6.0-SNAPSHOT'
|
||||||
compile group: 'org.oscim', name: 'vtm', version: '0.6.0-SNAPSHOT'
|
compile 'org.oscim:vtm:0.6.0-SNAPSHOT'
|
||||||
|
|
||||||
// Dependencies for vtm
|
// Dependencies for vtm
|
||||||
compile 'com.fasterxml.jackson.core:jackson-core:2.3.0'
|
compile 'com.fasterxml.jackson.core:jackson-core:2.3.0'
|
||||||
compile 'com.vividsolutions:jts:1.13'
|
compile 'com.vividsolutions:jts:1.13'
|
||||||
@ -65,6 +61,9 @@ android {
|
|||||||
java.srcDirs += 'src/main/protos-java'
|
java.srcDirs += 'src/main/protos-java'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_6
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file('user.gradle').exists()) {
|
if (file('user.gradle').exists()) {
|
||||||
|
@ -40,11 +40,11 @@ public abstract class AbstractGmsServiceBroker extends IGmsServiceBroker.Stub {
|
|||||||
private final Set<Integer> supportedServiceIds;
|
private final Set<Integer> supportedServiceIds;
|
||||||
|
|
||||||
public AbstractGmsServiceBroker(Integer supportedServiceId, Integer... supportedServiceIds) {
|
public AbstractGmsServiceBroker(Integer supportedServiceId, Integer... supportedServiceIds) {
|
||||||
this(new HashSet<>(combine(supportedServiceId, supportedServiceIds)));
|
this(combine(supportedServiceId, supportedServiceIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Set<Integer> combine(Integer i, Integer... is) {
|
private static Set<Integer> combine(Integer i, Integer... is) {
|
||||||
Set<Integer> integers = new HashSet<>(Arrays.asList(is));
|
Set<Integer> integers = new HashSet<Integer>(Arrays.asList(is));
|
||||||
integers.add(i);
|
integers.add(i);
|
||||||
return integers;
|
return integers;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class CheckinManager {
|
|||||||
LastCheckinInfo info = LastCheckinInfo.read(context);
|
LastCheckinInfo info = LastCheckinInfo.read(context);
|
||||||
if (!force && info.lastCheckin > System.currentTimeMillis() - MIN_CHECKIN_INTERVAL)
|
if (!force && info.lastCheckin > System.currentTimeMillis() - MIN_CHECKIN_INTERVAL)
|
||||||
return null;
|
return null;
|
||||||
List<CheckinClient.Account> accounts = new ArrayList<>();
|
List<CheckinClient.Account> accounts = new ArrayList<CheckinClient.Account>();
|
||||||
AccountManager accountManager = AccountManager.get(context);
|
AccountManager accountManager = AccountManager.get(context);
|
||||||
String accountType = context.getString(R.string.google_account_type);
|
String accountType = context.getString(R.string.google_account_type);
|
||||||
for (Account account : accountManager.getAccountsByType(accountType)) {
|
for (Account account : accountManager.getAccountsByType(accountType)) {
|
||||||
|
@ -66,21 +66,21 @@ public class DeviceConfiguration {
|
|||||||
glEsVersion = configurationInfo.reqGlEsVersion;
|
glEsVersion = configurationInfo.reqGlEsVersion;
|
||||||
PackageManager packageManager = context.getPackageManager();
|
PackageManager packageManager = context.getPackageManager();
|
||||||
sharedLibraries = Arrays.asList(packageManager.getSystemSharedLibraryNames());
|
sharedLibraries = Arrays.asList(packageManager.getSystemSharedLibraryNames());
|
||||||
availableFeatures = new ArrayList<>();
|
availableFeatures = new ArrayList<String>();
|
||||||
for (FeatureInfo featureInfo : packageManager.getSystemAvailableFeatures()) {
|
for (FeatureInfo featureInfo : packageManager.getSystemAvailableFeatures()) {
|
||||||
if (featureInfo.name != null) availableFeatures.add(featureInfo.name);
|
if (featureInfo.name != null) availableFeatures.add(featureInfo.name);
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
nativePlatforms = Arrays.asList(Build.SUPPORTED_ABIS);
|
nativePlatforms = Arrays.asList(Build.SUPPORTED_ABIS);
|
||||||
} else {
|
} else {
|
||||||
nativePlatforms = new ArrayList<>();
|
nativePlatforms = new ArrayList<String>();
|
||||||
nativePlatforms.add(Build.CPU_ABI);
|
nativePlatforms.add(Build.CPU_ABI);
|
||||||
if (Build.CPU_ABI2 != null) nativePlatforms.add(Build.CPU_ABI2);
|
if (Build.CPU_ABI2 != null) nativePlatforms.add(Build.CPU_ABI2);
|
||||||
}
|
}
|
||||||
widthPixels = displayMetrics.widthPixels;
|
widthPixels = displayMetrics.widthPixels;
|
||||||
heightPixels = displayMetrics.heightPixels;
|
heightPixels = displayMetrics.heightPixels;
|
||||||
locales = Arrays.asList(context.getAssets().getLocales());
|
locales = Arrays.asList(context.getAssets().getLocales());
|
||||||
glExtensions = new ArrayList<>();
|
glExtensions = new ArrayList<String>();
|
||||||
addEglExtensions(glExtensions);
|
addEglExtensions(glExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> search(String search) {
|
public Map<String, String> search(String search) {
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
Cursor cursor = getReadableDatabase().query("overrides", new String[]{"name", "value"},
|
Cursor cursor = getReadableDatabase().query("overrides", new String[]{"name", "value"},
|
||||||
"name LIKE ?", new String[]{search}, null, null, null, null);
|
"name LIKE ?", new String[]{search}, null, null, null, null);
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
|
@ -46,8 +46,8 @@ public class GServicesProvider extends ContentProvider {
|
|||||||
private static final String TAG = "GmsServicesProvider";
|
private static final String TAG = "GmsServicesProvider";
|
||||||
|
|
||||||
private DatabaseHelper databaseHelper;
|
private DatabaseHelper databaseHelper;
|
||||||
private Map<String, String> cache = new HashMap<>();
|
private Map<String, String> cache = new HashMap<String, String>();
|
||||||
private Set<String> cachedPrefixes = new HashSet<>();
|
private Set<String> cachedPrefixes = new HashSet<String>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreate() {
|
public boolean onCreate() {
|
||||||
|
@ -40,7 +40,7 @@ public class GoogleLocationManager implements LocationChangeListener {
|
|||||||
private RealLocationProvider gpsProvider;
|
private RealLocationProvider gpsProvider;
|
||||||
private RealLocationProvider networkProvider;
|
private RealLocationProvider networkProvider;
|
||||||
private MockLocationProvider mockProvider;
|
private MockLocationProvider mockProvider;
|
||||||
private List<LocationRequestHelper> currentRequests = new ArrayList<>();
|
private List<LocationRequestHelper> currentRequests = new ArrayList<LocationRequestHelper>();
|
||||||
|
|
||||||
public GoogleLocationManager(Context context) {
|
public GoogleLocationManager(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
@ -36,7 +36,7 @@ public class RealLocationProvider {
|
|||||||
private final AtomicBoolean connected = new AtomicBoolean(false);
|
private final AtomicBoolean connected = new AtomicBoolean(false);
|
||||||
private long connectedMinTime;
|
private long connectedMinTime;
|
||||||
private float connectedMinDistance;
|
private float connectedMinDistance;
|
||||||
private List<LocationRequestHelper> requests = new ArrayList<>();
|
private List<LocationRequestHelper> requests = new ArrayList<LocationRequestHelper>();
|
||||||
private final LocationChangeListener changeListener;
|
private final LocationChangeListener changeListener;
|
||||||
private LocationListener listener = new LocationListener() {
|
private LocationListener listener = new LocationListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -53,7 +53,7 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
|
|||||||
private final OSciMap4TileSource tileSource;
|
private final OSciMap4TileSource tileSource;
|
||||||
private final TileCache cache;
|
private final TileCache cache;
|
||||||
private final ItemizedLayer<MarkerItem> items;
|
private final ItemizedLayer<MarkerItem> items;
|
||||||
private java.util.Map<String, Markup> markupMap = new HashMap<>();
|
private java.util.Map<String, Markup> markupMap = new HashMap<String, Markup>();
|
||||||
private boolean redrawPosted = false;
|
private boolean redrawPosted = false;
|
||||||
|
|
||||||
public BackendMap(Context context) {
|
public BackendMap(Context context) {
|
||||||
@ -68,7 +68,7 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener<MarkerIte
|
|||||||
Layers layers = mapView.map().layers();
|
Layers layers = mapView.map().layers();
|
||||||
layers.add(buildings = new BuildingLayer(mapView.map(), baseLayer));
|
layers.add(buildings = new BuildingLayer(mapView.map(), baseLayer));
|
||||||
layers.add(new LabelLayer(mapView.map(), baseLayer));
|
layers.add(new LabelLayer(mapView.map(), baseLayer));
|
||||||
layers.add(items = new ItemizedLayer<>(mapView.map(), new MarkerSymbol(new AndroidBitmap(BitmapFactory
|
layers.add(items = new ItemizedLayer<MarkerItem>(mapView.map(), new MarkerSymbol(new AndroidBitmap(BitmapFactory
|
||||||
.decodeResource(ResourcesContainer.get(), R.drawable.nop)), 0.5F, 1)));
|
.decodeResource(ResourcesContainer.get(), R.drawable.nop)), 0.5F, 1)));
|
||||||
items.setOnItemGestureListener(this);
|
items.setOnItemGestureListener(this);
|
||||||
mapView.map().setTheme(VtmThemes.DEFAULT);
|
mapView.map().setTheme(VtmThemes.DEFAULT);
|
||||||
|
@ -30,7 +30,7 @@ import java.util.Set;
|
|||||||
public class BitmapDescriptorImpl {
|
public class BitmapDescriptorImpl {
|
||||||
private BitmapDescriptor descriptor;
|
private BitmapDescriptor descriptor;
|
||||||
private boolean loadStarted = false;
|
private boolean loadStarted = false;
|
||||||
private Set<Runnable> waitingForLoad = new HashSet<>();
|
private Set<Runnable> waitingForLoad = new HashSet<Runnable>();
|
||||||
|
|
||||||
public BitmapDescriptorImpl(IObjectWrapper remoteObject) {
|
public BitmapDescriptorImpl(IObjectWrapper remoteObject) {
|
||||||
this(new BitmapDescriptor(remoteObject));
|
this(new BitmapDescriptor(remoteObject));
|
||||||
@ -41,7 +41,7 @@ public class BitmapDescriptorImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public BitmapDescriptorImpl() {
|
public BitmapDescriptorImpl() {
|
||||||
this(new ObjectWrapper<>(new DefaultBitmapDescriptor(0)));
|
this(new ObjectWrapper<DefaultBitmapDescriptor>(new DefaultBitmapDescriptor(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractBitmapDescriptor getDescriptor() {
|
public AbstractBitmapDescriptor getDescriptor() {
|
||||||
|
@ -104,7 +104,7 @@ public class PeopleManager {
|
|||||||
DatabaseHelper databaseHelper = new DatabaseHelper(context);
|
DatabaseHelper databaseHelper = new DatabaseHelper(context);
|
||||||
databaseHelper.putOwner(contentValues);
|
databaseHelper.putOwner(contentValues);
|
||||||
databaseHelper.close();
|
databaseHelper.close();
|
||||||
} catch (JSONException | IOException e) {
|
} catch (Exception e) {
|
||||||
Log.w(TAG, e);
|
Log.w(TAG, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user