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

Commit 8a92fd71 authored by Enxun Wei's avatar Enxun Wei
Browse files

Add a flag to disable HardwareActivityRecognitionProxy

This change disables the `HardwareActivityRecognitionProxy` and its usage within `LocationManagerService`. This proxy was responsible for binding GmsCore to the `ActivityRecognitionHardware`.

This feature has been deprecated for years.

Bug: 417261071
Bug: 441145460
Test: LocationProviderManagerTest
Flag: android.location.flags.disable_hardware_ar
Change-Id: If92a9bdb162bb515716638a4bcc2ad07587ee524
parent 6a1789fb
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -222,3 +222,10 @@ flag {
    description: "Support TOA in GnssSatelliteAlmanac"
    bug: "409934786"
}

flag {
    name: "disable_hardware_ar"
    namespace: "location"
    description: "Disables the legacy hardware AR code path which has been deprecated for a long time"
    bug: "441145460"
}
+7 −5
Original line number Diff line number Diff line
@@ -553,12 +553,14 @@ public class LocationManagerService extends ILocationManager.Stub implements
            setLocationFudgerCache(new LocationFudgerCache(mPopulationDensityProvider));
        }

        if (!Flags.disableHardwareAr()) {
            // bind to hardware activity recognition
            HardwareActivityRecognitionProxy hardwareActivityRecognitionProxy =
                    HardwareActivityRecognitionProxy.createAndRegister(mContext);
            if (hardwareActivityRecognitionProxy == null) {
                Log.e(TAG, "unable to bind ActivityRecognitionProxy");
            }
        }

        // bind to gnss geofence proxy
        if (mGnssManagerService != null) {