From 19f97f9f70b0d548da8528974d096c7e26c03db3 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Mon, 12 Jan 2015 00:08:51 +0100 Subject: [PATCH] Fix links to GmsApi --- .../GoogleLocationManagerService.java | 4 +- .../microg/gms/AbstractGmsServiceBroker.java | 170 ++++++++++++++++++ .../gms/location/MockLocationProvider.java | 2 +- 3 files changed, 173 insertions(+), 3 deletions(-) create mode 100644 src/org/microg/gms/AbstractGmsServiceBroker.java diff --git a/src/com/google/android/location/internal/GoogleLocationManagerService.java b/src/com/google/android/location/internal/GoogleLocationManagerService.java index d9279a46..c62a95a2 100644 --- a/src/com/google/android/location/internal/GoogleLocationManagerService.java +++ b/src/com/google/android/location/internal/GoogleLocationManagerService.java @@ -22,11 +22,11 @@ import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; -import com.google.android.gms.common.AbstractGmsServiceBroker; +import org.microg.gms.AbstractGmsServiceBroker; import com.google.android.gms.common.internal.IGmsCallbacks; import org.microg.gms.location.GoogleLocationManagerServiceImpl; -import static org.microg.gms.maps.Constants.ACTION_GMS_LOCATION_MANAGER_SERVICE_START; +import static org.microg.gms.Constants.ACTION_GMS_LOCATION_MANAGER_SERVICE_START; public class GoogleLocationManagerService extends Service { private static final String TAG = "GmsLMS"; diff --git a/src/org/microg/gms/AbstractGmsServiceBroker.java b/src/org/microg/gms/AbstractGmsServiceBroker.java new file mode 100644 index 00000000..21d58f3d --- /dev/null +++ b/src/org/microg/gms/AbstractGmsServiceBroker.java @@ -0,0 +1,170 @@ +/* + * 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 org.microg.gms; + +import android.os.Bundle; +import android.os.IBinder; +import android.os.RemoteException; +import com.google.android.gms.common.internal.IGmsCallbacks; +import com.google.android.gms.common.internal.IGmsServiceBroker; + +public abstract class AbstractGmsServiceBroker extends IGmsServiceBroker.Stub { + @Override + 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 versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Panorama service not supported"); + } + + @Override + 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 versionCode) throws RemoteException { + throw new IllegalArgumentException("Wallet service not supported"); + } + + @Override + 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 versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Reporting service not supported"); + } + + @Override + 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 versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Google Location Manager service not supported"); + } + + @Override + 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 versionCode, String packageName, + String str2, String[] args) throws RemoteException { + throw new IllegalArgumentException("App State service not supported"); + } + + @Override + 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 versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("AdMob service not supported"); + } + + @Override + 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 versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Lockbox service not supported"); + } + + @Override + 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 versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Network Quality service not supported"); + } + + @Override + 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 versionCode, + String packageName, Bundle params) throws RemoteException { + throw new IllegalArgumentException("Google Feedback service not supported"); + } + + @Override + 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 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 versionCode, + String packageName) throws RemoteException { + throw new IllegalArgumentException("Lightweight App Data Search service not supported"); + } + + @Override + 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 versionCode, String packageName, + Bundle params) throws RemoteException { + throw new IllegalArgumentException("Auto Backup service not supported"); + } + + @Override + public void getAddressService(IGmsCallbacks callback, int versionCode, String packageName) + throws RemoteException { + throw new IllegalArgumentException("Address service not supported"); + } +} diff --git a/src/org/microg/gms/location/MockLocationProvider.java b/src/org/microg/gms/location/MockLocationProvider.java index 080019fc..8efdd9a4 100644 --- a/src/org/microg/gms/location/MockLocationProvider.java +++ b/src/org/microg/gms/location/MockLocationProvider.java @@ -3,7 +3,7 @@ package org.microg.gms.location; import android.location.Location; import android.os.Bundle; -import static org.microg.gms.maps.Constants.KEY_MOCK_LOCATION; +import static org.microg.gms.Constants.KEY_MOCK_LOCATION; public class MockLocationProvider { private boolean mockEnabled = false;