mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-19 02:29:25 +01:00
Fix async issues
This commit is contained in:
parent
ad1d47e1cf
commit
f70578f78b
2
GmsApi
2
GmsApi
@ -1 +1 @@
|
||||
Subproject commit 3c19d84eaa9842a2526166a38ad445125dbd2300
|
||||
Subproject commit 5d2364f3dcc66bdd1ae19c91d76d77d2a4a785b6
|
@ -9,8 +9,8 @@ import android.content.DialogInterface;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
|
||||
import org.microg.gms.Constants;
|
||||
import org.microg.gms.PublicApi;
|
||||
import org.microg.gms.common.Constants;
|
||||
import org.microg.gms.common.PublicApi;
|
||||
|
||||
/**
|
||||
* Utility class for verifying that the Google Play services APK is available and up-to-date on
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import org.microg.gms.PublicApi;
|
||||
import org.microg.gms.common.PublicApi;
|
||||
import org.microg.gms.common.api.ApiBuilder;
|
||||
|
||||
/**
|
||||
|
@ -10,8 +10,8 @@ import android.view.View;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
import org.microg.gms.Constants;
|
||||
import org.microg.gms.PublicApi;
|
||||
import org.microg.gms.common.Constants;
|
||||
import org.microg.gms.common.PublicApi;
|
||||
import org.microg.gms.common.api.GoogleApiClientImpl;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -7,7 +7,7 @@ import android.os.Looper;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
|
||||
import org.microg.gms.Constants;
|
||||
import org.microg.gms.common.Constants;
|
||||
|
||||
public interface FusedLocationProviderApi {
|
||||
public static final String KEY_LOCATION_CHANGED = "com.google.android.location.LOCATION";
|
||||
|
@ -28,7 +28,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.microg.gms.Constants.GMS_PACKAGE_NAME;
|
||||
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
|
||||
|
||||
public class MultiConnectionKeeper {
|
||||
private static final String TAG = "GmsMultiConnectionKeeper";
|
||||
@ -48,7 +48,7 @@ public class MultiConnectionKeeper {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
public boolean bind(String action, ServiceConnection connection) {
|
||||
public synchronized boolean bind(String action, ServiceConnection connection) {
|
||||
Log.d(TAG, "bind(" + action + ", " + connection + ")");
|
||||
Connection con = connections.get(action);
|
||||
if (con != null) {
|
||||
@ -66,7 +66,7 @@ public class MultiConnectionKeeper {
|
||||
return con.isBound();
|
||||
}
|
||||
|
||||
public void unbind(String action, ServiceConnection connection) {
|
||||
public synchronized void unbind(String action, ServiceConnection connection) {
|
||||
Log.d(TAG, "unbind(" + action + ", " + connection + ")");
|
||||
Connection con = connections.get(action);
|
||||
if (con != null) {
|
||||
@ -108,6 +108,7 @@ public class MultiConnectionKeeper {
|
||||
connection.onServiceDisconnected(componentName);
|
||||
}
|
||||
connected = false;
|
||||
bound = false;
|
||||
}
|
||||
};
|
||||
|
||||
@ -135,7 +136,11 @@ public class MultiConnectionKeeper {
|
||||
|
||||
public void unbind() {
|
||||
Log.d(TAG, "Connection(" + actionString + ") : unbind()");
|
||||
context.unbindService(serviceConnection);
|
||||
try {
|
||||
context.unbindService(serviceConnection);
|
||||
} catch (IllegalArgumentException e) { // not bound (whatever reason)
|
||||
Log.w(TAG, e);
|
||||
}
|
||||
bound = false;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.internal.IGmsServiceBroker;
|
||||
import com.google.android.gms.location.internal.IGoogleLocationManagerService;
|
||||
|
||||
import org.microg.gms.Constants;
|
||||
import org.microg.gms.common.Constants;
|
||||
import org.microg.gms.common.GmsClient;
|
||||
|
||||
public abstract class GoogleLocationManagerClient extends GmsClient<IGoogleLocationManagerService> {
|
||||
|
Loading…
Reference in New Issue
Block a user