Java 类com.google.android.gms.common.internal.GetServiceRequest 实例源码

项目:android_packages_apps_GmsCore    文件:IndexService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    switch (service) {
        case INDEX:
            callback.onPostInitComplete(0, appDataSearch.asBinder(), null);
            break;
        case SEARCH_ADMINISTRATION:
            Log.w(TAG, "Service not yet implemented: " + service);
            callback.onPostInitComplete(CommonStatusCodes.ERROR, null, null);
            break;
        case SEARCH_QUERIES:
            callback.onPostInitComplete(0, searchQueries.asBinder(), null);
            break;
        case SEARCH_GLOBAL:
            callback.onPostInitComplete(0, globalSearchAdmin.asBinder(), null);
            break;
        case SEARCH_CORPORA:
            callback.onPostInitComplete(0, searchCorpora.asBinder(), null);
            break;
        case SEARCH_IME:
            Log.w(TAG, "Service not yet implemented: " + service);
            callback.onPostInitComplete(CommonStatusCodes.ERROR, null, null);
            break;
    }
}
项目:android_packages_apps_GmsCore    文件:BaseService.java   
public BaseService(String tag, GmsService supportedService, GmsService... supportedServices) {
    this.TAG = tag;
    EnumSet<GmsService> services = EnumSet.of(supportedService);
    services.addAll(Arrays.asList(supportedServices));
    broker = new AbstractGmsServiceBroker(services) {
        @Override
        public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
            try {
                request.extras.keySet(); // call to unparcel()
            } catch (Exception e) {
                // Sometimes we need to define the correct ClassLoader before unparcel(). Ignore those.
            }
            Log.d(TAG, "bound by: " + request);
            BaseService.this.handleServiceRequest(callback, request, service);
        }
    };
}
项目:android_external_GmsLib    文件:GmsClient.java   
protected void onConnectedToBroker(IGmsServiceBroker broker, GmsCallbacks callbacks) throws RemoteException {
    if (serviceId == -1) {
        throw new IllegalStateException("Service ID not set in constructor and onConnectedToBroker not implemented");
    }
    GetServiceRequest request = new GetServiceRequest(serviceId);
    request.extras = new Bundle();
    request.packageName = context.getPackageName();
    request.account = account;
    request.extras = extras;
    broker.getService(callbacks, request);
}
项目:android_packages_apps_GmsCore    文件:AbstractGmsServiceBroker.java   
private void callGetService(GmsService service, IGmsCallbacks callback, int gmsVersion, String packageName, Bundle extras, String accountName, String[] scopes) throws RemoteException {
    GetServiceRequest request = new GetServiceRequest(service.SERVICE_ID);
    request.gmsVersion = gmsVersion;
    request.packageName = packageName;
    request.extras = extras;
    request.account = accountName == null ? null : new Account(accountName, "com.google");
    request.scopes = scopes == null ? null : scopesFromStringArray(scopes);
    getService(callback, request);
}
项目:android_packages_apps_GmsCore    文件:AbstractGmsServiceBroker.java   
@Override
public void getService(IGmsCallbacks callback, GetServiceRequest request) throws RemoteException {
    GmsService gmsService = GmsService.byServiceId(request.serviceId);
    if ((supportedServices.contains(gmsService)) || supportedServices.contains(GmsService.ANY)) {
        handleServiceRequest(callback, request, gmsService);
    } else {
        Log.d(TAG, "Service not supported: " + request);
        throw new IllegalArgumentException("Service not supported: " + request.serviceId);
    }
}
项目:android_packages_apps_GmsCore    文件:GamesStubService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    String packageName = null;
    if (request.extras != null) {
        packageName = request.extras.getString(PARAM_GAME_PACKAGE_NAME);
    }
    if (packageName == null) packageName = GMS_PACKAGE_NAME;
    Intent intent = new Intent(ACTION_PLAY_GAMES_UPGRADE);
    intent.setPackage(GMS_PACKAGE_NAME);
    intent.putExtra(EXTRA_GAME_PACACKE_NAME, packageName);
    Bundle bundle = new Bundle();
    bundle.putParcelable("pendingIntent", PendingIntent.getActivity(this, packageName.hashCode(), intent, FLAG_UPDATE_CURRENT));
    callback.onPostInitComplete(CommonStatusCodes.RESOLUTION_REQUIRED, null, bundle);
}
项目:android_packages_apps_GmsCore    文件:RemindersService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, new RemindersServiceImpl(), null);
}
项目:android_packages_apps_GmsCore    文件:DummyService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(CommonStatusCodes.ERROR, null, null);
}
项目:android_packages_apps_GmsCore    文件:FeedbackService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
    // TODO
}
项目:android_packages_apps_GmsCore    文件:ClearcutLoggerService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, clearcutService.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:CarService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
    // TODO
}
项目:android_packages_apps_GmsCore    文件:WearableService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    PackageUtils.checkPackageUid(this, request.packageName, Binder.getCallingUid());
    callback.onPostInitComplete(0, new WearableServiceImpl(this, getWearable(getApplicationContext()), request.packageName), null);
}
项目:android_packages_apps_GmsCore    文件:SignInService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    Log.d(TAG, "unimplemented Method: handleServiceRequest");

}
项目:android_packages_apps_GmsCore    文件:SafetyNetClientService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, new SafetyNetClientServiceImpl(this, request.packageName), null);
}
项目:android_packages_apps_GmsCore    文件:GService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
    // TODO
}
项目:android_packages_apps_GmsCore    文件:GoogleLocationManagerService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, impl.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:ReportingAndroidService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, reportingService.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:PlayLogService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, playLogService.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:LightweightIndexService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, appDataSearch.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:GeoDataService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, new PlacesServiceImpl().asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:PlaceDetectionService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, new PlaceDetectionServiceImpl().asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:PaymentService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, new OwServiceImpl(this), null);
}
项目:android_packages_apps_GmsCore    文件:DroidGuardService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
    // TODO
    Log.d(TAG, "handleServiceRequest");
}
项目:android_packages_apps_GmsCore    文件:PeopleService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, impl.asBinder(), null);
}
项目:android_packages_apps_GmsCore    文件:DriveApiService.java   
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    callback.onPostInitComplete(0, impl.asBinder(), null);
}
项目:FMTech    文件:eiz.java   
public abstract void a(eiw parameiw, GetServiceRequest paramGetServiceRequest);
项目:android_packages_apps_GmsCore    文件:AbstractGmsServiceBroker.java   
public abstract void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException;
项目:android_packages_apps_GmsCore    文件:BaseService.java   
public abstract void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException;