-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the crash problem of google maps version 11_114_0103
- Loading branch information
1 parent
048a6e5
commit 30f00a6
Showing
9 changed files
with
156 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...i/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.android.gms.semanticlocation; | ||
|
||
parcelable SemanticLocationEventRequest; |
18 changes: 18 additions & 0 deletions
18
.../main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// ISemanticLocationService.aidl | ||
package com.google.android.gms.semanticlocation.internal; | ||
|
||
import android.app.PendingIntent; | ||
import android.os.IInterface; | ||
import com.google.android.gms.semanticlocation.SemanticLocationEventRequest; | ||
import com.google.android.gms.semanticlocation.internal.SemanticLocationParameters; | ||
import com.google.android.gms.common.api.internal.IStatusCallback; | ||
// Declare any non-default types here with import statements | ||
|
||
interface ISemanticLocationService { | ||
void registerSemanticLocationEventsOperation(in SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, in SemanticLocationEventRequest semanticLocationEventRequest, in PendingIntent pendingIntent); | ||
|
||
void setIncognitoModeOperation(in SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, boolean mode); | ||
|
||
void unregisterSemanticLocationEventsOperation(in SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, in PendingIntent pendingIntent); | ||
|
||
} |
3 changes: 3 additions & 0 deletions
3
...ain/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.google.android.gms.semanticlocation.internal; | ||
|
||
parcelable SemanticLocationParameters; |
31 changes: 31 additions & 0 deletions
31
...i/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.google.android.gms.semanticlocation; | ||
|
||
|
||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class SemanticLocationEventRequest extends AbstractSafeParcelable { | ||
@Field(1) | ||
public float position; | ||
|
||
public SemanticLocationEventRequest(float position) { | ||
this.position = position; | ||
} | ||
|
||
public SemanticLocationEventRequest() { | ||
|
||
} | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<SemanticLocationEventRequest> CREATOR = findCreator(SemanticLocationEventRequest.class); | ||
} |
35 changes: 35 additions & 0 deletions
35
...ain/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.google.android.gms.semanticlocation.internal; | ||
|
||
import android.accounts.Account; | ||
import android.os.Parcel; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable; | ||
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; | ||
|
||
@SafeParcelable.Class | ||
public class SemanticLocationParameters extends AbstractSafeParcelable { | ||
@Field(1) | ||
public Account account; | ||
@Field(2) | ||
public String clientIdentifier; | ||
@Field(3) | ||
public String packageName; | ||
|
||
public SemanticLocationParameters() {} | ||
|
||
public SemanticLocationParameters(Account account, String clientIdentifier, String packageName) { | ||
this.account = account; | ||
this.clientIdentifier = clientIdentifier; | ||
this.packageName = packageName; | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<SemanticLocationParameters> CREATOR = findCreator(SemanticLocationParameters.class); | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...main/java/com/google/android/gms/semanticlocation/service/SemanticLocationClientImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.google.android.gms.semanticlocation.service; | ||
|
||
import android.app.PendingIntent; | ||
import android.os.RemoteException; | ||
import android.util.Log; | ||
|
||
import com.google.android.gms.common.api.internal.IStatusCallback; | ||
import com.google.android.gms.semanticlocation.SemanticLocationEventRequest; | ||
import com.google.android.gms.semanticlocation.internal.ISemanticLocationService; | ||
import com.google.android.gms.semanticlocation.internal.SemanticLocationParameters; | ||
|
||
public class SemanticLocationClientImpl extends ISemanticLocationService.Stub { | ||
|
||
private static final String TAG = SemanticLocationClientImpl.class.getSimpleName(); | ||
|
||
@Override | ||
public void registerSemanticLocationEventsOperation(SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, SemanticLocationEventRequest semanticLocationEventRequest, PendingIntent pendingIntent) throws RemoteException { | ||
Log.d(TAG, "registerSemanticLocationEventsOperation: " + semanticLocationParameters); | ||
} | ||
|
||
@Override | ||
public void setIncognitoModeOperation(SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, boolean mode) throws RemoteException { | ||
Log.d(TAG, "setIncognitoModeOperation: " + semanticLocationParameters); | ||
} | ||
|
||
@Override | ||
public void unregisterSemanticLocationEventsOperation(SemanticLocationParameters semanticLocationParameters, IStatusCallback callback, PendingIntent pendingIntent) throws RemoteException { | ||
Log.d(TAG, "unregisterSemanticLocationEventsOperation: " + semanticLocationParameters); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...n/java/com/google/android/gms/semanticlocation/service/SemanticLocationClientService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.google.android.gms.semanticlocation.service; | ||
|
||
import android.os.RemoteException; | ||
|
||
import com.google.android.gms.common.ConnectionResult; | ||
import com.google.android.gms.common.Feature; | ||
import com.google.android.gms.common.internal.ConnectionInfo; | ||
import com.google.android.gms.common.internal.GetServiceRequest; | ||
import com.google.android.gms.common.internal.IGmsCallbacks; | ||
|
||
import org.microg.gms.BaseService; | ||
import org.microg.gms.common.GmsService; | ||
|
||
public class SemanticLocationClientService extends BaseService { | ||
public SemanticLocationClientService() { | ||
super("SemanticLocationClientService", GmsService.SEMANTIC_LOCATION); | ||
} | ||
|
||
@Override | ||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException { | ||
ConnectionInfo connectionInfo = new ConnectionInfo(); | ||
connectionInfo.features = new Feature[]{ | ||
new Feature("semanticlocation_events", 1L), | ||
}; | ||
callback.onPostInitCompleteWithConnectionInfo(ConnectionResult.SUCCESS, | ||
new SemanticLocationClientImpl().asBinder(), | ||
connectionInfo); | ||
} | ||
} |