Add dummy Places API implementation

This commit is contained in:
Marvin W 2016-09-24 21:03:25 +02:00
parent db93985e28
commit 6bef699f58
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
4 changed files with 70 additions and 3 deletions

View File

@ -17,7 +17,6 @@
package org.microg.gms.places;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;
@ -32,6 +31,6 @@ public class GeoDataService extends BaseService {
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
Log.d(TAG, "unimplemented Method: handleServiceRequest");
callback.onPostInitComplete(0, new PlacesServiceImpl().asBinder(), null);
}
}

View File

@ -32,6 +32,6 @@ public class PlaceDetectionService extends BaseService {
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
Log.d(TAG, "unimplemented Method: handleServiceRequest");
callback.onPostInitComplete(0, new PlaceDetectionServiceImpl().asBinder(), null);
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright 2013-2016 microG 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.places;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.location.places.internal.IGooglePlaceDetectionService;
public class PlaceDetectionServiceImpl extends IGooglePlaceDetectionService.Stub{
private static final String TAG = "GmsPlcDtctSvcImpl";
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (super.onTransact(code, data, reply, flags)) return true;
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
return false;
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright 2013-2016 microG 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.places;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.location.places.internal.IGooglePlacesService;
public class PlacesServiceImpl extends IGooglePlacesService.Stub {
private static final String TAG = "GmsPlcSvcImpl";
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (super.onTransact(code, data, reply, flags)) return true;
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
return false;
}
}