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

Commit 79c47e27 authored by Soonil Nagarkar's avatar Soonil Nagarkar
Browse files

Expose NO_GPS_LOCATION APIs to system and test

These APIs are required for use by CTS tests and location providers.

Bug: 142481153
Test: manual
Change-Id: I09815477c2ac822a310b360145c8297170d24150
parent 1e652863
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3418,7 +3418,9 @@ package android.location {
  public class Location implements android.os.Parcelable {
    method public boolean isComplete();
    method public void makeComplete();
    method public void setExtraLocation(@Nullable String, @Nullable android.location.Location);
    method public void setIsFromMockProvider(boolean);
    field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation";
  }
  public class LocationManager {
+2 −0
Original line number Diff line number Diff line
@@ -1088,6 +1088,8 @@ package android.location {

  public class Location implements android.os.Parcelable {
    method public void makeComplete();
    method public void setExtraLocation(@Nullable String, @Nullable android.location.Location);
    field public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation";
  }

  public class LocationManager {
+6 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.location;

import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
@@ -79,6 +80,8 @@ public class Location implements Parcelable {
     *
     * @hide
     */
    @TestApi
    @SystemApi
    public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation";

    /**
@@ -1214,8 +1217,9 @@ public class Location implements Parcelable {
     * @param value the Location to attach
     * @hide
     */
    @UnsupportedAppUsage
    public void setExtraLocation(String key, Location value) {
    @TestApi
    @SystemApi
    public void setExtraLocation(@Nullable String key, @Nullable Location value) {
        if (mExtras == null) {
            mExtras = new Bundle();
        }