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

Commit 48f1a647 authored by gomo's avatar gomo
Browse files

Duty Cycling and Low Power Mode GNSS feature implementations

Implementaion of 2 GNSS Android-P features:
- The Duty Cycling API to enable high accuracy applications development
- The Low Power Mode GNSS API to save power when indoor

Bug: 64009176
Test: Existing unit tests still pass.
Change-Id: I3ba3b86a635a54927c694fdd66a038757e843937
parent d8171027
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -20981,6 +20981,7 @@ package android.location {
    method public void onGnssMeasurementsReceived(android.location.GnssMeasurementsEvent);
    method public void onGnssMeasurementsReceived(android.location.GnssMeasurementsEvent);
    method public void onStatusChanged(int);
    method public void onStatusChanged(int);
    field public static final int STATUS_LOCATION_DISABLED = 2; // 0x2
    field public static final int STATUS_LOCATION_DISABLED = 2; // 0x2
    field public static final int STATUS_NOT_ALLOWED = 3; // 0x3
    field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
    field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
    field public static final int STATUS_READY = 1; // 0x1
    field public static final int STATUS_READY = 1; // 0x1
  }
  }
+2 −0
Original line number Original line Diff line number Diff line
@@ -2104,11 +2104,13 @@ package android.location {
    method public int getQuality();
    method public int getQuality();
    method public float getSmallestDisplacement();
    method public float getSmallestDisplacement();
    method public android.os.WorkSource getWorkSource();
    method public android.os.WorkSource getWorkSource();
    method public boolean isLowPowerMode();
    method public android.location.LocationRequest setExpireAt(long);
    method public android.location.LocationRequest setExpireAt(long);
    method public android.location.LocationRequest setExpireIn(long);
    method public android.location.LocationRequest setExpireIn(long);
    method public android.location.LocationRequest setFastestInterval(long);
    method public android.location.LocationRequest setFastestInterval(long);
    method public void setHideFromAppOps(boolean);
    method public void setHideFromAppOps(boolean);
    method public android.location.LocationRequest setInterval(long);
    method public android.location.LocationRequest setInterval(long);
    method public android.location.LocationRequest setLowPowerMode(boolean);
    method public android.location.LocationRequest setNumUpdates(int);
    method public android.location.LocationRequest setNumUpdates(int);
    method public android.location.LocationRequest setProvider(java.lang.String);
    method public android.location.LocationRequest setProvider(java.lang.String);
    method public android.location.LocationRequest setQuality(int);
    method public android.location.LocationRequest setQuality(int);
+9 −0
Original line number Original line Diff line number Diff line
@@ -11143,6 +11143,15 @@ public final class Settings {
         */
         */
        public static final String NOTIFICATION_SNOOZE_OPTIONS =
        public static final String NOTIFICATION_SNOOZE_OPTIONS =
                "notification_snooze_options";
                "notification_snooze_options";

        /**
         * Enable GNSS Raw Measurements Full Tracking?
         * 0 = no
         * 1 = yes
         * @hide
         */
        public static final String ENABLE_GNSS_RAW_MEAS_FULL_TRACKING =
                "enable_gnss_raw_meas_full_tracking";
    }
    }


    /**
    /**
+2 −1
Original line number Original line Diff line number Diff line
@@ -387,8 +387,9 @@ message GlobalSettingsProto {
    optional SettingProto enable_cache_quota_calculation = 339;
    optional SettingProto enable_cache_quota_calculation = 339;
    optional SettingProto enable_deletion_helper_no_threshold_toggle = 340;
    optional SettingProto enable_deletion_helper_no_threshold_toggle = 340;
    optional SettingProto notification_snooze_options = 341;
    optional SettingProto notification_snooze_options = 341;
    optional SettingProto enable_gnss_raw_meas_full_tracking = 346;


    // Next tag = 346;
    // Next tag = 347;
}
}


message SecureSettingsProto {
message SecureSettingsProto {
+1 −0
Original line number Original line Diff line number Diff line
@@ -367,6 +367,7 @@ public class SettingsBackupTest {
                    Settings.Global.ENABLE_GPU_DEBUG_LAYERS,
                    Settings.Global.ENABLE_GPU_DEBUG_LAYERS,
                    Settings.Global.GPU_DEBUG_APP,
                    Settings.Global.GPU_DEBUG_APP,
                    Settings.Global.GPU_DEBUG_LAYERS,
                    Settings.Global.GPU_DEBUG_LAYERS,
                    Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
                    Settings.Global.NETWORK_ACCESS_TIMEOUT_MS,
                    Settings.Global.NETWORK_ACCESS_TIMEOUT_MS,
                    Settings.Global.WARNING_TEMPERATURE,
                    Settings.Global.WARNING_TEMPERATURE,
                    Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
                    Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
Loading