mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-30 20:47:48 +01:00
Update icing service, add DummyService for debugging, update sublib
This commit is contained in:
parent
b7d4398667
commit
124ec3ac1c
2
extern/GmsApi
vendored
2
extern/GmsApi
vendored
@ -1 +1 @@
|
||||
Subproject commit 562e23177598d94c47318394d0224d6118fcb05f
|
||||
Subproject commit 8928053170b6a819befa297f264e5ba7e2f9342b
|
@ -332,6 +332,53 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="org.microg.gms.DummyService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.games.service.START" />
|
||||
<action android:name="com.google.android.gms.plus.service.START" />
|
||||
<action android:name="com.google.android.gms.plus.service.internal.START" />
|
||||
<action android:name="com.google.android.gms.panorama.service.START" />
|
||||
<action android:name="com.google.android.gms.wallet.service.BIND" />
|
||||
<action android:name="com.google.android.gms.appstate.service.START" />
|
||||
<action android:name="com.google.android.gms.ads.service.START" />
|
||||
<action android:name="com.google.android.gms.accounts.ACCOUNT_SERVICE" />
|
||||
<action android:name="com.google.android.gms.cast.service.BIND_CAST_DEVICE_CONTROLLER_SERVICE" />
|
||||
<action android:name="com.google.android.gms.drive.ApiService.START" />
|
||||
<action android:name="com.google.android.gms.identity.service.BIND" />
|
||||
<action android:name="com.google.android.gms.car.service.START" />
|
||||
<action android:name="com.google.android.gms.wearable.BIND" />
|
||||
<action android:name="com.google.android.gms.auth.service.START" />
|
||||
<action android:name="com.google.android.gms.fitness.GoogleFitnessService.START" />
|
||||
<action android:name="com.google.android.gms.reminders.service.START" />
|
||||
<action android:name="com.google.android.gms.deviceconnection.service.START" />
|
||||
<action android:name="com.google.android.gms.droidguard.service.START" />
|
||||
<action android:name="com.google.android.gms.lockbox.service.START" />
|
||||
<action android:name="com.google.android.gms.cast_mirroring.service.START" />
|
||||
<action android:name="com.google.android.gms.feedback.internal.IFeedbackService" />
|
||||
<action android:name="com.google.android.gms.photos.autobackup.service.START" />
|
||||
<action android:name="com.google.android.gms.udc.service.START" />
|
||||
<action android:name="com.google.android.gms.mdm.services.DeviceManagerApiService.START" />
|
||||
<action android:name="com.google.android.gms.pseudonymous.service.START" />
|
||||
<action android:name="com.google.android.gms.common.service.START" />
|
||||
<action android:name="com.google.android.gms.clearcut.service.START" />
|
||||
<action android:name="com.google.android.gms.usagereporting.service.START" />
|
||||
<action android:name="com.google.android.gms.kids.service.START" />
|
||||
<action android:name="com.google.android.gms.common.download.START" />
|
||||
<action android:name="com.google.android.gms.signin.service.START" />
|
||||
<action android:name="com.google.android.gms.safetynet.service.START" />
|
||||
<action android:name="com.google.android.gms.ads.gservice.START" />
|
||||
<action android:name="com.google.android.contextmanager.service.ContextManagerService.START" />
|
||||
<action android:name="com.google.android.gms.audiomodem.service.AudioModemService.START" />
|
||||
<action android:name="com.google.android.gms.nearby.sharing.service.NearbySharingService.START" />
|
||||
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
|
||||
<action android:name="com.google.android.gms.phenotype.service.START" />
|
||||
|
||||
<action android:name="com.google.android.gms.auth.api.credentials.service.START" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2013-2015 µ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.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
import com.google.android.gms.common.internal.IGmsServiceBroker;
|
||||
|
||||
public class DummyService extends Service {
|
||||
|
||||
private static final String TAG = "GmsDummySvc";
|
||||
private IGmsServiceBroker broker = new AbstractGmsServiceBroker(-1) {
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request) throws RemoteException {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
Log.d(TAG, "onBind: " + intent);
|
||||
return broker.asBinder();
|
||||
}
|
||||
}
|
@ -96,6 +96,7 @@ public class GServicesProvider extends ContentProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cursor.getCount() == 0) return null;
|
||||
return cursor;
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,14 @@ import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.appdatasearch.CorpusStatus;
|
||||
import com.google.android.gms.appdatasearch.PIMEUpdateResponse;
|
||||
import com.google.android.gms.appdatasearch.RequestIndexingSpecification;
|
||||
import com.google.android.gms.appdatasearch.SuggestSpecification;
|
||||
import com.google.android.gms.appdatasearch.SuggestionResults;
|
||||
import com.google.android.gms.appdatasearch.internal.IAppDataSearch;
|
||||
|
||||
public class AppDataSearchImpl extends IAppDataSearch.Stub {
|
||||
private static final String TAG = "GmsIcingSearchImpl";
|
||||
private static final String TAG = "GmsIcingAppDataImpl";
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
@ -40,8 +42,23 @@ public class AppDataSearchImpl extends IAppDataSearch.Stub {
|
||||
return new SuggestionResults("Unknown error");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requestIndexing(String packageName, String accountName, long l, RequestIndexingSpecification specs) throws RemoteException {
|
||||
Log.d(TAG, "requestIndexing: " + accountName + " @ " + packageName + ", " + l);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CorpusStatus getStatus(String packageName, String accountName) throws RemoteException {
|
||||
return new CorpusStatus();
|
||||
Log.d(TAG, "getStatus: " + accountName + " @ " + packageName);
|
||||
CorpusStatus status = new CorpusStatus();
|
||||
status.found = true;
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PIMEUpdateResponse requestPIMEUpdate(String s1, String s2, int i, byte[] bs) throws RemoteException {
|
||||
Log.d(TAG, "requestPIMEUpdate: " + s1 + ", " + s2 + ", " + i + ", " + (bs == null ? "null" : new String(bs)));
|
||||
return new PIMEUpdateResponse();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2013-2015 µ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.icing;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.search.corpora.internal.ISearchCorporaService;
|
||||
|
||||
public class CorporaSearchImpl extends ISearchCorporaService.Stub {
|
||||
private static final String TAG = "GmsIcingCorporaImpl";
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import android.util.Log;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
import com.google.android.gms.common.internal.IGmsServiceBroker;
|
||||
|
||||
import org.microg.gms.AbstractGmsServiceBroker;
|
||||
import org.microg.gms.common.Services;
|
||||
@ -32,14 +33,30 @@ public class IndexService extends Service {
|
||||
private static final String TAG = "GmsIcingIndexSvc";
|
||||
|
||||
private AppDataSearchImpl appDataSearch = new AppDataSearchImpl();
|
||||
private AbstractGmsServiceBroker broker = new AbstractGmsServiceBroker(
|
||||
private CorporaSearchImpl corporaSearch = new CorporaSearchImpl();
|
||||
private IGmsServiceBroker broker = new AbstractGmsServiceBroker(
|
||||
Services.INDEX.SERVICE_ID, Services.SEARCH_ADMINISTRATION.SERVICE_ID,
|
||||
Services.SEARCH_CORPORA.SERVICE_ID, Services.SEARCH_GLOBAL.SERVICE_ID,
|
||||
Services.SEARCH_IME.SERVICE_ID, Services.SEARCH_QUERIES.SERVICE_ID) {
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request) throws RemoteException {
|
||||
Log.d(TAG, "bound by: " + request);
|
||||
callback.onPostInitComplete(0, appDataSearch.asBinder(), null);
|
||||
switch (request.serviceId) {
|
||||
case Services.INDEX.SERVICE_ID:
|
||||
callback.onPostInitComplete(0, appDataSearch.asBinder(), null);
|
||||
break;
|
||||
case Services.SEARCH_ADMINISTRATION.SERVICE_ID:
|
||||
break;
|
||||
case Services.SEARCH_CORPORA.SERVICE_ID:
|
||||
callback.onPostInitComplete(0, corporaSearch.asBinder(), null);
|
||||
break;
|
||||
case Services.SEARCH_GLOBAL.SERVICE_ID:
|
||||
break;
|
||||
case Services.SEARCH_IME.SERVICE_ID:
|
||||
break;
|
||||
case Services.SEARCH_QUERIES.SERVICE_ID:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user