diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b8e53e8a..3be7e68c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -96,8 +96,22 @@ + + + + + + + + + - + diff --git a/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl b/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl index a4320311..3e5e2deb 100644 --- a/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl +++ b/src/com/google/android/gms/common/internal/IGmsCallbacks.aidl @@ -1,5 +1,5 @@ package com.google.android.gms.common.internal; interface IGmsCallbacks { - void onPostInitComplete(int code, IBinder binder, in Bundle params); + void onPostInitComplete(int statusCode, IBinder binder, in Bundle params); } diff --git a/src/com/google/android/gms/location/Geofence.aidl b/src/com/google/android/gms/location/Geofence.aidl new file mode 100644 index 00000000..4fc554eb --- /dev/null +++ b/src/com/google/android/gms/location/Geofence.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.location; + +parcelable Geofence; \ No newline at end of file diff --git a/src/com/google/android/gms/location/Geofence.java b/src/com/google/android/gms/location/Geofence.java new file mode 100644 index 00000000..517003a3 --- /dev/null +++ b/src/com/google/android/gms/location/Geofence.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014 μg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.gms.location; + +import android.os.Parcel; +import com.google.android.gms.common.safeparcel.SafeParcelable; + +public class Geofence implements SafeParcelable{ + + public static Creator CREATOR = new Creator() { + @Override + public Geofence createFromParcel(Parcel source) { + return new Geofence(); + } + + @Override + public Geofence[] newArray(int size) { + return new Geofence[size]; + } + }; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + + } +} diff --git a/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl b/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl new file mode 100644 index 00000000..b8e03066 --- /dev/null +++ b/src/com/google/android/gms/location/internal/IGeofencerCallbacks.aidl @@ -0,0 +1,4 @@ +package com.google.android.gms.location.internal; + +interface IGeofencerCallbacks { +} diff --git a/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl new file mode 100644 index 00000000..4c34b736 --- /dev/null +++ b/src/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.location.internal; + +import com.google.android.gms.location.Geofence; +import com.google.android.gms.location.internal.IGeofencerCallbacks; + +interface IGoogleLocationManagerService { + void addGeofences(in List geofences, in PendingIntent pendingIntent, IGeofencerCallbacks callback, String str); +} diff --git a/src/com/google/android/location/internal/GoogleLocationManagerService.java b/src/com/google/android/location/internal/GoogleLocationManagerService.java index 94a40491..66853dcb 100644 --- a/src/com/google/android/location/internal/GoogleLocationManagerService.java +++ b/src/com/google/android/location/internal/GoogleLocationManagerService.java @@ -16,15 +16,21 @@ package com.google.android.location.internal; +import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; +import com.google.android.gms.location.Geofence; +import com.google.android.gms.location.internal.IGeofencerCallbacks; +import com.google.android.gms.location.internal.IGoogleLocationManagerService; import org.microg.gms.AbstractGmsServiceBroker; import com.google.android.gms.common.internal.IGmsCallbacks; +import java.util.List; + public class GoogleLocationManagerService extends Service { private static final String TAG = GoogleLocationManagerService.class.getName(); @@ -39,9 +45,16 @@ public class GoogleLocationManagerService extends Service { } @Override - public void getGoogleLocationManagerService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { - Log.d(TAG, "getGoogleLocationManagerService: " + code + ", " + str + ", " + params); - callback.onPostInitComplete(code, null, params); + public void getGoogleLocationManagerService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { + params.keySet(); + Log.d(TAG, "getGoogleLocationManagerService: " + versionCode + ", " + packageName + ", " + params); + callback.onPostInitComplete(0, new IGoogleLocationManagerService.Stub() { + + @Override + public void addGeofences(List geofences, PendingIntent pendingIntent, IGeofencerCallbacks callback, String str) throws RemoteException { + + } + }, params); } } } diff --git a/src/org/microg/gms/AbstractGmsServiceBroker.java b/src/org/microg/gms/AbstractGmsServiceBroker.java index 10bff74b..c05d4452 100644 --- a/src/org/microg/gms/AbstractGmsServiceBroker.java +++ b/src/org/microg/gms/AbstractGmsServiceBroker.java @@ -24,122 +24,122 @@ import com.google.android.gms.common.internal.IGmsServiceBroker; public abstract class AbstractGmsServiceBroker extends IGmsServiceBroker.Stub { @Override - public void getPlusService(IGmsCallbacks callback, int code, String str1, String str2, String[] paramArrayOfString, String str3, Bundle params) throws RemoteException { + public void getPlusService(IGmsCallbacks callback, int versionCode, String packageName, String str2, String[] paramArrayOfString, String str3, Bundle params) throws RemoteException { throw new IllegalArgumentException("Plus service not supported"); } @Override - public void getPanoramaService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getPanoramaService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Panorama service not supported"); } @Override - public void getAppDataSearchService(IGmsCallbacks callback, int code, String str) throws RemoteException { + public void getAppDataSearchService(IGmsCallbacks callback, int versionCode, String packageName) throws RemoteException { throw new IllegalArgumentException("App Data Search service not supported"); } @Override - public void getWalletService(IGmsCallbacks callback, int code) throws RemoteException { + public void getWalletService(IGmsCallbacks callback, int versionCode) throws RemoteException { throw new IllegalArgumentException("Wallet service not supported"); } @Override - public void getPeopleService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getPeopleService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("People service not supported"); } @Override - public void getReportingService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getReportingService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Reporting service not supported"); } @Override - public void getLocationService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getLocationService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Location service not supported"); } @Override - public void getGoogleLocationManagerService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getGoogleLocationManagerService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Google Location Manager service not supported"); } @Override - public void getGamesService(IGmsCallbacks callback, int code, String str1, String str2, String[] args, String str3, IBinder binder, String str4, Bundle params) throws RemoteException { + public void getGamesService(IGmsCallbacks callback, int versionCode, String packageName, String str2, String[] args, String str3, IBinder binder, String str4, Bundle params) throws RemoteException { throw new IllegalArgumentException("Games service not supported"); } @Override - public void getAppStateService(IGmsCallbacks callback, int code, String str1, String str2, String[] args) throws RemoteException { + public void getAppStateService(IGmsCallbacks callback, int versionCode, String packageName, String str2, String[] args) throws RemoteException { throw new IllegalArgumentException("App State service not supported"); } @Override - public void getPlayLogService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getPlayLogService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Play Log service not supported"); } @Override - public void getAdMobService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getAdMobService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("AdMob service not supported"); } @Override - public void getDroidGuardService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getDroidGuardService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("DroidGuard service not supported"); } @Override - public void getLockboxService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getLockboxService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Lockbox service not supported"); } @Override - public void getCastMirroringService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getCastMirroringService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Cast Mirroring service not supported"); } @Override - public void getNetworkQualityService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getNetworkQualityService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Network Quality service not supported"); } @Override - public void getGoogleIdentityService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getGoogleIdentityService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Google Identity service not supported"); } @Override - public void getGoogleFeedbackService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getGoogleFeedbackService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Google Feedback service not supported"); } @Override - public void getCastService(IGmsCallbacks callback, int code, String str, IBinder binder, Bundle params) throws RemoteException { + public void getCastService(IGmsCallbacks callback, int versionCode, String packageName, IBinder binder, Bundle params) throws RemoteException { throw new IllegalArgumentException("Cast service not supported"); } @Override - public void getDriveService(IGmsCallbacks callback, int code, String str1, String[] args, String str2, Bundle params) throws RemoteException { + public void getDriveService(IGmsCallbacks callback, int versionCode, String packageName, String[] args, String str2, Bundle params) throws RemoteException { throw new IllegalArgumentException("Drive service not supported"); } @Override - public void getLightweightAppDataSearchService(IGmsCallbacks callback, int code, String str) throws RemoteException { + public void getLightweightAppDataSearchService(IGmsCallbacks callback, int versionCode, String packageName) throws RemoteException { throw new IllegalArgumentException("Lightweight App Data Search service not supported"); } @Override - public void getSearchAdministrationService(IGmsCallbacks callback, int code, String str) throws RemoteException { + public void getSearchAdministrationService(IGmsCallbacks callback, int versionCode, String packageName) throws RemoteException { throw new IllegalArgumentException("Search Administration service not supported"); } @Override - public void getAutoBackupService(IGmsCallbacks callback, int code, String str, Bundle params) throws RemoteException { + public void getAutoBackupService(IGmsCallbacks callback, int versionCode, String packageName, Bundle params) throws RemoteException { throw new IllegalArgumentException("Auto Backup service not supported"); } @Override - public void getAddressService(IGmsCallbacks callback, int code, String str) throws RemoteException { + public void getAddressService(IGmsCallbacks callback, int versionCode, String packageName) throws RemoteException { throw new IllegalArgumentException("Address service not supported"); } }