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

Commit a85963ab authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Unhide public methods for API Council review. Test: Existing unit tests...

Merge "Unhide public methods for API Council review. Test: Existing unit tests still pass. Change-Id: I49b81f99e4e8d8300fbc6b3d74f336d4f291d171"
parents 7a1f1d8a 127ba323
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -19748,6 +19748,7 @@ package android.location {
    method public double getAccumulatedDeltaRangeMeters();
    method public int getAccumulatedDeltaRangeState();
    method public double getAccumulatedDeltaRangeUncertaintyMeters();
    method public double getAutomaticGainControlLevelInDb();
    method public long getCarrierCycles();
    method public float getCarrierFrequencyHz();
    method public double getCarrierPhase();
@@ -19763,6 +19764,7 @@ package android.location {
    method public int getState();
    method public int getSvid();
    method public double getTimeOffsetNanos();
    method public boolean hasAutomaticGainControlLevelInDb();
    method public boolean hasCarrierCycles();
    method public boolean hasCarrierFrequencyHz();
    method public boolean hasCarrierPhase();
@@ -19786,11 +19788,13 @@ package android.location {
    field public static final int STATE_GAL_E1C_2ND_CODE_LOCK = 2048; // 0x800
    field public static final int STATE_GLO_STRING_SYNC = 64; // 0x40
    field public static final int STATE_GLO_TOD_DECODED = 128; // 0x80
    field public static final int STATE_GLO_TOD_KNOWN = 32768; // 0x8000
    field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
    field public static final int STATE_SBAS_SYNC = 8192; // 0x2000
    field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
    field public static final int STATE_SYMBOL_SYNC = 32; // 0x20
    field public static final int STATE_TOW_DECODED = 8; // 0x8
    field public static final int STATE_TOW_KNOWN = 16384; // 0x4000
    field public static final int STATE_UNKNOWN = 0; // 0x0
  }
@@ -19847,12 +19851,14 @@ package android.location {
  public final class GnssStatus {
    method public float getAzimuthDegrees(int);
    method public float getCarrierFrequencyHz(int);
    method public float getCn0DbHz(int);
    method public int getConstellationType(int);
    method public float getElevationDegrees(int);
    method public int getSatelliteCount();
    method public int getSvid(int);
    method public boolean hasAlmanacData(int);
    method public boolean hasCarrierFrequency(int);
    method public boolean hasEphemerisData(int);
    method public boolean usedInFix(int);
    field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
@@ -19913,34 +19919,46 @@ package android.location {
    method public float getAccuracy();
    method public double getAltitude();
    method public float getBearing();
    method public float getBearingAccuracyDegrees();
    method public long getElapsedRealtimeNanos();
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public float getSpeedAccuracyMetersPerSecond();
    method public long getTime();
    method public float getVerticalAccuracyMeters();
    method public boolean hasAccuracy();
    method public boolean hasAltitude();
    method public boolean hasBearing();
    method public boolean hasBearingAccuracy();
    method public boolean hasSpeed();
    method public boolean hasSpeedAccuracy();
    method public boolean hasVerticalAccuracy();
    method public boolean isFromMockProvider();
    method public void removeAccuracy();
    method public void removeAltitude();
    method public void removeBearing();
    method public void removeBearingAccuracy();
    method public void removeSpeed();
    method public void removeSpeedAccuracy();
    method public void removeVerticalAccuracy();
    method public void reset();
    method public void set(android.location.Location);
    method public void setAccuracy(float);
    method public void setAltitude(double);
    method public void setBearing(float);
    method public void setBearingAccuracyDegrees(float);
    method public void setElapsedRealtimeNanos(long);
    method public void setExtras(android.os.Bundle);
    method public void setLatitude(double);
    method public void setLongitude(double);
    method public void setProvider(java.lang.String);
    method public void setSpeed(float);
    method public void setSpeedAccuracyMetersPerSecond(float);
    method public void setTime(long);
    method public void setVerticalAccuracyMeters(float);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.Location> CREATOR;
    field public static final int FORMAT_DEGREES = 0; // 0x0
+18 −0
Original line number Diff line number Diff line
@@ -20985,6 +20985,7 @@ package android.location {
    method public double getAccumulatedDeltaRangeMeters();
    method public int getAccumulatedDeltaRangeState();
    method public double getAccumulatedDeltaRangeUncertaintyMeters();
    method public double getAutomaticGainControlLevelInDb();
    method public long getCarrierCycles();
    method public float getCarrierFrequencyHz();
    method public double getCarrierPhase();
@@ -21000,6 +21001,7 @@ package android.location {
    method public int getState();
    method public int getSvid();
    method public double getTimeOffsetNanos();
    method public boolean hasAutomaticGainControlLevelInDb();
    method public boolean hasCarrierCycles();
    method public boolean hasCarrierFrequencyHz();
    method public boolean hasCarrierPhase();
@@ -21023,11 +21025,13 @@ package android.location {
    field public static final int STATE_GAL_E1C_2ND_CODE_LOCK = 2048; // 0x800
    field public static final int STATE_GLO_STRING_SYNC = 64; // 0x40
    field public static final int STATE_GLO_TOD_DECODED = 128; // 0x80
    field public static final int STATE_GLO_TOD_KNOWN = 32768; // 0x8000
    field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
    field public static final int STATE_SBAS_SYNC = 8192; // 0x2000
    field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
    field public static final int STATE_SYMBOL_SYNC = 32; // 0x20
    field public static final int STATE_TOW_DECODED = 8; // 0x8
    field public static final int STATE_TOW_KNOWN = 16384; // 0x4000
    field public static final int STATE_UNKNOWN = 0; // 0x0
  }
@@ -21084,12 +21088,14 @@ package android.location {
  public final class GnssStatus {
    method public float getAzimuthDegrees(int);
    method public float getCarrierFrequencyHz(int);
    method public float getCn0DbHz(int);
    method public int getConstellationType(int);
    method public float getElevationDegrees(int);
    method public int getSatelliteCount();
    method public int getSvid(int);
    method public boolean hasAlmanacData(int);
    method public boolean hasCarrierFrequency(int);
    method public boolean hasEphemerisData(int);
    method public boolean usedInFix(int);
    field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
@@ -21375,29 +21381,39 @@ package android.location {
    method public float getAccuracy();
    method public double getAltitude();
    method public float getBearing();
    method public float getBearingAccuracyDegrees();
    method public long getElapsedRealtimeNanos();
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public float getSpeedAccuracyMetersPerSecond();
    method public long getTime();
    method public float getVerticalAccuracyMeters();
    method public boolean hasAccuracy();
    method public boolean hasAltitude();
    method public boolean hasBearing();
    method public boolean hasBearingAccuracy();
    method public boolean hasSpeed();
    method public boolean hasSpeedAccuracy();
    method public boolean hasVerticalAccuracy();
    method public boolean isComplete();
    method public boolean isFromMockProvider();
    method public void makeComplete();
    method public void removeAccuracy();
    method public void removeAltitude();
    method public void removeBearing();
    method public void removeBearingAccuracy();
    method public void removeSpeed();
    method public void removeSpeedAccuracy();
    method public void removeVerticalAccuracy();
    method public void reset();
    method public void set(android.location.Location);
    method public void setAccuracy(float);
    method public void setAltitude(double);
    method public void setBearing(float);
    method public void setBearingAccuracyDegrees(float);
    method public void setElapsedRealtimeNanos(long);
    method public void setExtras(android.os.Bundle);
    method public void setIsFromMockProvider(boolean);
@@ -21405,7 +21421,9 @@ package android.location {
    method public void setLongitude(double);
    method public void setProvider(java.lang.String);
    method public void setSpeed(float);
    method public void setSpeedAccuracyMetersPerSecond(float);
    method public void setTime(long);
    method public void setVerticalAccuracyMeters(float);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.Location> CREATOR;
    field public static final int FORMAT_DEGREES = 0; // 0x0
+20 −0
Original line number Diff line number Diff line
@@ -19800,6 +19800,7 @@ package android.location {
    method public double getAccumulatedDeltaRangeMeters();
    method public int getAccumulatedDeltaRangeState();
    method public double getAccumulatedDeltaRangeUncertaintyMeters();
    method public double getAutomaticGainControlLevelInDb();
    method public long getCarrierCycles();
    method public float getCarrierFrequencyHz();
    method public double getCarrierPhase();
@@ -19815,12 +19816,14 @@ package android.location {
    method public int getState();
    method public int getSvid();
    method public double getTimeOffsetNanos();
    method public boolean hasAutomaticGainControlLevelInDb();
    method public boolean hasCarrierCycles();
    method public boolean hasCarrierFrequencyHz();
    method public boolean hasCarrierPhase();
    method public boolean hasCarrierPhaseUncertainty();
    method public boolean hasSnrInDb();
    method public void reset();
    method public void resetAutomaticGainControlLevel();
    method public void resetCarrierCycles();
    method public void resetCarrierFrequencyHz();
    method public void resetCarrierPhase();
@@ -19830,6 +19833,7 @@ package android.location {
    method public void setAccumulatedDeltaRangeMeters(double);
    method public void setAccumulatedDeltaRangeState(int);
    method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
    method public void setAutomaticGainControlLevelInDb(double);
    method public void setCarrierCycles(long);
    method public void setCarrierFrequencyHz(float);
    method public void setCarrierPhase(double);
@@ -19863,11 +19867,13 @@ package android.location {
    field public static final int STATE_GAL_E1C_2ND_CODE_LOCK = 2048; // 0x800
    field public static final int STATE_GLO_STRING_SYNC = 64; // 0x40
    field public static final int STATE_GLO_TOD_DECODED = 128; // 0x80
    field public static final int STATE_GLO_TOD_KNOWN = 32768; // 0x8000
    field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
    field public static final int STATE_SBAS_SYNC = 8192; // 0x2000
    field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
    field public static final int STATE_SYMBOL_SYNC = 32; // 0x20
    field public static final int STATE_TOW_DECODED = 8; // 0x8
    field public static final int STATE_TOW_KNOWN = 16384; // 0x4000
    field public static final int STATE_UNKNOWN = 0; // 0x0
  }
@@ -19934,12 +19940,14 @@ package android.location {
  public final class GnssStatus {
    method public float getAzimuthDegrees(int);
    method public float getCarrierFrequencyHz(int);
    method public float getCn0DbHz(int);
    method public int getConstellationType(int);
    method public float getElevationDegrees(int);
    method public int getSatelliteCount();
    method public int getSvid(int);
    method public boolean hasAlmanacData(int);
    method public boolean hasCarrierFrequency(int);
    method public boolean hasEphemerisData(int);
    method public boolean usedInFix(int);
    field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
@@ -20000,34 +20008,46 @@ package android.location {
    method public float getAccuracy();
    method public double getAltitude();
    method public float getBearing();
    method public float getBearingAccuracyDegrees();
    method public long getElapsedRealtimeNanos();
    method public android.os.Bundle getExtras();
    method public double getLatitude();
    method public double getLongitude();
    method public java.lang.String getProvider();
    method public float getSpeed();
    method public float getSpeedAccuracyMetersPerSecond();
    method public long getTime();
    method public float getVerticalAccuracyMeters();
    method public boolean hasAccuracy();
    method public boolean hasAltitude();
    method public boolean hasBearing();
    method public boolean hasBearingAccuracy();
    method public boolean hasSpeed();
    method public boolean hasSpeedAccuracy();
    method public boolean hasVerticalAccuracy();
    method public boolean isFromMockProvider();
    method public void removeAccuracy();
    method public void removeAltitude();
    method public void removeBearing();
    method public void removeBearingAccuracy();
    method public void removeSpeed();
    method public void removeSpeedAccuracy();
    method public void removeVerticalAccuracy();
    method public void reset();
    method public void set(android.location.Location);
    method public void setAccuracy(float);
    method public void setAltitude(double);
    method public void setBearing(float);
    method public void setBearingAccuracyDegrees(float);
    method public void setElapsedRealtimeNanos(long);
    method public void setExtras(android.os.Bundle);
    method public void setLatitude(double);
    method public void setLongitude(double);
    method public void setProvider(java.lang.String);
    method public void setSpeed(float);
    method public void setSpeedAccuracyMetersPerSecond(float);
    method public void setTime(long);
    method public void setVerticalAccuracyMeters(float);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.Location> CREATOR;
    field public static final int FORMAT_DEGREES = 0; // 0x0
+18 −19
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public final class GnssMeasurement implements Parcelable {
    private double mCarrierPhaseUncertainty;
    private int mMultipathIndicator;
    private double mSnrInDb;
    private double mAgcLevelDb;
    private double mAutomaticGainControlLevelInDb;

    // The following enumerations must be in sync with the values declared in gps.h

@@ -117,14 +117,12 @@ public final class GnssMeasurement implements Parcelable {
     * This GNSS measurement's tracking state has time-of-week known, possibly not decoded
     * over the air but has been determined from other sources. If TOW decoded is set then TOW Known
     * will also be set.
     * @hide
     */
    public static final int STATE_TOW_KNOWN = (1<<14);
    /**
     * This Glonass measurement's tracking state has time-of-day known, possibly not decoded
     * over the air but has been determined from other sources. If TOD decoded is set then TOD Known
     * will also be set.
     * @hide
     */
    public static final int STATE_GLO_TOD_KNOWN = (1<<15);

@@ -196,7 +194,7 @@ public final class GnssMeasurement implements Parcelable {
        mCarrierPhaseUncertainty = measurement.mCarrierPhaseUncertainty;
        mMultipathIndicator = measurement.mMultipathIndicator;
        mSnrInDb = measurement.mSnrInDb;
        mAgcLevelDb = measurement.mAgcLevelDb;
        mAutomaticGainControlLevelInDb = measurement.mAutomaticGainControlLevelInDb;
    }

    /**
@@ -884,10 +882,10 @@ public final class GnssMeasurement implements Parcelable {
    }

    /**
     * Returns {@code true} if {@link #getAgcLevelDb()} is available, {@code false} otherwise.
     * @hide
     * Returns {@code true} if {@link #getAutomaticGainControlLevelInDb()} is available, 
     * {@code false} otherwise.
     */
    public boolean hasAgcLevelDb() {
    public boolean hasAutomaticGainControlLevelInDb() {
        return isFlagSet(HAS_AUTOMATIC_GAIN_CONTROL);
    }

@@ -903,29 +901,30 @@ public final class GnssMeasurement implements Parcelable {
     * components) may also affect the typical output of of this value on any given hardware design
     * in an open sky test - the important aspect of this output is that changes in this value are
     * indicative of changes on input signal power in the frequency band for this measurement.
     * <p>The value is only available if {@link #hasAgcLevelDb()} is {@code true}.
     * @hide
     * <p>The value is only available if {@link #hasAutomaticGainControlLevelInDb()} is {@code true}
     */
    public double getAgcLevelDb() {
        return mAgcLevelDb;
    public double getAutomaticGainControlLevelInDb() {
        return mAutomaticGainControlLevelInDb;
    }

    /**
     * Sets the Automatic Gain Control level in dB.
     * @hide
     */
    public void setAgcLevelDb(double agcLevelDb) {
    @TestApi
    public void setAutomaticGainControlLevelInDb(double agcLevelDb) {
        setFlag(HAS_AUTOMATIC_GAIN_CONTROL);
        mAgcLevelDb = agcLevelDb;
        mAutomaticGainControlLevelInDb = agcLevelDb;
    }

    /**
     * Resets the Automatic Gain Control level.
     * @hide
     */
    public void resetAgcLevel() {
    @TestApi
    public void resetAutomaticGainControlLevel() {
        resetFlag(HAS_AUTOMATIC_GAIN_CONTROL);
        mAgcLevelDb = Double.NaN;
        mAutomaticGainControlLevelInDb = Double.NaN;
    }

    public static final Creator<GnssMeasurement> CREATOR = new Creator<GnssMeasurement>() {
@@ -952,7 +951,7 @@ public final class GnssMeasurement implements Parcelable {
            gnssMeasurement.mCarrierPhaseUncertainty = parcel.readDouble();
            gnssMeasurement.mMultipathIndicator = parcel.readInt();
            gnssMeasurement.mSnrInDb = parcel.readDouble();
            gnssMeasurement.mAgcLevelDb = parcel.readDouble();
            gnssMeasurement.mAutomaticGainControlLevelInDb = parcel.readDouble();

            return gnssMeasurement;
        }
@@ -984,7 +983,7 @@ public final class GnssMeasurement implements Parcelable {
        parcel.writeDouble(mCarrierPhaseUncertainty);
        parcel.writeInt(mMultipathIndicator);
        parcel.writeDouble(mSnrInDb);
        parcel.writeDouble(mAgcLevelDb);
        parcel.writeDouble(mAutomaticGainControlLevelInDb);
    }

    @Override
@@ -1058,7 +1057,7 @@ public final class GnssMeasurement implements Parcelable {
        builder.append(String.format(
            format,
            "AgcLevelDb",
            hasAgcLevelDb() ? mAgcLevelDb : null));
            hasAutomaticGainControlLevelInDb() ? mAutomaticGainControlLevelInDb : null));

        return builder.toString();
    }
@@ -1082,7 +1081,7 @@ public final class GnssMeasurement implements Parcelable {
        resetCarrierPhaseUncertainty();
        setMultipathIndicator(MULTIPATH_INDICATOR_UNKNOWN);
        resetSnrInDb();
        resetAgcLevel();
        resetAutomaticGainControlLevel();
    }

    private void setFlag(int flag) {
+0 −2
Original line number Diff line number Diff line
@@ -223,7 +223,6 @@ public final class GnssStatus {
     * frequency is available for the satellite at the specified index).
     *
     * @param satIndex the index of the satellite in the list.
     * @hide
     */
    public boolean hasCarrierFrequency(int satIndex) {
        return (mSvidWithFlags[satIndex] & GNSS_SV_FLAGS_HAS_CARRIER_FREQUENCY) != 0;
@@ -236,7 +235,6 @@ public final class GnssStatus {
     * the field is not set, it is the primary common use frequency, e.g. L1 for GPS.
     *
     * <p>The value is only available if {@link #hasCarrierFrequency(int satIndex)} is {@code true}.
     * @hide
     */
    public float getCarrierFrequencyHz(int satIndex) {
        return mCarrierFrequencies[satIndex];
Loading