Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit f4c9ecf1 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Location: Announce more features. Fixes warnings about missing play services in some apps

parent 68dfaf4a
Loading
Loading
Loading
Loading
+9 −4
Original line number Original line Diff line number Diff line
@@ -42,10 +42,7 @@ public class GoogleLocationManagerService extends BaseService {
        impl.invokeOnceReady(() -> {
        impl.invokeOnceReady(() -> {
            try {
            try {
                ConnectionInfo info = new ConnectionInfo();
                ConnectionInfo info = new ConnectionInfo();
                info.features = new Feature[] {
                info.features = FEATURES;
                        new Feature("get_current_location", 1),
                        new Feature("name_sleep_segment_request", 1)
                };
                callback.onPostInitCompleteWithConnectionInfo(0, impl.asBinder(), info);
                callback.onPostInitCompleteWithConnectionInfo(0, impl.asBinder(), info);
            } catch (RemoteException e) {
            } catch (RemoteException e) {
                Log.w(TAG, e);
                Log.w(TAG, e);
@@ -57,4 +54,12 @@ public class GoogleLocationManagerService extends BaseService {
    protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
    protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
        impl.getLocationManager().dump(writer);
        impl.getLocationManager().dump(writer);
    }
    }

    public static final Feature[] FEATURES = new Feature[] {
            new Feature("get_current_location", 1),
            new Feature("support_context_feature_id", 1),
            new Feature("name_ulr_private", 1),
            new Feature("driving_mode", 6),
            new Feature("name_sleep_segment_request", 1)
    };
}
}
+4 −1
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package org.microg.gms.location;


import android.os.RemoteException;
import android.os.RemoteException;


import com.google.android.gms.common.internal.ConnectionInfo;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;
import com.google.android.gms.common.internal.IGmsCallbacks;


@@ -33,6 +34,8 @@ public class ReportingAndroidService extends BaseService {


    @Override
    @Override
    public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
    public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
        callback.onPostInitComplete(0, reportingService.asBinder(), null);
        ConnectionInfo info = new ConnectionInfo();
        info.features = GoogleLocationManagerService.FEATURES;
        callback.onPostInitCompleteWithConnectionInfo(0, reportingService.asBinder(), info);
    }
    }
}
}