Addressed the review comments from API Council
Following are the review comments from API Council: (Places below that reference "s/foo/bar/" below are suggesting that "foo" be replaced with "bar".) GnssClock -- Class docs should not refer to "GPS" at the top level -- s/InNs/Nanos/ -- s/Sec/Second/ GnssMeasurement -- s/In// for "InUnitname" -- s/Sec/Second/ -- s/Ms/Millis/ -- s/Deg/Degrees/ -- STATUS_GPS_LOCATION_DISABLED -> STATUS_GNSS_LOCATION_DISABLED GnssMeasurementsEvent.Callback -- "returns" -> "reports" in the method docs as the methods return void LocationManager -- register/unregisterGnssMeasurementEventCallback -> register/unregisterGnssMeasurementsEventCallback (plural) GnssNavigationMessage -- MESSAGE_TYPE_ constants -> change to just TYPE_; the "MESSAGE" is redundant with the class name -- is a signed byte/short ok based on the standard here? If not consider using int in the public api GnssStatus -- Make sure @IntDef exists for the constellation type -- Please append unit types for values returned to match GnssMeasurement methods GnssStatusCallback -- Please document time base/units for the time parameter of onFirstFix Bug: 27385557 Change-Id: Ifed6a2eca3fd7ba89b3ded6964a70376235af8f4
This commit is contained in:
280
api/current.txt
280
api/current.txt
@@ -19165,168 +19165,110 @@ package android.location {
|
||||
|
||||
public final class GnssClock implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getBiasInNs();
|
||||
method public double getBiasUncertaintyInNs();
|
||||
method public double getDriftInNsPerSec();
|
||||
method public double getDriftUncertaintyInNsPerSec();
|
||||
method public long getFullBiasInNs();
|
||||
method public double getBiasNanos();
|
||||
method public double getBiasUncertaintyNanos();
|
||||
method public double getDriftNanosPerSecond();
|
||||
method public double getDriftUncertaintyNanosPerSecond();
|
||||
method public long getFullBiasNanos();
|
||||
method public int getHardwareClockDiscontinuityCount();
|
||||
method public short getLeapSecond();
|
||||
method public long getTimeInNs();
|
||||
method public double getTimeUncertaintyInNs();
|
||||
method public boolean hasBiasInNs();
|
||||
method public boolean hasBiasUncertaintyInNs();
|
||||
method public boolean hasDriftInNsPerSec();
|
||||
method public boolean hasDriftUncertaintyInNsPerSec();
|
||||
method public boolean hasFullBiasInNs();
|
||||
method public int getLeapSecond();
|
||||
method public long getTimeNanos();
|
||||
method public double getTimeUncertaintyNanos();
|
||||
method public boolean hasBiasNanos();
|
||||
method public boolean hasBiasUncertaintyNanos();
|
||||
method public boolean hasDriftNanosPerSecond();
|
||||
method public boolean hasDriftUncertaintyNanosPerSecond();
|
||||
method public boolean hasFullBiasNanos();
|
||||
method public boolean hasLeapSecond();
|
||||
method public boolean hasTimeUncertaintyInNs();
|
||||
method public boolean hasTimeUncertaintyNanos();
|
||||
method public void reset();
|
||||
method public void resetBiasInNs();
|
||||
method public void resetBiasUncertaintyInNs();
|
||||
method public void resetDriftInNsPerSec();
|
||||
method public void resetDriftUncertaintyInNsPerSec();
|
||||
method public void resetFullBiasInNs();
|
||||
method public void resetBiasNanos();
|
||||
method public void resetBiasUncertaintyNanos();
|
||||
method public void resetDriftNanosPerSecond();
|
||||
method public void resetDriftUncertaintyNanosPerSecond();
|
||||
method public void resetFullBiasNanos();
|
||||
method public void resetLeapSecond();
|
||||
method public void resetTimeUncertaintyInNs();
|
||||
method public void resetTimeUncertaintyNanos();
|
||||
method public void set(android.location.GnssClock);
|
||||
method public void setBiasInNs(double);
|
||||
method public void setBiasUncertaintyInNs(double);
|
||||
method public void setDriftInNsPerSec(double);
|
||||
method public void setDriftUncertaintyInNsPerSec(double);
|
||||
method public void setFullBiasInNs(long);
|
||||
method public void setBiasNanos(double);
|
||||
method public void setBiasUncertaintyNanos(double);
|
||||
method public void setDriftNanosPerSecond(double);
|
||||
method public void setDriftUncertaintyNanosPerSecond(double);
|
||||
method public void setFullBiasNanos(long);
|
||||
method public void setHardwareClockDiscontinuityCount(int);
|
||||
method public void setLeapSecond(short);
|
||||
method public void setTimeInNs(long);
|
||||
method public void setTimeUncertaintyInNs(double);
|
||||
method public void setLeapSecond(int);
|
||||
method public void setTimeNanos(long);
|
||||
method public void setTimeUncertaintyNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
|
||||
}
|
||||
|
||||
public final class GnssMeasurement implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getAccumulatedDeltaRangeInMeters();
|
||||
method public short getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyInMeters();
|
||||
method public double getAzimuthInDeg();
|
||||
method public double getAzimuthUncertaintyInDeg();
|
||||
method public int getBitNumber();
|
||||
method public double getAccumulatedDeltaRangeMeters();
|
||||
method public int getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyMeters();
|
||||
method public long getCarrierCycles();
|
||||
method public float getCarrierFrequencyInHz();
|
||||
method public float getCarrierFrequencyHz();
|
||||
method public double getCarrierPhase();
|
||||
method public double getCarrierPhaseUncertainty();
|
||||
method public double getCn0InDbHz();
|
||||
method public double getCodePhaseInChips();
|
||||
method public double getCodePhaseUncertaintyInChips();
|
||||
method public byte getConstellationType();
|
||||
method public double getDopplerShiftInHz();
|
||||
method public double getDopplerShiftUncertaintyInHz();
|
||||
method public double getElevationInDeg();
|
||||
method public double getElevationUncertaintyInDeg();
|
||||
method public byte getLossOfLock();
|
||||
method public byte getMultipathIndicator();
|
||||
method public double getPseudorangeInMeters();
|
||||
method public double getPseudorangeRateInMetersPerSec();
|
||||
method public double getPseudorangeRateUncertaintyInMetersPerSec();
|
||||
method public double getPseudorangeUncertaintyInMeters();
|
||||
method public long getReceivedSvTimeInNs();
|
||||
method public long getReceivedSvTimeUncertaintyInNs();
|
||||
method public double getCn0DbHz();
|
||||
method public int getConstellationType();
|
||||
method public int getMultipathIndicator();
|
||||
method public double getPseudorangeRateMetersPerSecond();
|
||||
method public double getPseudorangeRateUncertaintyMetersPerSecond();
|
||||
method public long getReceivedSvTimeNanos();
|
||||
method public long getReceivedSvTimeUncertaintyNanos();
|
||||
method public double getSnrInDb();
|
||||
method public short getState();
|
||||
method public short getSvid();
|
||||
method public short getTimeFromLastBitInMs();
|
||||
method public double getTimeOffsetInNs();
|
||||
method public boolean hasAzimuthInDeg();
|
||||
method public boolean hasAzimuthUncertaintyInDeg();
|
||||
method public boolean hasBitNumber();
|
||||
method public int getState();
|
||||
method public int getSvid();
|
||||
method public double getTimeOffsetNanos();
|
||||
method public boolean hasCarrierCycles();
|
||||
method public boolean hasCarrierFrequencyInHz();
|
||||
method public boolean hasCarrierFrequencyHz();
|
||||
method public boolean hasCarrierPhase();
|
||||
method public boolean hasCarrierPhaseUncertainty();
|
||||
method public boolean hasCodePhaseInChips();
|
||||
method public boolean hasCodePhaseUncertaintyInChips();
|
||||
method public boolean hasDopplerShiftInHz();
|
||||
method public boolean hasDopplerShiftUncertaintyInHz();
|
||||
method public boolean hasElevationInDeg();
|
||||
method public boolean hasElevationUncertaintyInDeg();
|
||||
method public boolean hasPseudorangeInMeters();
|
||||
method public boolean hasPseudorangeUncertaintyInMeters();
|
||||
method public boolean hasSnrInDb();
|
||||
method public boolean hasTimeFromLastBitInMs();
|
||||
method public boolean isPseudorangeRateCorrected();
|
||||
method public boolean isUsedInFix();
|
||||
method public void reset();
|
||||
method public void resetAzimuthInDeg();
|
||||
method public void resetAzimuthUncertaintyInDeg();
|
||||
method public void resetBitNumber();
|
||||
method public void resetCarrierCycles();
|
||||
method public void resetCarrierFrequencyInHz();
|
||||
method public void resetCarrierFrequencyHz();
|
||||
method public void resetCarrierPhase();
|
||||
method public void resetCarrierPhaseUncertainty();
|
||||
method public void resetCodePhaseInChips();
|
||||
method public void resetCodePhaseUncertaintyInChips();
|
||||
method public void resetDopplerShiftInHz();
|
||||
method public void resetDopplerShiftUncertaintyInHz();
|
||||
method public void resetElevationInDeg();
|
||||
method public void resetElevationUncertaintyInDeg();
|
||||
method public void resetPseudorangeInMeters();
|
||||
method public void resetPseudorangeUncertaintyInMeters();
|
||||
method public void resetSnrInDb();
|
||||
method public void resetTimeFromLastBitInMs();
|
||||
method public void set(android.location.GnssMeasurement);
|
||||
method public void setAccumulatedDeltaRangeInMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(short);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyInMeters(double);
|
||||
method public void setAzimuthInDeg(double);
|
||||
method public void setAzimuthUncertaintyInDeg(double);
|
||||
method public void setBitNumber(int);
|
||||
method public void setAccumulatedDeltaRangeMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(int);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
|
||||
method public void setCarrierCycles(long);
|
||||
method public void setCarrierFrequencyInHz(float);
|
||||
method public void setCarrierFrequencyHz(float);
|
||||
method public void setCarrierPhase(double);
|
||||
method public void setCarrierPhaseUncertainty(double);
|
||||
method public void setCn0InDbHz(double);
|
||||
method public void setCodePhaseInChips(double);
|
||||
method public void setCodePhaseUncertaintyInChips(double);
|
||||
method public void setConstellationType(byte);
|
||||
method public void setDopplerShiftInHz(double);
|
||||
method public void setDopplerShiftUncertaintyInHz(double);
|
||||
method public void setElevationInDeg(double);
|
||||
method public void setElevationUncertaintyInDeg(double);
|
||||
method public void setLossOfLock(byte);
|
||||
method public void setMultipathIndicator(byte);
|
||||
method public void setPseudorangeInMeters(double);
|
||||
method public void setPseudorangeRateInMetersPerSec(double);
|
||||
method public void setPseudorangeRateUncertaintyInMetersPerSec(double);
|
||||
method public void setPseudorangeUncertaintyInMeters(double);
|
||||
method public void setReceivedSvTimeInNs(long);
|
||||
method public void setReceivedSvTimeUncertaintyInNs(long);
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
method public void setReceivedSvTimeUncertaintyNanos(long);
|
||||
method public void setSnrInDb(double);
|
||||
method public void setState(short);
|
||||
method public void setSvid(short);
|
||||
method public void setTimeFromLastBitInMs(short);
|
||||
method public void setTimeOffsetInNs(double);
|
||||
method public void setUsedInFix(boolean);
|
||||
method public void setState(int);
|
||||
method public void setSvid(int);
|
||||
method public void setTimeOffsetNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final short ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final short ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final short ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final short ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final int ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final int ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final int ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurement> CREATOR;
|
||||
field public static final byte LOSS_OF_LOCK_CYCLE_SLIP = 2; // 0x2
|
||||
field public static final byte LOSS_OF_LOCK_OK = 1; // 0x1
|
||||
field public static final byte LOSS_OF_LOCK_UNKNOWN = 0; // 0x0
|
||||
field public static final byte MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final byte MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final byte MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final short STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final short STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final short STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final short STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final short STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.LossOfLockStatus implements java.lang.annotation.Annotation {
|
||||
field public static final int MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final int MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final int MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final int STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final int STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final int STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.MultipathIndicator implements java.lang.annotation.Annotation {
|
||||
@@ -19339,7 +19281,7 @@ package android.location {
|
||||
method public java.util.Collection<android.location.GnssMeasurement> getMeasurements();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurementsEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -19356,34 +19298,34 @@ package android.location {
|
||||
public final class GnssNavigationMessage implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public short getMessageId();
|
||||
method public short getStatus();
|
||||
method public short getSubmessageId();
|
||||
method public short getSvid();
|
||||
method public short getType();
|
||||
method public int getMessageId();
|
||||
method public int getStatus();
|
||||
method public int getSubmessageId();
|
||||
method public int getSvid();
|
||||
method public int getType();
|
||||
method public void reset();
|
||||
method public void set(android.location.GnssNavigationMessage);
|
||||
method public void setData(byte[]);
|
||||
method public void setMessageId(short);
|
||||
method public void setStatus(short);
|
||||
method public void setSubmessageId(short);
|
||||
method public void setSvid(short);
|
||||
method public void setType(short);
|
||||
method public void setMessageId(int);
|
||||
method public void setStatus(int);
|
||||
method public void setSubmessageId(int);
|
||||
method public void setSvid(int);
|
||||
method public void setType(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
|
||||
field public static final short MESSAGE_TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final short MESSAGE_TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final short MESSAGE_TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final short MESSAGE_TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final short MESSAGE_TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final short MESSAGE_TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final short MESSAGE_TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final short MESSAGE_TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final short MESSAGE_TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final short MESSAGE_TYPE_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final short STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final short STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final int STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final int STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final int TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final int TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final int TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final int TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final int TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final int TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final int TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final int TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final int TYPE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssNavigationMessage.GnssNavigationMessageType implements java.lang.annotation.Annotation {
|
||||
@@ -19395,7 +19337,7 @@ package android.location {
|
||||
method public android.location.GnssNavigationMessage getNavigationMessage();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessageEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -19414,22 +19356,22 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssStatus {
|
||||
method public float getAzimuth(int);
|
||||
method public byte getConstellationType(int);
|
||||
method public float getElevation(int);
|
||||
method public float getAzimuthDegrees(int);
|
||||
method public float getCn0DbHz(int);
|
||||
method public int getConstellationType(int);
|
||||
method public float getElevationDegrees(int);
|
||||
method public int getNumSatellites();
|
||||
method public float getSnr(int);
|
||||
method public int getSvid(int);
|
||||
method public boolean hasAlmanac(int);
|
||||
method public boolean hasEphemeris(int);
|
||||
method public boolean usedInFix(int);
|
||||
field public static final byte CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final byte CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final byte CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final byte CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final byte CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final byte CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final byte CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final int CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final int CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final int CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final int CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final int CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final int CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssStatus.ConstellationType implements java.lang.annotation.Annotation {
|
||||
@@ -19544,8 +19486,8 @@ package android.location {
|
||||
method public java.util.List<java.lang.String> getProviders(boolean);
|
||||
method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
|
||||
method public boolean isProviderEnabled(java.lang.String);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
@@ -19570,7 +19512,7 @@ package android.location {
|
||||
method public void setTestProviderEnabled(java.lang.String, boolean);
|
||||
method public void setTestProviderLocation(java.lang.String, android.location.Location);
|
||||
method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
|
||||
method public void unregisterGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public void unregisterGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
field public static final java.lang.String GPS_PROVIDER = "gps";
|
||||
@@ -34542,7 +34484,7 @@ package android.service.notification {
|
||||
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
|
||||
method public final void requestInterruptionFilter(int);
|
||||
method public final void requestListenerHints(int);
|
||||
method public static final void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public final void requestUnbind() throws android.os.RemoteException;
|
||||
method public final void setNotificationsShown(java.lang.String[]);
|
||||
field public static final java.lang.String CATEGORY_VR_NOTIFICATIONS = "android.intent.category.vr.notifications";
|
||||
|
||||
@@ -20354,168 +20354,110 @@ package android.location {
|
||||
|
||||
public final class GnssClock implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getBiasInNs();
|
||||
method public double getBiasUncertaintyInNs();
|
||||
method public double getDriftInNsPerSec();
|
||||
method public double getDriftUncertaintyInNsPerSec();
|
||||
method public long getFullBiasInNs();
|
||||
method public double getBiasNanos();
|
||||
method public double getBiasUncertaintyNanos();
|
||||
method public double getDriftNanosPerSecond();
|
||||
method public double getDriftUncertaintyNanosPerSecond();
|
||||
method public long getFullBiasNanos();
|
||||
method public int getHardwareClockDiscontinuityCount();
|
||||
method public short getLeapSecond();
|
||||
method public long getTimeInNs();
|
||||
method public double getTimeUncertaintyInNs();
|
||||
method public boolean hasBiasInNs();
|
||||
method public boolean hasBiasUncertaintyInNs();
|
||||
method public boolean hasDriftInNsPerSec();
|
||||
method public boolean hasDriftUncertaintyInNsPerSec();
|
||||
method public boolean hasFullBiasInNs();
|
||||
method public int getLeapSecond();
|
||||
method public long getTimeNanos();
|
||||
method public double getTimeUncertaintyNanos();
|
||||
method public boolean hasBiasNanos();
|
||||
method public boolean hasBiasUncertaintyNanos();
|
||||
method public boolean hasDriftNanosPerSecond();
|
||||
method public boolean hasDriftUncertaintyNanosPerSecond();
|
||||
method public boolean hasFullBiasNanos();
|
||||
method public boolean hasLeapSecond();
|
||||
method public boolean hasTimeUncertaintyInNs();
|
||||
method public boolean hasTimeUncertaintyNanos();
|
||||
method public void reset();
|
||||
method public void resetBiasInNs();
|
||||
method public void resetBiasUncertaintyInNs();
|
||||
method public void resetDriftInNsPerSec();
|
||||
method public void resetDriftUncertaintyInNsPerSec();
|
||||
method public void resetFullBiasInNs();
|
||||
method public void resetBiasNanos();
|
||||
method public void resetBiasUncertaintyNanos();
|
||||
method public void resetDriftNanosPerSecond();
|
||||
method public void resetDriftUncertaintyNanosPerSecond();
|
||||
method public void resetFullBiasNanos();
|
||||
method public void resetLeapSecond();
|
||||
method public void resetTimeUncertaintyInNs();
|
||||
method public void resetTimeUncertaintyNanos();
|
||||
method public void set(android.location.GnssClock);
|
||||
method public void setBiasInNs(double);
|
||||
method public void setBiasUncertaintyInNs(double);
|
||||
method public void setDriftInNsPerSec(double);
|
||||
method public void setDriftUncertaintyInNsPerSec(double);
|
||||
method public void setFullBiasInNs(long);
|
||||
method public void setBiasNanos(double);
|
||||
method public void setBiasUncertaintyNanos(double);
|
||||
method public void setDriftNanosPerSecond(double);
|
||||
method public void setDriftUncertaintyNanosPerSecond(double);
|
||||
method public void setFullBiasNanos(long);
|
||||
method public void setHardwareClockDiscontinuityCount(int);
|
||||
method public void setLeapSecond(short);
|
||||
method public void setTimeInNs(long);
|
||||
method public void setTimeUncertaintyInNs(double);
|
||||
method public void setLeapSecond(int);
|
||||
method public void setTimeNanos(long);
|
||||
method public void setTimeUncertaintyNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
|
||||
}
|
||||
|
||||
public final class GnssMeasurement implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getAccumulatedDeltaRangeInMeters();
|
||||
method public short getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyInMeters();
|
||||
method public double getAzimuthInDeg();
|
||||
method public double getAzimuthUncertaintyInDeg();
|
||||
method public int getBitNumber();
|
||||
method public double getAccumulatedDeltaRangeMeters();
|
||||
method public int getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyMeters();
|
||||
method public long getCarrierCycles();
|
||||
method public float getCarrierFrequencyInHz();
|
||||
method public float getCarrierFrequencyHz();
|
||||
method public double getCarrierPhase();
|
||||
method public double getCarrierPhaseUncertainty();
|
||||
method public double getCn0InDbHz();
|
||||
method public double getCodePhaseInChips();
|
||||
method public double getCodePhaseUncertaintyInChips();
|
||||
method public byte getConstellationType();
|
||||
method public double getDopplerShiftInHz();
|
||||
method public double getDopplerShiftUncertaintyInHz();
|
||||
method public double getElevationInDeg();
|
||||
method public double getElevationUncertaintyInDeg();
|
||||
method public byte getLossOfLock();
|
||||
method public byte getMultipathIndicator();
|
||||
method public double getPseudorangeInMeters();
|
||||
method public double getPseudorangeRateInMetersPerSec();
|
||||
method public double getPseudorangeRateUncertaintyInMetersPerSec();
|
||||
method public double getPseudorangeUncertaintyInMeters();
|
||||
method public long getReceivedSvTimeInNs();
|
||||
method public long getReceivedSvTimeUncertaintyInNs();
|
||||
method public double getCn0DbHz();
|
||||
method public int getConstellationType();
|
||||
method public int getMultipathIndicator();
|
||||
method public double getPseudorangeRateMetersPerSecond();
|
||||
method public double getPseudorangeRateUncertaintyMetersPerSecond();
|
||||
method public long getReceivedSvTimeNanos();
|
||||
method public long getReceivedSvTimeUncertaintyNanos();
|
||||
method public double getSnrInDb();
|
||||
method public short getState();
|
||||
method public short getSvid();
|
||||
method public short getTimeFromLastBitInMs();
|
||||
method public double getTimeOffsetInNs();
|
||||
method public boolean hasAzimuthInDeg();
|
||||
method public boolean hasAzimuthUncertaintyInDeg();
|
||||
method public boolean hasBitNumber();
|
||||
method public int getState();
|
||||
method public int getSvid();
|
||||
method public double getTimeOffsetNanos();
|
||||
method public boolean hasCarrierCycles();
|
||||
method public boolean hasCarrierFrequencyInHz();
|
||||
method public boolean hasCarrierFrequencyHz();
|
||||
method public boolean hasCarrierPhase();
|
||||
method public boolean hasCarrierPhaseUncertainty();
|
||||
method public boolean hasCodePhaseInChips();
|
||||
method public boolean hasCodePhaseUncertaintyInChips();
|
||||
method public boolean hasDopplerShiftInHz();
|
||||
method public boolean hasDopplerShiftUncertaintyInHz();
|
||||
method public boolean hasElevationInDeg();
|
||||
method public boolean hasElevationUncertaintyInDeg();
|
||||
method public boolean hasPseudorangeInMeters();
|
||||
method public boolean hasPseudorangeUncertaintyInMeters();
|
||||
method public boolean hasSnrInDb();
|
||||
method public boolean hasTimeFromLastBitInMs();
|
||||
method public boolean isPseudorangeRateCorrected();
|
||||
method public boolean isUsedInFix();
|
||||
method public void reset();
|
||||
method public void resetAzimuthInDeg();
|
||||
method public void resetAzimuthUncertaintyInDeg();
|
||||
method public void resetBitNumber();
|
||||
method public void resetCarrierCycles();
|
||||
method public void resetCarrierFrequencyInHz();
|
||||
method public void resetCarrierFrequencyHz();
|
||||
method public void resetCarrierPhase();
|
||||
method public void resetCarrierPhaseUncertainty();
|
||||
method public void resetCodePhaseInChips();
|
||||
method public void resetCodePhaseUncertaintyInChips();
|
||||
method public void resetDopplerShiftInHz();
|
||||
method public void resetDopplerShiftUncertaintyInHz();
|
||||
method public void resetElevationInDeg();
|
||||
method public void resetElevationUncertaintyInDeg();
|
||||
method public void resetPseudorangeInMeters();
|
||||
method public void resetPseudorangeUncertaintyInMeters();
|
||||
method public void resetSnrInDb();
|
||||
method public void resetTimeFromLastBitInMs();
|
||||
method public void set(android.location.GnssMeasurement);
|
||||
method public void setAccumulatedDeltaRangeInMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(short);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyInMeters(double);
|
||||
method public void setAzimuthInDeg(double);
|
||||
method public void setAzimuthUncertaintyInDeg(double);
|
||||
method public void setBitNumber(int);
|
||||
method public void setAccumulatedDeltaRangeMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(int);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
|
||||
method public void setCarrierCycles(long);
|
||||
method public void setCarrierFrequencyInHz(float);
|
||||
method public void setCarrierFrequencyHz(float);
|
||||
method public void setCarrierPhase(double);
|
||||
method public void setCarrierPhaseUncertainty(double);
|
||||
method public void setCn0InDbHz(double);
|
||||
method public void setCodePhaseInChips(double);
|
||||
method public void setCodePhaseUncertaintyInChips(double);
|
||||
method public void setConstellationType(byte);
|
||||
method public void setDopplerShiftInHz(double);
|
||||
method public void setDopplerShiftUncertaintyInHz(double);
|
||||
method public void setElevationInDeg(double);
|
||||
method public void setElevationUncertaintyInDeg(double);
|
||||
method public void setLossOfLock(byte);
|
||||
method public void setMultipathIndicator(byte);
|
||||
method public void setPseudorangeInMeters(double);
|
||||
method public void setPseudorangeRateInMetersPerSec(double);
|
||||
method public void setPseudorangeRateUncertaintyInMetersPerSec(double);
|
||||
method public void setPseudorangeUncertaintyInMeters(double);
|
||||
method public void setReceivedSvTimeInNs(long);
|
||||
method public void setReceivedSvTimeUncertaintyInNs(long);
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
method public void setReceivedSvTimeUncertaintyNanos(long);
|
||||
method public void setSnrInDb(double);
|
||||
method public void setState(short);
|
||||
method public void setSvid(short);
|
||||
method public void setTimeFromLastBitInMs(short);
|
||||
method public void setTimeOffsetInNs(double);
|
||||
method public void setUsedInFix(boolean);
|
||||
method public void setState(int);
|
||||
method public void setSvid(int);
|
||||
method public void setTimeOffsetNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final short ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final short ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final short ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final short ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final int ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final int ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final int ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurement> CREATOR;
|
||||
field public static final byte LOSS_OF_LOCK_CYCLE_SLIP = 2; // 0x2
|
||||
field public static final byte LOSS_OF_LOCK_OK = 1; // 0x1
|
||||
field public static final byte LOSS_OF_LOCK_UNKNOWN = 0; // 0x0
|
||||
field public static final byte MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final byte MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final byte MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final short STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final short STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final short STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final short STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final short STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.LossOfLockStatus implements java.lang.annotation.Annotation {
|
||||
field public static final int MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final int MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final int MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final int STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final int STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final int STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.MultipathIndicator implements java.lang.annotation.Annotation {
|
||||
@@ -20528,7 +20470,7 @@ package android.location {
|
||||
method public java.util.Collection<android.location.GnssMeasurement> getMeasurements();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurementsEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -20545,34 +20487,34 @@ package android.location {
|
||||
public final class GnssNavigationMessage implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public short getMessageId();
|
||||
method public short getStatus();
|
||||
method public short getSubmessageId();
|
||||
method public short getSvid();
|
||||
method public short getType();
|
||||
method public int getMessageId();
|
||||
method public int getStatus();
|
||||
method public int getSubmessageId();
|
||||
method public int getSvid();
|
||||
method public int getType();
|
||||
method public void reset();
|
||||
method public void set(android.location.GnssNavigationMessage);
|
||||
method public void setData(byte[]);
|
||||
method public void setMessageId(short);
|
||||
method public void setStatus(short);
|
||||
method public void setSubmessageId(short);
|
||||
method public void setSvid(short);
|
||||
method public void setType(short);
|
||||
method public void setMessageId(int);
|
||||
method public void setStatus(int);
|
||||
method public void setSubmessageId(int);
|
||||
method public void setSvid(int);
|
||||
method public void setType(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
|
||||
field public static final short MESSAGE_TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final short MESSAGE_TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final short MESSAGE_TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final short MESSAGE_TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final short MESSAGE_TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final short MESSAGE_TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final short MESSAGE_TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final short MESSAGE_TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final short MESSAGE_TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final short MESSAGE_TYPE_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final short STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final short STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final int STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final int STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final int TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final int TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final int TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final int TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final int TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final int TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final int TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final int TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final int TYPE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssNavigationMessage.GnssNavigationMessageType implements java.lang.annotation.Annotation {
|
||||
@@ -20584,7 +20526,7 @@ package android.location {
|
||||
method public android.location.GnssNavigationMessage getNavigationMessage();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessageEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -20603,22 +20545,22 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssStatus {
|
||||
method public float getAzimuth(int);
|
||||
method public byte getConstellationType(int);
|
||||
method public float getElevation(int);
|
||||
method public float getAzimuthDegrees(int);
|
||||
method public float getCn0DbHz(int);
|
||||
method public int getConstellationType(int);
|
||||
method public float getElevationDegrees(int);
|
||||
method public int getNumSatellites();
|
||||
method public float getSnr(int);
|
||||
method public int getSvid(int);
|
||||
method public boolean hasAlmanac(int);
|
||||
method public boolean hasEphemeris(int);
|
||||
method public boolean usedInFix(int);
|
||||
field public static final byte CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final byte CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final byte CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final byte CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final byte CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final byte CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final byte CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final int CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final int CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final int CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final int CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final int CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final int CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssStatus.ConstellationType implements java.lang.annotation.Annotation {
|
||||
@@ -20980,8 +20922,8 @@ package android.location {
|
||||
method public java.util.List<java.lang.String> getProviders(boolean);
|
||||
method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
|
||||
method public boolean isProviderEnabled(java.lang.String);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
@@ -21010,7 +20952,7 @@ package android.location {
|
||||
method public void setTestProviderEnabled(java.lang.String, boolean);
|
||||
method public void setTestProviderLocation(java.lang.String, android.location.Location);
|
||||
method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
|
||||
method public void unregisterGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public void unregisterGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
field public static final java.lang.String GPS_PROVIDER = "gps";
|
||||
@@ -37031,6 +36973,7 @@ package android.service.notification {
|
||||
public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService {
|
||||
ctor public NotificationAssistantService();
|
||||
method public final void adjustImportance(java.lang.String, android.service.notification.NotificationAssistantService.Adjustment);
|
||||
method public final android.os.IBinder onBind(android.content.Intent);
|
||||
method public void onNotificationActionClick(java.lang.String, long, int);
|
||||
method public void onNotificationClick(java.lang.String, long);
|
||||
method public abstract android.service.notification.NotificationAssistantService.Adjustment onNotificationEnqueued(android.service.notification.StatusBarNotification, int, boolean);
|
||||
@@ -37083,7 +37026,7 @@ package android.service.notification {
|
||||
method public void registerAsSystemService(android.content.Context, android.content.ComponentName, int) throws android.os.RemoteException;
|
||||
method public final void requestInterruptionFilter(int);
|
||||
method public final void requestListenerHints(int);
|
||||
method public static final void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public final void requestUnbind() throws android.os.RemoteException;
|
||||
method public final void setNotificationsShown(java.lang.String[]);
|
||||
method public final void setOnNotificationPostedTrim(int);
|
||||
|
||||
@@ -19173,168 +19173,110 @@ package android.location {
|
||||
|
||||
public final class GnssClock implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getBiasInNs();
|
||||
method public double getBiasUncertaintyInNs();
|
||||
method public double getDriftInNsPerSec();
|
||||
method public double getDriftUncertaintyInNsPerSec();
|
||||
method public long getFullBiasInNs();
|
||||
method public double getBiasNanos();
|
||||
method public double getBiasUncertaintyNanos();
|
||||
method public double getDriftNanosPerSecond();
|
||||
method public double getDriftUncertaintyNanosPerSecond();
|
||||
method public long getFullBiasNanos();
|
||||
method public int getHardwareClockDiscontinuityCount();
|
||||
method public short getLeapSecond();
|
||||
method public long getTimeInNs();
|
||||
method public double getTimeUncertaintyInNs();
|
||||
method public boolean hasBiasInNs();
|
||||
method public boolean hasBiasUncertaintyInNs();
|
||||
method public boolean hasDriftInNsPerSec();
|
||||
method public boolean hasDriftUncertaintyInNsPerSec();
|
||||
method public boolean hasFullBiasInNs();
|
||||
method public int getLeapSecond();
|
||||
method public long getTimeNanos();
|
||||
method public double getTimeUncertaintyNanos();
|
||||
method public boolean hasBiasNanos();
|
||||
method public boolean hasBiasUncertaintyNanos();
|
||||
method public boolean hasDriftNanosPerSecond();
|
||||
method public boolean hasDriftUncertaintyNanosPerSecond();
|
||||
method public boolean hasFullBiasNanos();
|
||||
method public boolean hasLeapSecond();
|
||||
method public boolean hasTimeUncertaintyInNs();
|
||||
method public boolean hasTimeUncertaintyNanos();
|
||||
method public void reset();
|
||||
method public void resetBiasInNs();
|
||||
method public void resetBiasUncertaintyInNs();
|
||||
method public void resetDriftInNsPerSec();
|
||||
method public void resetDriftUncertaintyInNsPerSec();
|
||||
method public void resetFullBiasInNs();
|
||||
method public void resetBiasNanos();
|
||||
method public void resetBiasUncertaintyNanos();
|
||||
method public void resetDriftNanosPerSecond();
|
||||
method public void resetDriftUncertaintyNanosPerSecond();
|
||||
method public void resetFullBiasNanos();
|
||||
method public void resetLeapSecond();
|
||||
method public void resetTimeUncertaintyInNs();
|
||||
method public void resetTimeUncertaintyNanos();
|
||||
method public void set(android.location.GnssClock);
|
||||
method public void setBiasInNs(double);
|
||||
method public void setBiasUncertaintyInNs(double);
|
||||
method public void setDriftInNsPerSec(double);
|
||||
method public void setDriftUncertaintyInNsPerSec(double);
|
||||
method public void setFullBiasInNs(long);
|
||||
method public void setBiasNanos(double);
|
||||
method public void setBiasUncertaintyNanos(double);
|
||||
method public void setDriftNanosPerSecond(double);
|
||||
method public void setDriftUncertaintyNanosPerSecond(double);
|
||||
method public void setFullBiasNanos(long);
|
||||
method public void setHardwareClockDiscontinuityCount(int);
|
||||
method public void setLeapSecond(short);
|
||||
method public void setTimeInNs(long);
|
||||
method public void setTimeUncertaintyInNs(double);
|
||||
method public void setLeapSecond(int);
|
||||
method public void setTimeNanos(long);
|
||||
method public void setTimeUncertaintyNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
|
||||
}
|
||||
|
||||
public final class GnssMeasurement implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public double getAccumulatedDeltaRangeInMeters();
|
||||
method public short getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyInMeters();
|
||||
method public double getAzimuthInDeg();
|
||||
method public double getAzimuthUncertaintyInDeg();
|
||||
method public int getBitNumber();
|
||||
method public double getAccumulatedDeltaRangeMeters();
|
||||
method public int getAccumulatedDeltaRangeState();
|
||||
method public double getAccumulatedDeltaRangeUncertaintyMeters();
|
||||
method public long getCarrierCycles();
|
||||
method public float getCarrierFrequencyInHz();
|
||||
method public float getCarrierFrequencyHz();
|
||||
method public double getCarrierPhase();
|
||||
method public double getCarrierPhaseUncertainty();
|
||||
method public double getCn0InDbHz();
|
||||
method public double getCodePhaseInChips();
|
||||
method public double getCodePhaseUncertaintyInChips();
|
||||
method public byte getConstellationType();
|
||||
method public double getDopplerShiftInHz();
|
||||
method public double getDopplerShiftUncertaintyInHz();
|
||||
method public double getElevationInDeg();
|
||||
method public double getElevationUncertaintyInDeg();
|
||||
method public byte getLossOfLock();
|
||||
method public byte getMultipathIndicator();
|
||||
method public double getPseudorangeInMeters();
|
||||
method public double getPseudorangeRateInMetersPerSec();
|
||||
method public double getPseudorangeRateUncertaintyInMetersPerSec();
|
||||
method public double getPseudorangeUncertaintyInMeters();
|
||||
method public long getReceivedSvTimeInNs();
|
||||
method public long getReceivedSvTimeUncertaintyInNs();
|
||||
method public double getCn0DbHz();
|
||||
method public int getConstellationType();
|
||||
method public int getMultipathIndicator();
|
||||
method public double getPseudorangeRateMetersPerSecond();
|
||||
method public double getPseudorangeRateUncertaintyMetersPerSecond();
|
||||
method public long getReceivedSvTimeNanos();
|
||||
method public long getReceivedSvTimeUncertaintyNanos();
|
||||
method public double getSnrInDb();
|
||||
method public short getState();
|
||||
method public short getSvid();
|
||||
method public short getTimeFromLastBitInMs();
|
||||
method public double getTimeOffsetInNs();
|
||||
method public boolean hasAzimuthInDeg();
|
||||
method public boolean hasAzimuthUncertaintyInDeg();
|
||||
method public boolean hasBitNumber();
|
||||
method public int getState();
|
||||
method public int getSvid();
|
||||
method public double getTimeOffsetNanos();
|
||||
method public boolean hasCarrierCycles();
|
||||
method public boolean hasCarrierFrequencyInHz();
|
||||
method public boolean hasCarrierFrequencyHz();
|
||||
method public boolean hasCarrierPhase();
|
||||
method public boolean hasCarrierPhaseUncertainty();
|
||||
method public boolean hasCodePhaseInChips();
|
||||
method public boolean hasCodePhaseUncertaintyInChips();
|
||||
method public boolean hasDopplerShiftInHz();
|
||||
method public boolean hasDopplerShiftUncertaintyInHz();
|
||||
method public boolean hasElevationInDeg();
|
||||
method public boolean hasElevationUncertaintyInDeg();
|
||||
method public boolean hasPseudorangeInMeters();
|
||||
method public boolean hasPseudorangeUncertaintyInMeters();
|
||||
method public boolean hasSnrInDb();
|
||||
method public boolean hasTimeFromLastBitInMs();
|
||||
method public boolean isPseudorangeRateCorrected();
|
||||
method public boolean isUsedInFix();
|
||||
method public void reset();
|
||||
method public void resetAzimuthInDeg();
|
||||
method public void resetAzimuthUncertaintyInDeg();
|
||||
method public void resetBitNumber();
|
||||
method public void resetCarrierCycles();
|
||||
method public void resetCarrierFrequencyInHz();
|
||||
method public void resetCarrierFrequencyHz();
|
||||
method public void resetCarrierPhase();
|
||||
method public void resetCarrierPhaseUncertainty();
|
||||
method public void resetCodePhaseInChips();
|
||||
method public void resetCodePhaseUncertaintyInChips();
|
||||
method public void resetDopplerShiftInHz();
|
||||
method public void resetDopplerShiftUncertaintyInHz();
|
||||
method public void resetElevationInDeg();
|
||||
method public void resetElevationUncertaintyInDeg();
|
||||
method public void resetPseudorangeInMeters();
|
||||
method public void resetPseudorangeUncertaintyInMeters();
|
||||
method public void resetSnrInDb();
|
||||
method public void resetTimeFromLastBitInMs();
|
||||
method public void set(android.location.GnssMeasurement);
|
||||
method public void setAccumulatedDeltaRangeInMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(short);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyInMeters(double);
|
||||
method public void setAzimuthInDeg(double);
|
||||
method public void setAzimuthUncertaintyInDeg(double);
|
||||
method public void setBitNumber(int);
|
||||
method public void setAccumulatedDeltaRangeMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(int);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
|
||||
method public void setCarrierCycles(long);
|
||||
method public void setCarrierFrequencyInHz(float);
|
||||
method public void setCarrierFrequencyHz(float);
|
||||
method public void setCarrierPhase(double);
|
||||
method public void setCarrierPhaseUncertainty(double);
|
||||
method public void setCn0InDbHz(double);
|
||||
method public void setCodePhaseInChips(double);
|
||||
method public void setCodePhaseUncertaintyInChips(double);
|
||||
method public void setConstellationType(byte);
|
||||
method public void setDopplerShiftInHz(double);
|
||||
method public void setDopplerShiftUncertaintyInHz(double);
|
||||
method public void setElevationInDeg(double);
|
||||
method public void setElevationUncertaintyInDeg(double);
|
||||
method public void setLossOfLock(byte);
|
||||
method public void setMultipathIndicator(byte);
|
||||
method public void setPseudorangeInMeters(double);
|
||||
method public void setPseudorangeRateInMetersPerSec(double);
|
||||
method public void setPseudorangeRateUncertaintyInMetersPerSec(double);
|
||||
method public void setPseudorangeUncertaintyInMeters(double);
|
||||
method public void setReceivedSvTimeInNs(long);
|
||||
method public void setReceivedSvTimeUncertaintyInNs(long);
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
method public void setReceivedSvTimeUncertaintyNanos(long);
|
||||
method public void setSnrInDb(double);
|
||||
method public void setState(short);
|
||||
method public void setSvid(short);
|
||||
method public void setTimeFromLastBitInMs(short);
|
||||
method public void setTimeOffsetInNs(double);
|
||||
method public void setUsedInFix(boolean);
|
||||
method public void setState(int);
|
||||
method public void setSvid(int);
|
||||
method public void setTimeOffsetNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final short ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final short ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final short ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final short ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final int ADR_STATE_RESET = 2; // 0x2
|
||||
field public static final int ADR_STATE_UNKNOWN = 0; // 0x0
|
||||
field public static final int ADR_STATE_VALID = 1; // 0x1
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurement> CREATOR;
|
||||
field public static final byte LOSS_OF_LOCK_CYCLE_SLIP = 2; // 0x2
|
||||
field public static final byte LOSS_OF_LOCK_OK = 1; // 0x1
|
||||
field public static final byte LOSS_OF_LOCK_UNKNOWN = 0; // 0x0
|
||||
field public static final byte MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final byte MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final byte MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final short STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final short STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final short STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final short STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final short STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.LossOfLockStatus implements java.lang.annotation.Annotation {
|
||||
field public static final int MULTIPATH_INDICATOR_DETECTED = 1; // 0x1
|
||||
field public static final int MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2
|
||||
field public static final int MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATE_BIT_SYNC = 2; // 0x2
|
||||
field public static final int STATE_CODE_LOCK = 1; // 0x1
|
||||
field public static final int STATE_MSEC_AMBIGUOUS = 16; // 0x10
|
||||
field public static final int STATE_SUBFRAME_SYNC = 4; // 0x4
|
||||
field public static final int STATE_TOW_DECODED = 8; // 0x8
|
||||
field public static final int STATE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssMeasurement.MultipathIndicator implements java.lang.annotation.Annotation {
|
||||
@@ -19347,7 +19289,7 @@ package android.location {
|
||||
method public java.util.Collection<android.location.GnssMeasurement> getMeasurements();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssMeasurementsEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -19364,34 +19306,34 @@ package android.location {
|
||||
public final class GnssNavigationMessage implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public short getMessageId();
|
||||
method public short getStatus();
|
||||
method public short getSubmessageId();
|
||||
method public short getSvid();
|
||||
method public short getType();
|
||||
method public int getMessageId();
|
||||
method public int getStatus();
|
||||
method public int getSubmessageId();
|
||||
method public int getSvid();
|
||||
method public int getType();
|
||||
method public void reset();
|
||||
method public void set(android.location.GnssNavigationMessage);
|
||||
method public void setData(byte[]);
|
||||
method public void setMessageId(short);
|
||||
method public void setStatus(short);
|
||||
method public void setSubmessageId(short);
|
||||
method public void setSvid(short);
|
||||
method public void setType(short);
|
||||
method public void setMessageId(int);
|
||||
method public void setStatus(int);
|
||||
method public void setSubmessageId(int);
|
||||
method public void setSvid(int);
|
||||
method public void setType(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
|
||||
field public static final short MESSAGE_TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final short MESSAGE_TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final short MESSAGE_TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final short MESSAGE_TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final short MESSAGE_TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final short MESSAGE_TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final short MESSAGE_TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final short MESSAGE_TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final short MESSAGE_TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final short MESSAGE_TYPE_UNKNOWN = 0; // 0x0
|
||||
field public static final short STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final short STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final short STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int STATUS_PARITY_PASSED = 1; // 0x1
|
||||
field public static final int STATUS_PARITY_REBUILT = 2; // 0x2
|
||||
field public static final int STATUS_UNKNOWN = 0; // 0x0
|
||||
field public static final int TYPE_BDS_D1 = 1281; // 0x501
|
||||
field public static final int TYPE_BDS_D2 = 1282; // 0x502
|
||||
field public static final int TYPE_GAL_F = 1538; // 0x602
|
||||
field public static final int TYPE_GAL_I = 1537; // 0x601
|
||||
field public static final int TYPE_GLO_L1CA = 769; // 0x301
|
||||
field public static final int TYPE_GPS_CNAV2 = 260; // 0x104
|
||||
field public static final int TYPE_GPS_L1CA = 257; // 0x101
|
||||
field public static final int TYPE_GPS_L2CNAV = 258; // 0x102
|
||||
field public static final int TYPE_GPS_L5CNAV = 259; // 0x103
|
||||
field public static final int TYPE_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssNavigationMessage.GnssNavigationMessageType implements java.lang.annotation.Annotation {
|
||||
@@ -19403,7 +19345,7 @@ package android.location {
|
||||
method public android.location.GnssNavigationMessage getNavigationMessage();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessageEvent> CREATOR;
|
||||
field public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_GNSS_LOCATION_DISABLED = 2; // 0x2
|
||||
field public static final int STATUS_NOT_SUPPORTED = 0; // 0x0
|
||||
field public static final int STATUS_READY = 1; // 0x1
|
||||
}
|
||||
@@ -19422,22 +19364,22 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssStatus {
|
||||
method public float getAzimuth(int);
|
||||
method public byte getConstellationType(int);
|
||||
method public float getElevation(int);
|
||||
method public float getAzimuthDegrees(int);
|
||||
method public float getCn0DbHz(int);
|
||||
method public int getConstellationType(int);
|
||||
method public float getElevationDegrees(int);
|
||||
method public int getNumSatellites();
|
||||
method public float getSnr(int);
|
||||
method public int getSvid(int);
|
||||
method public boolean hasAlmanac(int);
|
||||
method public boolean hasEphemeris(int);
|
||||
method public boolean usedInFix(int);
|
||||
field public static final byte CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final byte CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final byte CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final byte CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final byte CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final byte CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final byte CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
field public static final int CONSTELLATION_BEIDOU = 5; // 0x5
|
||||
field public static final int CONSTELLATION_GALILEO = 6; // 0x6
|
||||
field public static final int CONSTELLATION_GLONASS = 3; // 0x3
|
||||
field public static final int CONSTELLATION_GPS = 1; // 0x1
|
||||
field public static final int CONSTELLATION_QZSS = 4; // 0x4
|
||||
field public static final int CONSTELLATION_SBAS = 2; // 0x2
|
||||
field public static final int CONSTELLATION_UNKNOWN = 0; // 0x0
|
||||
}
|
||||
|
||||
public static abstract class GnssStatus.ConstellationType implements java.lang.annotation.Annotation {
|
||||
@@ -19553,8 +19495,8 @@ package android.location {
|
||||
method public java.util.List<java.lang.String> getProviders(boolean);
|
||||
method public java.util.List<java.lang.String> getProviders(android.location.Criteria, boolean);
|
||||
method public boolean isProviderEnabled(java.lang.String);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public boolean registerGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public boolean registerGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback, android.os.Handler);
|
||||
method public boolean registerGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
@@ -19579,7 +19521,7 @@ package android.location {
|
||||
method public void setTestProviderEnabled(java.lang.String, boolean);
|
||||
method public void setTestProviderLocation(java.lang.String, android.location.Location);
|
||||
method public void setTestProviderStatus(java.lang.String, int, android.os.Bundle, long);
|
||||
method public void unregisterGnssMeasurementCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssMeasurementsCallback(android.location.GnssMeasurementsEvent.Callback);
|
||||
method public void unregisterGnssNavigationMessageCallback(android.location.GnssNavigationMessageEvent.Callback);
|
||||
method public void unregisterGnssStatusCallback(android.location.GnssStatusCallback);
|
||||
field public static final java.lang.String GPS_PROVIDER = "gps";
|
||||
@@ -34557,7 +34499,7 @@ package android.service.notification {
|
||||
method public void onNotificationRemoved(android.service.notification.StatusBarNotification, android.service.notification.NotificationListenerService.RankingMap);
|
||||
method public final void requestInterruptionFilter(int);
|
||||
method public final void requestListenerHints(int);
|
||||
method public static final void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public static void requestRebind(android.content.ComponentName) throws android.os.RemoteException;
|
||||
method public final void requestUnbind() throws android.os.RemoteException;
|
||||
method public final void setNotificationsShown(java.lang.String[]);
|
||||
field public static final java.lang.String CATEGORY_VR_NOTIFICATIONS = "android.intent.category.vr.notifications";
|
||||
|
||||
@@ -26,26 +26,26 @@ import android.os.Parcelable;
|
||||
public final class GnssClock implements Parcelable {
|
||||
// The following enumerations must be in sync with the values declared in gps.h
|
||||
|
||||
private static final short HAS_NO_FLAGS = 0;
|
||||
private static final short HAS_LEAP_SECOND = (1<<0);
|
||||
private static final short HAS_TIME_UNCERTAINTY = (1<<1);
|
||||
private static final short HAS_FULL_BIAS = (1<<2);
|
||||
private static final short HAS_BIAS = (1<<3);
|
||||
private static final short HAS_BIAS_UNCERTAINTY = (1<<4);
|
||||
private static final short HAS_DRIFT = (1<<5);
|
||||
private static final short HAS_DRIFT_UNCERTAINTY = (1<<6);
|
||||
private static final int HAS_NO_FLAGS = 0;
|
||||
private static final int HAS_LEAP_SECOND = (1<<0);
|
||||
private static final int HAS_TIME_UNCERTAINTY = (1<<1);
|
||||
private static final int HAS_FULL_BIAS = (1<<2);
|
||||
private static final int HAS_BIAS = (1<<3);
|
||||
private static final int HAS_BIAS_UNCERTAINTY = (1<<4);
|
||||
private static final int HAS_DRIFT = (1<<5);
|
||||
private static final int HAS_DRIFT_UNCERTAINTY = (1<<6);
|
||||
|
||||
// End enumerations in sync with gps.h
|
||||
|
||||
private short mFlags;
|
||||
private short mLeapSecond;
|
||||
private long mTimeInNs;
|
||||
private double mTimeUncertaintyInNs;
|
||||
private long mFullBiasInNs;
|
||||
private double mBiasInNs;
|
||||
private double mBiasUncertaintyInNs;
|
||||
private double mDriftInNsPerSec;
|
||||
private double mDriftUncertaintyInNsPerSec;
|
||||
private int mFlags;
|
||||
private int mLeapSecond;
|
||||
private long mTimeNanos;
|
||||
private double mTimeUncertaintyNanos;
|
||||
private long mFullBiasNanos;
|
||||
private double mBiasNanos;
|
||||
private double mBiasUncertaintyNanos;
|
||||
private double mDriftNanosPerSecond;
|
||||
private double mDriftUncertaintyNanosPerSecond;
|
||||
private int mHardwareClockDiscontinuityCount;
|
||||
|
||||
GnssClock() {
|
||||
@@ -58,13 +58,13 @@ public final class GnssClock implements Parcelable {
|
||||
public void set(GnssClock clock) {
|
||||
mFlags = clock.mFlags;
|
||||
mLeapSecond = clock.mLeapSecond;
|
||||
mTimeInNs = clock.mTimeInNs;
|
||||
mTimeUncertaintyInNs = clock.mTimeUncertaintyInNs;
|
||||
mFullBiasInNs = clock.mFullBiasInNs;
|
||||
mBiasInNs = clock.mBiasInNs;
|
||||
mBiasUncertaintyInNs = clock.mBiasUncertaintyInNs;
|
||||
mDriftInNsPerSec = clock.mDriftInNsPerSec;
|
||||
mDriftUncertaintyInNsPerSec = clock.mDriftUncertaintyInNsPerSec;
|
||||
mTimeNanos = clock.mTimeNanos;
|
||||
mTimeUncertaintyNanos = clock.mTimeUncertaintyNanos;
|
||||
mFullBiasNanos = clock.mFullBiasNanos;
|
||||
mBiasNanos = clock.mBiasNanos;
|
||||
mBiasUncertaintyNanos = clock.mBiasUncertaintyNanos;
|
||||
mDriftNanosPerSecond = clock.mDriftNanosPerSecond;
|
||||
mDriftUncertaintyNanosPerSecond = clock.mDriftUncertaintyNanosPerSecond;
|
||||
mHardwareClockDiscontinuityCount = clock.mHardwareClockDiscontinuityCount;
|
||||
}
|
||||
|
||||
@@ -89,14 +89,14 @@ public final class GnssClock implements Parcelable {
|
||||
*
|
||||
* The value is only available if {@link #hasLeapSecond()} is true.
|
||||
*/
|
||||
public short getLeapSecond() {
|
||||
public int getLeapSecond() {
|
||||
return mLeapSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the leap second associated with the clock's time.
|
||||
*/
|
||||
public void setLeapSecond(short leapSecond) {
|
||||
public void setLeapSecond(int leapSecond) {
|
||||
setFlag(HAS_LEAP_SECOND);
|
||||
mLeapSecond = leapSecond;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public final class GnssClock implements Parcelable {
|
||||
*/
|
||||
public void resetLeapSecond() {
|
||||
resetFlag(HAS_LEAP_SECOND);
|
||||
mLeapSecond = Short.MIN_VALUE;
|
||||
mLeapSecond = Integer.MIN_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,30 +114,30 @@ public final class GnssClock implements Parcelable {
|
||||
*
|
||||
* For 'local hardware clock' this value is expected to be monotonically increasing during the
|
||||
* reporting session. The real GPS time can be derived by compensating
|
||||
* {@link #getFullBiasInNs()} (when it is available) from this value.
|
||||
* {@link #getFullBiasNanos()} (when it is available) from this value.
|
||||
*
|
||||
* For 'GPS time' this value is expected to be the best estimation of current GPS time that GPS
|
||||
* receiver can achieve. {@link #getTimeUncertaintyInNs()} should be available when GPS time is
|
||||
* receiver can achieve. {@link #getTimeUncertaintyNanos()} should be available when GPS time is
|
||||
* specified.
|
||||
*
|
||||
* Sub-nanosecond accuracy can be provided by means of {@link #getBiasInNs()}.
|
||||
* The reported time includes {@link #getTimeUncertaintyInNs()}.
|
||||
* Sub-nanosecond accuracy can be provided by means of {@link #getBiasNanos()}.
|
||||
* The reported time includes {@link #getTimeUncertaintyNanos()}.
|
||||
*/
|
||||
public long getTimeInNs() {
|
||||
return mTimeInNs;
|
||||
public long getTimeNanos() {
|
||||
return mTimeNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the GPS receiver internal clock in nanoseconds.
|
||||
* Sets the GNSS receiver internal clock in nanoseconds.
|
||||
*/
|
||||
public void setTimeInNs(long timeInNs) {
|
||||
mTimeInNs = timeInNs;
|
||||
public void setTimeNanos(long timeNanos) {
|
||||
mTimeNanos = timeNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getTimeUncertaintyInNs()} is available, false otherwise.
|
||||
* Returns true if {@link #getTimeUncertaintyNanos()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasTimeUncertaintyInNs() {
|
||||
public boolean hasTimeUncertaintyNanos() {
|
||||
return isFlagSet(HAS_TIME_UNCERTAINTY);
|
||||
}
|
||||
|
||||
@@ -145,189 +145,189 @@ public final class GnssClock implements Parcelable {
|
||||
* Gets the clock's time Uncertainty (1-Sigma) in nanoseconds.
|
||||
* The uncertainty is represented as an absolute (single sided) value.
|
||||
*
|
||||
* The value is only available if {@link #hasTimeUncertaintyInNs()} is true.
|
||||
* The value is only available if {@link #hasTimeUncertaintyNanos()} is true.
|
||||
*/
|
||||
public double getTimeUncertaintyInNs() {
|
||||
return mTimeUncertaintyInNs;
|
||||
public double getTimeUncertaintyNanos() {
|
||||
return mTimeUncertaintyNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clock's Time Uncertainty (1-Sigma) in nanoseconds.
|
||||
*/
|
||||
public void setTimeUncertaintyInNs(double timeUncertaintyInNs) {
|
||||
public void setTimeUncertaintyNanos(double timeUncertaintyNanos) {
|
||||
setFlag(HAS_TIME_UNCERTAINTY);
|
||||
mTimeUncertaintyInNs = timeUncertaintyInNs;
|
||||
mTimeUncertaintyNanos = timeUncertaintyNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the clock's Time Uncertainty (1-Sigma) in nanoseconds.
|
||||
*/
|
||||
public void resetTimeUncertaintyInNs() {
|
||||
public void resetTimeUncertaintyNanos() {
|
||||
resetFlag(HAS_TIME_UNCERTAINTY);
|
||||
mTimeUncertaintyInNs = Double.NaN;
|
||||
mTimeUncertaintyNanos = Double.NaN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getFullBiasInNs()} is available, false otherwise.
|
||||
* Returns true if {@link #getFullBiasNanos()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasFullBiasInNs() {
|
||||
public boolean hasFullBiasNanos() {
|
||||
return isFlagSet(HAS_FULL_BIAS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the difference between hardware clock ({@link #getTimeInNs()}) inside GPS receiver and
|
||||
* Gets the difference between hardware clock ({@link #getTimeNanos()}) inside GPS receiver and
|
||||
* the true GPS time since 0000Z, January 6, 1980, in nanoseconds.
|
||||
*
|
||||
* This value is available if the receiver has estimated GPS time. If the computed time is for a
|
||||
* non-GPS constellation, the time offset of that constellation to GPS has to be applied to fill
|
||||
* this value. The value contains the 'bias uncertainty' {@link #getBiasUncertaintyInNs()} in
|
||||
* this value. The value contains the 'bias uncertainty' {@link #getBiasUncertaintyNanos()} in
|
||||
* it, and it should be used for quality check. The value is only available if
|
||||
* {@link #hasFullBiasInNs()} is true.
|
||||
* {@link #hasFullBiasNanos()} is true.
|
||||
*
|
||||
* The sign of the value is defined by the following equation:
|
||||
* local estimate of GPS time = time_ns + (full_bias_ns + bias_ns)
|
||||
*/
|
||||
public long getFullBiasInNs() {
|
||||
return mFullBiasInNs;
|
||||
public long getFullBiasNanos() {
|
||||
return mFullBiasNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the full bias in nanoseconds.
|
||||
*/
|
||||
public void setFullBiasInNs(long value) {
|
||||
public void setFullBiasNanos(long value) {
|
||||
setFlag(HAS_FULL_BIAS);
|
||||
mFullBiasInNs = value;
|
||||
mFullBiasNanos = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the full bias in nanoseconds.
|
||||
*/
|
||||
public void resetFullBiasInNs() {
|
||||
public void resetFullBiasNanos() {
|
||||
resetFlag(HAS_FULL_BIAS);
|
||||
mFullBiasInNs = Long.MIN_VALUE;
|
||||
mFullBiasNanos = Long.MIN_VALUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getBiasInNs()} is available, false otherwise.
|
||||
* Returns true if {@link #getBiasNanos()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasBiasInNs() {
|
||||
public boolean hasBiasNanos() {
|
||||
return isFlagSet(HAS_BIAS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the clock's sub-nanosecond bias.
|
||||
* The reported bias includes {@link #getBiasUncertaintyInNs()}.
|
||||
* The reported bias includes {@link #getBiasUncertaintyNanos()}.
|
||||
*
|
||||
* The value is only available if {@link #hasBiasInNs()} is true.
|
||||
* The value is only available if {@link #hasBiasNanos()} is true.
|
||||
*/
|
||||
public double getBiasInNs() {
|
||||
return mBiasInNs;
|
||||
public double getBiasNanos() {
|
||||
return mBiasNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sub-nanosecond bias.
|
||||
*/
|
||||
public void setBiasInNs(double biasInNs) {
|
||||
public void setBiasNanos(double biasNanos) {
|
||||
setFlag(HAS_BIAS);
|
||||
mBiasInNs = biasInNs;
|
||||
mBiasNanos = biasNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the clock's Bias in nanoseconds.
|
||||
*/
|
||||
public void resetBiasInNs() {
|
||||
public void resetBiasNanos() {
|
||||
resetFlag(HAS_BIAS);
|
||||
mBiasInNs = Double.NaN;
|
||||
mBiasNanos = Double.NaN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getBiasUncertaintyInNs()} is available, false otherwise.
|
||||
* Returns true if {@link #getBiasUncertaintyNanos()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasBiasUncertaintyInNs() {
|
||||
public boolean hasBiasUncertaintyNanos() {
|
||||
return isFlagSet(HAS_BIAS_UNCERTAINTY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.
|
||||
*
|
||||
* The value is only available if {@link #hasBiasUncertaintyInNs()} is true.
|
||||
* The value is only available if {@link #hasBiasUncertaintyNanos()} is true.
|
||||
*/
|
||||
public double getBiasUncertaintyInNs() {
|
||||
return mBiasUncertaintyInNs;
|
||||
public double getBiasUncertaintyNanos() {
|
||||
return mBiasUncertaintyNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.
|
||||
*/
|
||||
public void setBiasUncertaintyInNs(double biasUncertaintyInNs) {
|
||||
public void setBiasUncertaintyNanos(double biasUncertaintyNanos) {
|
||||
setFlag(HAS_BIAS_UNCERTAINTY);
|
||||
mBiasUncertaintyInNs = biasUncertaintyInNs;
|
||||
mBiasUncertaintyNanos = biasUncertaintyNanos;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.
|
||||
*/
|
||||
public void resetBiasUncertaintyInNs() {
|
||||
public void resetBiasUncertaintyNanos() {
|
||||
resetFlag(HAS_BIAS_UNCERTAINTY);
|
||||
mBiasUncertaintyInNs = Double.NaN;
|
||||
mBiasUncertaintyNanos = Double.NaN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getDriftInNsPerSec()} is available, false otherwise.
|
||||
* Returns true if {@link #getDriftNanosPerSecond()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasDriftInNsPerSec() {
|
||||
public boolean hasDriftNanosPerSecond() {
|
||||
return isFlagSet(HAS_DRIFT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the clock's Drift in nanoseconds per second.
|
||||
* A positive value indicates that the frequency is higher than the nominal frequency.
|
||||
* The reported drift includes {@link #getDriftUncertaintyInNsPerSec()}.
|
||||
* The reported drift includes {@link #getDriftUncertaintyNanosPerSecond()}.
|
||||
*
|
||||
* The value is only available if {@link #hasDriftInNsPerSec()} is true.
|
||||
* The value is only available if {@link #hasDriftNanosPerSecond()} is true.
|
||||
*/
|
||||
public double getDriftInNsPerSec() {
|
||||
return mDriftInNsPerSec;
|
||||
public double getDriftNanosPerSecond() {
|
||||
return mDriftNanosPerSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clock's Drift in nanoseconds per second.
|
||||
*/
|
||||
public void setDriftInNsPerSec(double driftInNsPerSec) {
|
||||
public void setDriftNanosPerSecond(double driftNanosPerSecond) {
|
||||
setFlag(HAS_DRIFT);
|
||||
mDriftInNsPerSec = driftInNsPerSec;
|
||||
mDriftNanosPerSecond = driftNanosPerSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the clock's Drift in nanoseconds per second.
|
||||
*/
|
||||
public void resetDriftInNsPerSec() {
|
||||
public void resetDriftNanosPerSecond() {
|
||||
resetFlag(HAS_DRIFT);
|
||||
mDriftInNsPerSec = Double.NaN;
|
||||
mDriftNanosPerSecond = Double.NaN;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if {@link #getDriftUncertaintyInNsPerSec()} is available, false otherwise.
|
||||
* Returns true if {@link #getDriftUncertaintyNanosPerSecond()} is available, false otherwise.
|
||||
*/
|
||||
public boolean hasDriftUncertaintyInNsPerSec() {
|
||||
public boolean hasDriftUncertaintyNanosPerSecond() {
|
||||
return isFlagSet(HAS_DRIFT_UNCERTAINTY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.
|
||||
*
|
||||
* The value is only available if {@link #hasDriftUncertaintyInNsPerSec()} is true.
|
||||
* The value is only available if {@link #hasDriftUncertaintyNanosPerSecond()} is true.
|
||||
*/
|
||||
public double getDriftUncertaintyInNsPerSec() {
|
||||
return mDriftUncertaintyInNsPerSec;
|
||||
public double getDriftUncertaintyNanosPerSecond() {
|
||||
return mDriftUncertaintyNanosPerSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.
|
||||
*/
|
||||
public void setDriftUncertaintyInNsPerSec(double driftUncertaintyInNsPerSec) {
|
||||
public void setDriftUncertaintyNanosPerSecond(double driftUncertaintyNanosPerSecond) {
|
||||
setFlag(HAS_DRIFT_UNCERTAINTY);
|
||||
mDriftUncertaintyInNsPerSec = driftUncertaintyInNsPerSec;
|
||||
mDriftUncertaintyNanosPerSecond = driftUncertaintyNanosPerSecond;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -347,9 +347,9 @@ public final class GnssClock implements Parcelable {
|
||||
/**
|
||||
* Resets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.
|
||||
*/
|
||||
public void resetDriftUncertaintyInNsPerSec() {
|
||||
public void resetDriftUncertaintyNanosPerSecond() {
|
||||
resetFlag(HAS_DRIFT_UNCERTAINTY);
|
||||
mDriftUncertaintyInNsPerSec = Double.NaN;
|
||||
mDriftUncertaintyNanosPerSecond = Double.NaN;
|
||||
}
|
||||
|
||||
public static final Creator<GnssClock> CREATOR = new Creator<GnssClock>() {
|
||||
@@ -357,15 +357,15 @@ public final class GnssClock implements Parcelable {
|
||||
public GnssClock createFromParcel(Parcel parcel) {
|
||||
GnssClock gpsClock = new GnssClock();
|
||||
|
||||
gpsClock.mFlags = (short) parcel.readInt();
|
||||
gpsClock.mLeapSecond = (short) parcel.readInt();
|
||||
gpsClock.mTimeInNs = parcel.readLong();
|
||||
gpsClock.mTimeUncertaintyInNs = parcel.readDouble();
|
||||
gpsClock.mFullBiasInNs = parcel.readLong();
|
||||
gpsClock.mBiasInNs = parcel.readDouble();
|
||||
gpsClock.mBiasUncertaintyInNs = parcel.readDouble();
|
||||
gpsClock.mDriftInNsPerSec = parcel.readDouble();
|
||||
gpsClock.mDriftUncertaintyInNsPerSec = parcel.readDouble();
|
||||
gpsClock.mFlags = parcel.readInt();
|
||||
gpsClock.mLeapSecond = parcel.readInt();
|
||||
gpsClock.mTimeNanos = parcel.readLong();
|
||||
gpsClock.mTimeUncertaintyNanos = parcel.readDouble();
|
||||
gpsClock.mFullBiasNanos = parcel.readLong();
|
||||
gpsClock.mBiasNanos = parcel.readDouble();
|
||||
gpsClock.mBiasUncertaintyNanos = parcel.readDouble();
|
||||
gpsClock.mDriftNanosPerSecond = parcel.readDouble();
|
||||
gpsClock.mDriftUncertaintyNanosPerSecond = parcel.readDouble();
|
||||
gpsClock.mHardwareClockDiscontinuityCount = parcel.readInt();
|
||||
|
||||
return gpsClock;
|
||||
@@ -381,13 +381,13 @@ public final class GnssClock implements Parcelable {
|
||||
public void writeToParcel(Parcel parcel, int flags) {
|
||||
parcel.writeInt(mFlags);
|
||||
parcel.writeInt(mLeapSecond);
|
||||
parcel.writeLong(mTimeInNs);
|
||||
parcel.writeDouble(mTimeUncertaintyInNs);
|
||||
parcel.writeLong(mFullBiasInNs);
|
||||
parcel.writeDouble(mBiasInNs);
|
||||
parcel.writeDouble(mBiasUncertaintyInNs);
|
||||
parcel.writeDouble(mDriftInNsPerSec);
|
||||
parcel.writeDouble(mDriftUncertaintyInNsPerSec);
|
||||
parcel.writeLong(mTimeNanos);
|
||||
parcel.writeDouble(mTimeUncertaintyNanos);
|
||||
parcel.writeLong(mFullBiasNanos);
|
||||
parcel.writeDouble(mBiasNanos);
|
||||
parcel.writeDouble(mBiasUncertaintyNanos);
|
||||
parcel.writeDouble(mDriftNanosPerSecond);
|
||||
parcel.writeDouble(mDriftUncertaintyNanosPerSecond);
|
||||
parcel.writeInt(mHardwareClockDiscontinuityCount);
|
||||
}
|
||||
|
||||
@@ -406,29 +406,29 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
builder.append(String.format(
|
||||
formatWithUncertainty,
|
||||
"TimeInNs",
|
||||
mTimeInNs,
|
||||
"TimeUncertaintyInNs",
|
||||
hasTimeUncertaintyInNs() ? mTimeUncertaintyInNs : null));
|
||||
"TimeNanos",
|
||||
mTimeNanos,
|
||||
"TimeUncertaintyNanos",
|
||||
hasTimeUncertaintyNanos() ? mTimeUncertaintyNanos : null));
|
||||
|
||||
builder.append(String.format(
|
||||
format,
|
||||
"FullBiasInNs",
|
||||
hasFullBiasInNs() ? mFullBiasInNs : null));
|
||||
"FullBiasNanos",
|
||||
hasFullBiasNanos() ? mFullBiasNanos : null));
|
||||
|
||||
builder.append(String.format(
|
||||
formatWithUncertainty,
|
||||
"BiasInNs",
|
||||
hasBiasInNs() ? mBiasInNs : null,
|
||||
"BiasUncertaintyInNs",
|
||||
hasBiasUncertaintyInNs() ? mBiasUncertaintyInNs : null));
|
||||
"BiasNanos",
|
||||
hasBiasNanos() ? mBiasNanos : null,
|
||||
"BiasUncertaintyNanos",
|
||||
hasBiasUncertaintyNanos() ? mBiasUncertaintyNanos : null));
|
||||
|
||||
builder.append(String.format(
|
||||
formatWithUncertainty,
|
||||
"DriftInNsPerSec",
|
||||
hasDriftInNsPerSec() ? mDriftInNsPerSec : null,
|
||||
"DriftUncertaintyInNsPerSec",
|
||||
hasDriftUncertaintyInNsPerSec() ? mDriftUncertaintyInNsPerSec : null));
|
||||
"DriftNanosPerSecond",
|
||||
hasDriftNanosPerSecond() ? mDriftNanosPerSecond : null,
|
||||
"DriftUncertaintyNanosPerSecond",
|
||||
hasDriftUncertaintyNanosPerSecond() ? mDriftUncertaintyNanosPerSecond : null));
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
@@ -436,25 +436,25 @@ public final class GnssClock implements Parcelable {
|
||||
private void initialize() {
|
||||
mFlags = HAS_NO_FLAGS;
|
||||
resetLeapSecond();
|
||||
setTimeInNs(Long.MIN_VALUE);
|
||||
resetTimeUncertaintyInNs();
|
||||
resetFullBiasInNs();
|
||||
resetBiasInNs();
|
||||
resetBiasUncertaintyInNs();
|
||||
resetDriftInNsPerSec();
|
||||
resetDriftUncertaintyInNsPerSec();
|
||||
setTimeNanos(Long.MIN_VALUE);
|
||||
resetTimeUncertaintyNanos();
|
||||
resetFullBiasNanos();
|
||||
resetBiasNanos();
|
||||
resetBiasUncertaintyNanos();
|
||||
resetDriftNanosPerSecond();
|
||||
resetDriftUncertaintyNanosPerSecond();
|
||||
setHardwareClockDiscontinuityCount(Integer.MIN_VALUE);
|
||||
}
|
||||
|
||||
private void setFlag(short flag) {
|
||||
private void setFlag(int flag) {
|
||||
mFlags |= flag;
|
||||
}
|
||||
|
||||
private void resetFlag(short flag) {
|
||||
private void resetFlag(int flag) {
|
||||
mFlags &= ~flag;
|
||||
}
|
||||
|
||||
private boolean isFlagSet(short flag) {
|
||||
private boolean isFlagSet(int flag) {
|
||||
return (mFlags & flag) == flag;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,46 +33,46 @@ import java.util.Collections;
|
||||
* Events are delivered to registered instances of {@link Callback}.
|
||||
*/
|
||||
public final class GnssMeasurementsEvent implements Parcelable {
|
||||
/** The status of GPS measurements event. */
|
||||
/** The status of GNSS measurements event. */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({STATUS_NOT_SUPPORTED, STATUS_READY, STATUS_GPS_LOCATION_DISABLED})
|
||||
@IntDef({STATUS_NOT_SUPPORTED, STATUS_READY, STATUS_GNSS_LOCATION_DISABLED})
|
||||
public @interface GnssMeasurementsStatus {}
|
||||
|
||||
/**
|
||||
* The system does not support tracking of GPS Measurements. This status will not change in the
|
||||
* The system does not support tracking of GNSS Measurements. This status will not change in the
|
||||
* future.
|
||||
*/
|
||||
public static final int STATUS_NOT_SUPPORTED = 0;
|
||||
|
||||
/**
|
||||
* GPS Measurements are successfully being tracked, it will receive updates once they are
|
||||
* GNSS Measurements are successfully being tracked, it will receive updates once they are
|
||||
* available.
|
||||
*/
|
||||
public static final int STATUS_READY = 1;
|
||||
|
||||
/**
|
||||
* GPS provider or Location is disabled, updates will not be received until they are enabled.
|
||||
* GNSS provider or Location is disabled, updates will not be received until they are enabled.
|
||||
*/
|
||||
public static final int STATUS_GPS_LOCATION_DISABLED = 2;
|
||||
public static final int STATUS_GNSS_LOCATION_DISABLED = 2;
|
||||
|
||||
private final GnssClock mClock;
|
||||
private final Collection<GnssMeasurement> mReadOnlyMeasurements;
|
||||
|
||||
/**
|
||||
* Used for receiving GPS satellite measurements from the GPS engine.
|
||||
* Used for receiving GNSS satellite measurements from the GNSS engine.
|
||||
* Each measurement contains raw and computed data identifying a satellite.
|
||||
* You can implement this interface and call
|
||||
* {@link LocationManager#registerGnssMeasurementCallback}.
|
||||
* {@link LocationManager#registerGnssMeasurementsCallback}.
|
||||
*/
|
||||
public static abstract class Callback {
|
||||
|
||||
/**
|
||||
* Returns the latest collected GPS Measurements.
|
||||
* Reports the latest collected GNSS Measurements.
|
||||
*/
|
||||
public void onGnssMeasurementsReceived(GnssMeasurementsEvent eventArgs) {}
|
||||
|
||||
/**
|
||||
* Returns the latest status of the GPS Measurements sub-system.
|
||||
* Reports the latest status of the GNSS Measurements sub-system.
|
||||
*/
|
||||
public void onStatusChanged(@GnssMeasurementsStatus int status) {}
|
||||
}
|
||||
|
||||
@@ -34,58 +34,57 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/** The type of the GPS Clock. */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({MESSAGE_TYPE_UNKNOWN, MESSAGE_TYPE_GPS_L1CA, MESSAGE_TYPE_GPS_L2CNAV,
|
||||
MESSAGE_TYPE_GPS_L5CNAV, MESSAGE_TYPE_GPS_CNAV2, MESSAGE_TYPE_GLO_L1CA, MESSAGE_TYPE_BDS_D1,
|
||||
MESSAGE_TYPE_BDS_D2, MESSAGE_TYPE_GAL_I, MESSAGE_TYPE_GAL_F})
|
||||
@IntDef({TYPE_UNKNOWN, TYPE_GPS_L1CA, TYPE_GPS_L2CNAV, TYPE_GPS_L5CNAV, TYPE_GPS_CNAV2,
|
||||
TYPE_GLO_L1CA, TYPE_BDS_D1, TYPE_BDS_D2, TYPE_GAL_I, TYPE_GAL_F})
|
||||
public @interface GnssNavigationMessageType {}
|
||||
|
||||
// The following enumerations must be in sync with the values declared in gps.h
|
||||
|
||||
/** Message type unknown */
|
||||
public static final short MESSAGE_TYPE_UNKNOWN = 0;
|
||||
public static final int TYPE_UNKNOWN = 0;
|
||||
/** GPS L1 C/A message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GPS_L1CA = 0x0101;
|
||||
public static final int TYPE_GPS_L1CA = 0x0101;
|
||||
/** GPS L2-CNAV message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GPS_L2CNAV = 0x0102;
|
||||
public static final int TYPE_GPS_L2CNAV = 0x0102;
|
||||
/** GPS L5-CNAV message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GPS_L5CNAV = 0x0103;
|
||||
public static final int TYPE_GPS_L5CNAV = 0x0103;
|
||||
/** GPS CNAV-2 message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GPS_CNAV2 = 0x0104;
|
||||
public static final int TYPE_GPS_CNAV2 = 0x0104;
|
||||
/** Glonass L1 CA message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GLO_L1CA = 0x0301;
|
||||
public static final int TYPE_GLO_L1CA = 0x0301;
|
||||
/** Beidou D1 message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_BDS_D1 = 0x0501;
|
||||
public static final int TYPE_BDS_D1 = 0x0501;
|
||||
/** Beidou D2 message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_BDS_D2 = 0x0502;
|
||||
public static final int TYPE_BDS_D2 = 0x0502;
|
||||
/** Galileo I/NAV message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GAL_I = 0x0601;
|
||||
public static final int TYPE_GAL_I = 0x0601;
|
||||
/** Galileo F/NAV message contained in the structure. */
|
||||
public static final short MESSAGE_TYPE_GAL_F = 0x0602;
|
||||
public static final int TYPE_GAL_F = 0x0602;
|
||||
|
||||
/**
|
||||
* The Navigation Message Status is 'unknown'.
|
||||
*/
|
||||
public static final short STATUS_UNKNOWN = 0;
|
||||
public static final int STATUS_UNKNOWN = 0;
|
||||
|
||||
/**
|
||||
* The Navigation Message was received without any parity error in its navigation words.
|
||||
*/
|
||||
public static final short STATUS_PARITY_PASSED = (1<<0);
|
||||
public static final int STATUS_PARITY_PASSED = (1<<0);
|
||||
|
||||
/**
|
||||
* The Navigation Message was received with words that failed parity check, but the receiver was
|
||||
* able to correct those words.
|
||||
*/
|
||||
public static final short STATUS_PARITY_REBUILT = (1<<1);
|
||||
public static final int STATUS_PARITY_REBUILT = (1<<1);
|
||||
|
||||
// End enumerations in sync with gps.h
|
||||
|
||||
private short mType;
|
||||
private short mSvid;
|
||||
private short mMessageId;
|
||||
private short mSubmessageId;
|
||||
private int mType;
|
||||
private int mSvid;
|
||||
private int mMessageId;
|
||||
private int mSubmessageId;
|
||||
private byte[] mData;
|
||||
private short mStatus;
|
||||
private int mStatus;
|
||||
|
||||
GnssNavigationMessage() {
|
||||
initialize();
|
||||
@@ -114,14 +113,14 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
* Gets the type of the navigation message contained in the object.
|
||||
*/
|
||||
@GnssNavigationMessageType
|
||||
public short getType() {
|
||||
public int getType() {
|
||||
return mType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of the navigation message.
|
||||
*/
|
||||
public void setType(@GnssNavigationMessageType short value) {
|
||||
public void setType(@GnssNavigationMessageType int value) {
|
||||
mType = value;
|
||||
}
|
||||
|
||||
@@ -131,25 +130,25 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
*/
|
||||
private String getTypeString() {
|
||||
switch (mType) {
|
||||
case MESSAGE_TYPE_UNKNOWN:
|
||||
case TYPE_UNKNOWN:
|
||||
return "Unknown";
|
||||
case MESSAGE_TYPE_GPS_L1CA:
|
||||
case TYPE_GPS_L1CA:
|
||||
return "GPS L1 C/A";
|
||||
case MESSAGE_TYPE_GPS_L2CNAV:
|
||||
case TYPE_GPS_L2CNAV:
|
||||
return "GPS L2-CNAV";
|
||||
case MESSAGE_TYPE_GPS_L5CNAV:
|
||||
case TYPE_GPS_L5CNAV:
|
||||
return "GPS L5-CNAV";
|
||||
case MESSAGE_TYPE_GPS_CNAV2:
|
||||
case TYPE_GPS_CNAV2:
|
||||
return "GPS CNAV2";
|
||||
case MESSAGE_TYPE_GLO_L1CA:
|
||||
case TYPE_GLO_L1CA:
|
||||
return "Glonass L1 C/A";
|
||||
case MESSAGE_TYPE_BDS_D1:
|
||||
case TYPE_BDS_D1:
|
||||
return "Beidou D1";
|
||||
case MESSAGE_TYPE_BDS_D2:
|
||||
case TYPE_BDS_D2:
|
||||
return "Beidou D2";
|
||||
case MESSAGE_TYPE_GAL_I:
|
||||
case TYPE_GAL_I:
|
||||
return "Galileo I";
|
||||
case MESSAGE_TYPE_GAL_F:
|
||||
case TYPE_GAL_F:
|
||||
return "Galileo F";
|
||||
default:
|
||||
return "<Invalid:" + mType + ">";
|
||||
@@ -160,14 +159,14 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
* Gets the Pseudo-random number.
|
||||
* Range: [1, 32].
|
||||
*/
|
||||
public short getSvid() {
|
||||
public int getSvid() {
|
||||
return mSvid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Pseud-random number.
|
||||
*/
|
||||
public void setSvid(short value) {
|
||||
public void setSvid(int value) {
|
||||
mSvid = value;
|
||||
}
|
||||
|
||||
@@ -177,14 +176,14 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
* subframe 4 and 5, this value corresponds to the 'frame id' of the navigation message.
|
||||
* Subframe 1, 2, 3 does not contain a 'frame id' and this might be reported as -1.
|
||||
*/
|
||||
public short getMessageId() {
|
||||
public int getMessageId() {
|
||||
return mMessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Message Identifier.
|
||||
*/
|
||||
public void setMessageId(short value) {
|
||||
public void setMessageId(int value) {
|
||||
mMessageId = value;
|
||||
}
|
||||
|
||||
@@ -194,14 +193,14 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
* (or frame) that is being transmitted. i.e. for L1 C/A the sub-message identifier corresponds
|
||||
* to the sub-frame Id of the navigation message.
|
||||
*/
|
||||
public short getSubmessageId() {
|
||||
public int getSubmessageId() {
|
||||
return mSubmessageId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Sub-message identifier.
|
||||
*/
|
||||
public void setSubmessageId(short value) {
|
||||
public void setSubmessageId(int value) {
|
||||
mSubmessageId = value;
|
||||
}
|
||||
|
||||
@@ -228,14 +227,14 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
/**
|
||||
* Gets the Status of the navigation message contained in the object.
|
||||
*/
|
||||
public short getStatus() {
|
||||
public int getStatus() {
|
||||
return mStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status of the navigation message.
|
||||
*/
|
||||
public void setStatus(short value) {
|
||||
public void setStatus(int value) {
|
||||
mStatus = value;
|
||||
}
|
||||
|
||||
@@ -262,10 +261,10 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
public GnssNavigationMessage createFromParcel(Parcel parcel) {
|
||||
GnssNavigationMessage navigationMessage = new GnssNavigationMessage();
|
||||
|
||||
navigationMessage.setType((short) parcel.readInt());
|
||||
navigationMessage.setSvid((short) parcel.readInt());
|
||||
navigationMessage.setMessageId((short) parcel.readInt());
|
||||
navigationMessage.setSubmessageId((short) parcel.readInt());
|
||||
navigationMessage.setType(parcel.readInt());
|
||||
navigationMessage.setSvid(parcel.readInt());
|
||||
navigationMessage.setMessageId(parcel.readInt());
|
||||
navigationMessage.setSubmessageId(parcel.readInt());
|
||||
|
||||
int dataLength = parcel.readInt();
|
||||
byte[] data = new byte[dataLength];
|
||||
@@ -274,7 +273,7 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
if (parcel.dataAvail() >= Integer.SIZE) {
|
||||
int status = parcel.readInt();
|
||||
navigationMessage.setStatus((short) status);
|
||||
navigationMessage.setStatus(status);
|
||||
} else {
|
||||
navigationMessage.setStatus(STATUS_UNKNOWN);
|
||||
}
|
||||
@@ -328,7 +327,7 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
mType = MESSAGE_TYPE_UNKNOWN;
|
||||
mType = TYPE_UNKNOWN;
|
||||
mSvid = 0;
|
||||
mMessageId = -1;
|
||||
mSubmessageId = -1;
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.security.InvalidParameterException;
|
||||
public final class GnssNavigationMessageEvent implements Parcelable {
|
||||
/** The status of GPS measurements event. */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({STATUS_NOT_SUPPORTED, STATUS_READY, STATUS_GPS_LOCATION_DISABLED})
|
||||
@IntDef({STATUS_NOT_SUPPORTED, STATUS_READY, STATUS_GNSS_LOCATION_DISABLED})
|
||||
public @interface GnssNavigationMessageStatus {}
|
||||
|
||||
/**
|
||||
@@ -50,7 +50,7 @@ public final class GnssNavigationMessageEvent implements Parcelable {
|
||||
/**
|
||||
* GPS provider or Location is disabled, updated will not be received until they are enabled.
|
||||
*/
|
||||
public static final int STATUS_GPS_LOCATION_DISABLED = 2;
|
||||
public static final int STATUS_GNSS_LOCATION_DISABLED = 2;
|
||||
|
||||
private final GnssNavigationMessage mNavigationMessage;
|
||||
|
||||
|
||||
@@ -27,19 +27,19 @@ import java.lang.annotation.RetentionPolicy;
|
||||
*/
|
||||
public final class GnssStatus {
|
||||
/** Unknown constellation type. */
|
||||
public static final byte CONSTELLATION_UNKNOWN = 0;
|
||||
public static final int CONSTELLATION_UNKNOWN = 0;
|
||||
/** Constellation type constant for GPS. */
|
||||
public static final byte CONSTELLATION_GPS = 1;
|
||||
public static final int CONSTELLATION_GPS = 1;
|
||||
/** Constellation type constant for SBAS. */
|
||||
public static final byte CONSTELLATION_SBAS = 2;
|
||||
public static final int CONSTELLATION_SBAS = 2;
|
||||
/** Constellation type constant for Glonass. */
|
||||
public static final byte CONSTELLATION_GLONASS = 3;
|
||||
public static final int CONSTELLATION_GLONASS = 3;
|
||||
/** Constellation type constant for QZSS. */
|
||||
public static final byte CONSTELLATION_QZSS = 4;
|
||||
public static final int CONSTELLATION_QZSS = 4;
|
||||
/** Constellation type constant for Beidou. */
|
||||
public static final byte CONSTELLATION_BEIDOU = 5;
|
||||
public static final int CONSTELLATION_BEIDOU = 5;
|
||||
/** Constellation type constant for Galileo. */
|
||||
public static final byte CONSTELLATION_GALILEO = 6;
|
||||
public static final int CONSTELLATION_GALILEO = 6;
|
||||
|
||||
/** Constellation type. */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@@ -66,16 +66,16 @@ public final class GnssStatus {
|
||||
|
||||
/* These package private values are modified by the LocationManager class */
|
||||
/* package */ int[] mSvidWithFlags;
|
||||
/* package */ float[] mSnrs;
|
||||
/* package */ float[] mCn0DbHz;
|
||||
/* package */ float[] mElevations;
|
||||
/* package */ float[] mAzimuths;
|
||||
/* package */ int mSvCount;
|
||||
|
||||
GnssStatus(int svCount, int[] svidWithFlags, float[] snrs, float[] elevations,
|
||||
GnssStatus(int svCount, int[] svidWithFlags, float[] cn0s, float[] elevations,
|
||||
float[] azimuths) {
|
||||
mSvCount = svCount;
|
||||
mSvidWithFlags = svidWithFlags;
|
||||
mSnrs = snrs;
|
||||
mCn0DbHz = cn0s;
|
||||
mElevations = elevations;
|
||||
mAzimuths = azimuths;
|
||||
}
|
||||
@@ -92,8 +92,8 @@ public final class GnssStatus {
|
||||
* @param satIndex the index of the satellite in the list.
|
||||
*/
|
||||
@ConstellationType
|
||||
public byte getConstellationType(int satIndex) {
|
||||
return (byte) ((mSvidWithFlags[satIndex] >> CONSTELLATION_TYPE_SHIFT_WIDTH)
|
||||
public int getConstellationType(int satIndex) {
|
||||
return ((mSvidWithFlags[satIndex] >> CONSTELLATION_TYPE_SHIFT_WIDTH)
|
||||
& CONSTELLATION_TYPE_MASK);
|
||||
}
|
||||
|
||||
@@ -109,15 +109,15 @@ public final class GnssStatus {
|
||||
* Retrieves the signal-noise ration of the satellite at the specified position.
|
||||
* @param satIndex the index of the satellite in the list.
|
||||
*/
|
||||
public float getSnr(int satIndex) {
|
||||
return mSnrs[satIndex];
|
||||
public float getCn0DbHz(int satIndex) {
|
||||
return mCn0DbHz[satIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the elevation of the satellite at the specified position.
|
||||
* @param satIndex the index of the satellite in the list.
|
||||
*/
|
||||
public float getElevation(int satIndex) {
|
||||
public float getElevationDegrees(int satIndex) {
|
||||
return 0f;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public final class GnssStatus {
|
||||
* Retrieves the azimuth the satellite at the specified position.
|
||||
* @param satIndex the index of the satellite in the list.
|
||||
*/
|
||||
public float getAzimuth(int satIndex) {
|
||||
public float getAzimuthDegrees(int satIndex) {
|
||||
return mAzimuths[satIndex];
|
||||
}
|
||||
|
||||
|
||||
@@ -32,13 +32,13 @@ public abstract class GnssStatusCallback {
|
||||
|
||||
/**
|
||||
* Called when the GNSS system has received its first fix since starting.
|
||||
* @param ttff the time from start to first fix.
|
||||
* @param ttffMillis the time from start to first fix in milliseconds.
|
||||
*/
|
||||
public void onFirstFix(int ttff) {}
|
||||
public void onFirstFix(int ttffMillis) {}
|
||||
|
||||
/**
|
||||
* Called periodically to report GNSS satellite status.
|
||||
* @param status the current status of all satellites.
|
||||
*/
|
||||
public void onSatelliteStatusChanged(GnssStatus status) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public final class GpsStatus {
|
||||
// For API-compat a public ctor() is not available
|
||||
GpsStatus() {}
|
||||
|
||||
private void setStatus(int svCount, int[] svidWithFlags, float[] snrs, float[] elevations,
|
||||
private void setStatus(int svCount, int[] svidWithFlags, float[] cn0s, float[] elevations,
|
||||
float[] azimuths) {
|
||||
clearSatellites();
|
||||
for (int i = 0; i < svCount; i++) {
|
||||
@@ -158,7 +158,7 @@ public final class GpsStatus {
|
||||
}
|
||||
|
||||
satellite.mValid = true;
|
||||
satellite.mSnr = snrs[i];
|
||||
satellite.mSnr = cn0s[i];
|
||||
satellite.mElevation = elevations[i];
|
||||
satellite.mAzimuth = azimuths[i];
|
||||
satellite.mHasEphemeris =
|
||||
@@ -179,7 +179,7 @@ public final class GpsStatus {
|
||||
*/
|
||||
void setStatus(GnssStatus status, int timeToFirstFix) {
|
||||
mTimeToFirstFix = timeToFirstFix;
|
||||
setStatus(status.mSvCount, status.mSvidWithFlags, status.mSnrs, status.mElevations,
|
||||
setStatus(status.mSvCount, status.mSvidWithFlags, status.mCn0DbHz, status.mElevations,
|
||||
status.mAzimuths);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ oneway interface IGnssStatusListener
|
||||
void onGnssStarted();
|
||||
void onGnssStopped();
|
||||
void onFirstFix(int ttff);
|
||||
void onSvStatusChanged(int svCount, in int[] svidWithFlags, in float[] snrs,
|
||||
void onSvStatusChanged(int svCount, in int[] svidWithFlags, in float[] cn0s,
|
||||
in float[] elevations, in float[] azimuths);
|
||||
void onNmeaReceived(long timestamp, String nmea);
|
||||
}
|
||||
|
||||
@@ -1554,9 +1554,9 @@ public class LocationManager {
|
||||
|
||||
@Override
|
||||
public void onSvStatusChanged(int svCount, int[] prnWithFlags,
|
||||
float[] snrs, float[] elevations, float[] azimuths) {
|
||||
float[] cn0s, float[] elevations, float[] azimuths) {
|
||||
if (mGnssCallback != null) {
|
||||
mGnssStatus = new GnssStatus(svCount, prnWithFlags, snrs, elevations, azimuths);
|
||||
mGnssStatus = new GnssStatus(svCount, prnWithFlags, cn0s, elevations, azimuths);
|
||||
|
||||
Message msg = Message.obtain();
|
||||
msg.what = GpsStatus.GPS_EVENT_SATELLITE_STATUS;
|
||||
@@ -1805,7 +1805,7 @@ public class LocationManager {
|
||||
|
||||
/**
|
||||
* No-op method to keep backward-compatibility.
|
||||
* Don't use it. Use {@link #registerGnssMeasurementCallback} instead.
|
||||
* Don't use it. Use {@link #registerGnssMeasurementsCallback} instead.
|
||||
* @hide
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -1822,8 +1822,8 @@ public class LocationManager {
|
||||
* @return {@code true} if the callback was added successfully, {@code false} otherwise.
|
||||
*/
|
||||
@RequiresPermission(ACCESS_FINE_LOCATION)
|
||||
public boolean registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) {
|
||||
return registerGnssMeasurementCallback(callback, null);
|
||||
public boolean registerGnssMeasurementsCallback(GnssMeasurementsEvent.Callback callback) {
|
||||
return registerGnssMeasurementsCallback(callback, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1834,14 +1834,14 @@ public class LocationManager {
|
||||
* @return {@code true} if the callback was added successfully, {@code false} otherwise.
|
||||
*/
|
||||
@RequiresPermission(ACCESS_FINE_LOCATION)
|
||||
public boolean registerGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback,
|
||||
public boolean registerGnssMeasurementsCallback(GnssMeasurementsEvent.Callback callback,
|
||||
Handler handler) {
|
||||
return mGnssMeasurementCallbackTransport.add(callback, handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* No-op method to keep backward-compatibility.
|
||||
* Don't use it. Use {@link #unregisterGnssMeasurementCallback} instead.
|
||||
* Don't use it. Use {@link #unregisterGnssMeasurementsCallback} instead.
|
||||
* @hide
|
||||
* @deprecated
|
||||
*/
|
||||
@@ -1855,7 +1855,7 @@ public class LocationManager {
|
||||
*
|
||||
* @param callback a {@link GnssMeasurementsEvent.Callback} object to remove.
|
||||
*/
|
||||
public void unregisterGnssMeasurementCallback(GnssMeasurementsEvent.Callback callback) {
|
||||
public void unregisterGnssMeasurementsCallback(GnssMeasurementsEvent.Callback callback) {
|
||||
mGnssMeasurementCallbackTransport.remove(callback);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class GpsStatusTest extends TestCase {
|
||||
private GpsStatus mStatus;
|
||||
private int mCount;
|
||||
private int[] mPrns;
|
||||
private float[] mSnrs;
|
||||
private float[] mCn0s;
|
||||
private float[] mElevations;
|
||||
private float[] mAzimuth;
|
||||
private int mEphemerisMask;
|
||||
@@ -179,7 +179,7 @@ public class GpsStatusTest extends TestCase {
|
||||
|
||||
private void verifySatellites(GpsStatus status) {
|
||||
verifySatelliteCount(status, mCount);
|
||||
verifySatellites(status, mCount, mPrns, mSnrs, mElevations, mAzimuth, mEphemerisMask,
|
||||
verifySatellites(status, mCount, mPrns, mCn0s, mElevations, mAzimuth, mEphemerisMask,
|
||||
mAlmanacMask, mUsedInFixMask);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public class GpsStatusTest extends TestCase {
|
||||
GpsStatus status,
|
||||
int count,
|
||||
int[] prns,
|
||||
float[] snrs,
|
||||
float[] cn0s,
|
||||
float[] elevations,
|
||||
float[] azimuth,
|
||||
int ephemerisMask,
|
||||
@@ -197,7 +197,7 @@ public class GpsStatusTest extends TestCase {
|
||||
int prn = prns[i];
|
||||
GpsSatellite satellite = getSatellite(status, prn);
|
||||
assertNotNull(getSatelliteAssertInfo(i, prn, "non-null"), satellite);
|
||||
assertEquals(getSatelliteAssertInfo(i, prn, "Snr"), snrs[i], satellite.getSnr());
|
||||
assertEquals(getSatelliteAssertInfo(i, prn, "Snr"), cn0s[i], satellite.getSnr());
|
||||
assertEquals(
|
||||
getSatelliteAssertInfo(i, prn, "Elevation"),
|
||||
elevations[i],
|
||||
@@ -247,7 +247,7 @@ public class GpsStatusTest extends TestCase {
|
||||
}
|
||||
|
||||
private void setSatellites(GpsStatus status) throws Exception {
|
||||
set(status, mCount, mPrns, mSnrs, mElevations, mAzimuth, mEphemerisMask, mAlmanacMask,
|
||||
set(status, mCount, mPrns, mCn0s, mElevations, mAzimuth, mEphemerisMask, mAlmanacMask,
|
||||
mUsedInFixMask);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ public class GpsStatusTest extends TestCase {
|
||||
GpsStatus status,
|
||||
int count,
|
||||
int[] prns,
|
||||
float[] snrs,
|
||||
float[] cn0s,
|
||||
float[] elevations,
|
||||
float[] azimuth,
|
||||
int ephemerisMask,
|
||||
@@ -279,7 +279,7 @@ public class GpsStatusTest extends TestCase {
|
||||
status,
|
||||
count,
|
||||
prns,
|
||||
snrs,
|
||||
cn0s,
|
||||
elevations,
|
||||
azimuth,
|
||||
ephemerisMask,
|
||||
@@ -333,7 +333,7 @@ public class GpsStatusTest extends TestCase {
|
||||
if (!reusePrns) {
|
||||
mPrns = generateIntArray(count);
|
||||
}
|
||||
mSnrs = generateFloatArray(count);
|
||||
mCn0s = generateFloatArray(count);
|
||||
mElevations = generateFloatArray(count);
|
||||
mAzimuth = generateFloatArray(count);
|
||||
mEphemerisMask = generateMask(mPrns);
|
||||
|
||||
@@ -1559,11 +1559,11 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
||||
* called from native code to update SV info
|
||||
*/
|
||||
private void reportSvStatus() {
|
||||
int svCount = native_read_sv_status(mSvidWithFlags, mSnrs, mSvElevations, mSvAzimuths);
|
||||
int svCount = native_read_sv_status(mSvidWithFlags, mCn0s, mSvElevations, mSvAzimuths);
|
||||
mListenerHelper.onSvStatusChanged(
|
||||
svCount,
|
||||
mSvidWithFlags,
|
||||
mSnrs,
|
||||
mCn0s,
|
||||
mSvElevations,
|
||||
mSvAzimuths);
|
||||
|
||||
@@ -1578,7 +1578,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
||||
}
|
||||
if (VERBOSE) {
|
||||
Log.v(TAG, "svid: " + (mSvidWithFlags[i] >> GnssStatus.SVID_SHIFT_WIDTH) +
|
||||
" snr: " + mSnrs[i]/10 +
|
||||
" cn0: " + mCn0s[i]/10 +
|
||||
" elev: " + mSvElevations[i] +
|
||||
" azimuth: " + mSvAzimuths[i] +
|
||||
((mSvidWithFlags[i] & GnssStatus.GNSS_SV_FLAGS_HAS_EPHEMERIS_DATA) == 0
|
||||
@@ -2402,7 +2402,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
||||
|
||||
// preallocated arrays, to avoid memory allocation in reportStatus()
|
||||
private int mSvidWithFlags[] = new int[MAX_SVS];
|
||||
private float mSnrs[] = new float[MAX_SVS];
|
||||
private float mCn0s[] = new float[MAX_SVS];
|
||||
private float mSvElevations[] = new float[MAX_SVS];
|
||||
private float mSvAzimuths[] = new float[MAX_SVS];
|
||||
private int mSvCount;
|
||||
@@ -2424,7 +2424,7 @@ public class GnssLocationProvider implements LocationProviderInterface {
|
||||
private native void native_delete_aiding_data(int flags);
|
||||
// returns number of SVs
|
||||
// mask[0] is ephemeris mask and mask[1] is almanac mask
|
||||
private native int native_read_sv_status(int[] prnWithFlags, float[] snrs, float[] elevations,
|
||||
private native int native_read_sv_status(int[] prnWithFlags, float[] cn0s, float[] elevations,
|
||||
float[] azimuths);
|
||||
private native int native_read_nmea(byte[] buffer, int bufferSize);
|
||||
private native void native_inject_location(double latitude, double longitude, float accuracy);
|
||||
|
||||
@@ -72,7 +72,7 @@ public abstract class GnssMeasurementsProvider
|
||||
status = GnssMeasurementsEvent.STATUS_NOT_SUPPORTED;
|
||||
break;
|
||||
case RESULT_GPS_LOCATION_DISABLED:
|
||||
status = GnssMeasurementsEvent.STATUS_GPS_LOCATION_DISABLED;
|
||||
status = GnssMeasurementsEvent.STATUS_GNSS_LOCATION_DISABLED;
|
||||
break;
|
||||
case RESULT_UNKNOWN:
|
||||
return null;
|
||||
|
||||
@@ -73,7 +73,8 @@ public abstract class GnssNavigationMessageProvider
|
||||
status = GnssNavigationMessageEvent.STATUS_NOT_SUPPORTED;
|
||||
break;
|
||||
case RESULT_GPS_LOCATION_DISABLED:
|
||||
status = GnssNavigationMessageEvent.STATUS_GPS_LOCATION_DISABLED;
|
||||
status = GnssNavigationMessageEvent
|
||||
.STATUS_GNSS_LOCATION_DISABLED;
|
||||
break;
|
||||
case RESULT_UNKNOWN:
|
||||
return null;
|
||||
|
||||
@@ -75,7 +75,7 @@ abstract class GnssStatusListenerHelper extends RemoteListenerHelper<IGnssStatus
|
||||
public void onSvStatusChanged(
|
||||
final int svCount,
|
||||
final int[] prnWithFlags,
|
||||
final float[] snrs,
|
||||
final float[] cn0s,
|
||||
final float[] elevations,
|
||||
final float[] azimuths) {
|
||||
Operation operation = new Operation() {
|
||||
@@ -84,7 +84,7 @@ abstract class GnssStatusListenerHelper extends RemoteListenerHelper<IGnssStatus
|
||||
listener.onSvStatusChanged(
|
||||
svCount,
|
||||
prnWithFlags,
|
||||
snrs,
|
||||
cn0s,
|
||||
elevations,
|
||||
azimuths);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ static void sv_status_callback(GpsSvStatus* sv_status)
|
||||
ALOGD("Unknown constellation type with Svid = %d.", info.svid);
|
||||
info.constellation = GNSS_CONSTELLATION_UNKNOWN;
|
||||
}
|
||||
info.snr = sv_status->sv_list[i].snr;
|
||||
info.c_n0_dbhz = sv_status->sv_list[i].snr;
|
||||
info.elevation = sv_status->sv_list[i].elevation;
|
||||
info.azimuth = sv_status->sv_list[i].azimuth;
|
||||
info.flags = GNSS_SV_FLAGS_NONE;
|
||||
@@ -698,12 +698,12 @@ static void android_location_GnssLocationProvider_delete_aiding_data(JNIEnv* /*
|
||||
}
|
||||
|
||||
static jint android_location_GnssLocationProvider_read_sv_status(JNIEnv* env, jobject /* obj */,
|
||||
jintArray svidWithFlagArray, jfloatArray snrArray, jfloatArray elevArray,
|
||||
jintArray svidWithFlagArray, jfloatArray cn0Array, jfloatArray elevArray,
|
||||
jfloatArray azumArray)
|
||||
{
|
||||
// this should only be called from within a call to reportSvStatus
|
||||
jint* svidWithFlags = env->GetIntArrayElements(svidWithFlagArray, 0);
|
||||
jfloat* snrs = env->GetFloatArrayElements(snrArray, 0);
|
||||
jfloat* cn0s = env->GetFloatArrayElements(cn0Array, 0);
|
||||
jfloat* elev = env->GetFloatArrayElements(elevArray, 0);
|
||||
jfloat* azim = env->GetFloatArrayElements(azumArray, 0);
|
||||
|
||||
@@ -713,13 +713,13 @@ static jint android_location_GnssLocationProvider_read_sv_status(JNIEnv* env, jo
|
||||
svidWithFlags[i] = (info.svid << SVID_SHIFT_WIDTH) |
|
||||
(info.constellation << CONSTELLATION_TYPE_SHIFT_WIDTH) |
|
||||
info.flags;
|
||||
snrs[i] = info.snr;
|
||||
cn0s[i] = info.c_n0_dbhz;
|
||||
elev[i] = info.elevation;
|
||||
azim[i] = info.azimuth;
|
||||
}
|
||||
|
||||
env->ReleaseIntArrayElements(svidWithFlagArray, svidWithFlags, 0);
|
||||
env->ReleaseFloatArrayElements(snrArray, snrs, 0);
|
||||
env->ReleaseFloatArrayElements(cn0Array, cn0s, 0);
|
||||
env->ReleaseFloatArrayElements(elevArray, elev, 0);
|
||||
env->ReleaseFloatArrayElements(azumArray, azim, 0);
|
||||
return (jint) sGnssSvListSize;
|
||||
@@ -1095,7 +1095,9 @@ static jobject translate_gps_clock(JNIEnv* env, GpsClock* clock) {
|
||||
JavaObject object(env, "android/location/GnssClock");
|
||||
GpsClockFlags flags = clock->flags;
|
||||
|
||||
SET_IF(GNSS_CLOCK_HAS_LEAP_SECOND, LeapSecond, clock->leap_second);
|
||||
SET_IF(GNSS_CLOCK_HAS_LEAP_SECOND,
|
||||
LeapSecond,
|
||||
static_cast<int32_t>(clock->leap_second));
|
||||
|
||||
// GnssClock only supports the more effective HW_CLOCK type, so type
|
||||
// handling and documentation complexity has been removed. To convert the
|
||||
@@ -1122,18 +1124,18 @@ static jobject translate_gps_clock(JNIEnv* env, GpsClock* clock) {
|
||||
break;
|
||||
}
|
||||
|
||||
SET(TimeInNs, clock->time_ns);
|
||||
SET(TimeNanos, clock->time_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_TIME_UNCERTAINTY,
|
||||
TimeUncertaintyInNs,
|
||||
TimeUncertaintyNanos,
|
||||
clock->time_uncertainty_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_FULL_BIAS, FullBiasInNs, clock->full_bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS, BiasInNs, clock->bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_FULL_BIAS, FullBiasNanos, clock->full_bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS, BiasNanos, clock->bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS_UNCERTAINTY,
|
||||
BiasUncertaintyInNs,
|
||||
BiasUncertaintyNanos,
|
||||
clock->bias_uncertainty_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT, DriftInNsPerSec, clock->drift_nsps);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT, DriftNanosPerSecond, clock->drift_nsps);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT_UNCERTAINTY,
|
||||
DriftUncertaintyInNsPerSec,
|
||||
DriftUncertaintyNanosPerSecond,
|
||||
clock->drift_uncertainty_nsps);
|
||||
|
||||
return object.get();
|
||||
@@ -1143,20 +1145,21 @@ static jobject translate_gnss_clock(JNIEnv* env, GnssClock* clock) {
|
||||
JavaObject object(env, "android/location/GnssClock");
|
||||
GpsClockFlags flags = clock->flags;
|
||||
|
||||
SET_IF(GNSS_CLOCK_HAS_LEAP_SECOND, LeapSecond, clock->leap_second);
|
||||
SET(Type, static_cast<uint8_t>(GPS_CLOCK_TYPE_LOCAL_HW_TIME));
|
||||
SET(TimeInNs, clock->time_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_LEAP_SECOND,
|
||||
LeapSecond,
|
||||
static_cast<int32_t>(clock->leap_second));
|
||||
SET(TimeNanos, clock->time_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_TIME_UNCERTAINTY,
|
||||
TimeUncertaintyInNs,
|
||||
TimeUncertaintyNanos,
|
||||
clock->time_uncertainty_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_FULL_BIAS, FullBiasInNs, clock->full_bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS, BiasInNs, clock->bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_FULL_BIAS, FullBiasNanos, clock->full_bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS, BiasNanos, clock->bias_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_BIAS_UNCERTAINTY,
|
||||
BiasUncertaintyInNs,
|
||||
BiasUncertaintyNanos,
|
||||
clock->bias_uncertainty_ns);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT, DriftInNsPerSec, clock->drift_nsps);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT, DriftNanosPerSecond, clock->drift_nsps);
|
||||
SET_IF(GNSS_CLOCK_HAS_DRIFT_UNCERTAINTY,
|
||||
DriftUncertaintyInNsPerSec,
|
||||
DriftUncertaintyNanosPerSecond,
|
||||
clock->drift_uncertainty_nsps);
|
||||
|
||||
SET(HardwareClockDiscontinuityCount, clock->hw_clock_discontinuity_count);
|
||||
@@ -1168,41 +1171,30 @@ static jobject translate_gps_measurement(JNIEnv* env,
|
||||
GpsMeasurement* measurement) {
|
||||
JavaObject object(env, "android/location/GnssMeasurement");
|
||||
GpsMeasurementFlags flags = measurement->flags;
|
||||
SET(Svid, static_cast<int16_t>(measurement->prn));
|
||||
SET(Svid, static_cast<int32_t>(measurement->prn));
|
||||
if (measurement->prn >= 1 || measurement->prn <= 32) {
|
||||
SET(ConstellationType, static_cast<uint8_t>(GNSS_CONSTELLATION_GPS));
|
||||
SET(ConstellationType, static_cast<int32_t>(GNSS_CONSTELLATION_GPS));
|
||||
} else {
|
||||
ALOGD("Unknown constellation type with Svid = %d.", measurement->prn);
|
||||
SET(ConstellationType,
|
||||
static_cast<uint8_t>(GNSS_CONSTELLATION_UNKNOWN));
|
||||
static_cast<int32_t>(GNSS_CONSTELLATION_UNKNOWN));
|
||||
}
|
||||
SET(TimeOffsetInNs, measurement->time_offset_ns);
|
||||
SET(State, measurement->state);
|
||||
SET(ReceivedSvTimeInNs, measurement->received_gps_tow_ns);
|
||||
SET(ReceivedSvTimeUncertaintyInNs,
|
||||
SET(TimeOffsetNanos, measurement->time_offset_ns);
|
||||
SET(State, static_cast<int32_t>(measurement->state));
|
||||
SET(ReceivedSvTimeNanos, measurement->received_gps_tow_ns);
|
||||
SET(ReceivedSvTimeUncertaintyNanos,
|
||||
measurement->received_gps_tow_uncertainty_ns);
|
||||
SET(Cn0InDbHz, measurement->c_n0_dbhz);
|
||||
SET(PseudorangeRateInMetersPerSec, measurement->pseudorange_rate_mps);
|
||||
SET(PseudorangeRateUncertaintyInMetersPerSec,
|
||||
SET(Cn0DbHz, measurement->c_n0_dbhz);
|
||||
SET(PseudorangeRateMetersPerSecond, measurement->pseudorange_rate_mps);
|
||||
SET(PseudorangeRateUncertaintyMetersPerSecond,
|
||||
measurement->pseudorange_rate_uncertainty_mps);
|
||||
SET(AccumulatedDeltaRangeState, measurement->accumulated_delta_range_state);
|
||||
SET(AccumulatedDeltaRangeInMeters, measurement->accumulated_delta_range_m);
|
||||
SET(AccumulatedDeltaRangeUncertaintyInMeters,
|
||||
SET(AccumulatedDeltaRangeState,
|
||||
static_cast<int32_t>(measurement->accumulated_delta_range_state));
|
||||
SET(AccumulatedDeltaRangeMeters, measurement->accumulated_delta_range_m);
|
||||
SET(AccumulatedDeltaRangeUncertaintyMeters,
|
||||
measurement->accumulated_delta_range_uncertainty_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_PSEUDORANGE,
|
||||
PseudorangeInMeters,
|
||||
measurement->pseudorange_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_PSEUDORANGE_UNCERTAINTY,
|
||||
PseudorangeUncertaintyInMeters,
|
||||
measurement->pseudorange_uncertainty_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CODE_PHASE,
|
||||
CodePhaseInChips,
|
||||
measurement->code_phase_chips);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CODE_PHASE_UNCERTAINTY,
|
||||
CodePhaseUncertaintyInChips,
|
||||
measurement->code_phase_uncertainty_chips);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_FREQUENCY,
|
||||
CarrierFrequencyInHz,
|
||||
CarrierFrequencyHz,
|
||||
measurement->carrier_frequency_hz);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_CYCLES,
|
||||
CarrierCycles,
|
||||
@@ -1213,33 +1205,8 @@ static jobject translate_gps_measurement(JNIEnv* env,
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY,
|
||||
CarrierPhaseUncertainty,
|
||||
measurement->carrier_phase_uncertainty);
|
||||
SET(LossOfLock, measurement->loss_of_lock);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_BIT_NUMBER, BitNumber, measurement->bit_number);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_TIME_FROM_LAST_BIT,
|
||||
TimeFromLastBitInMs,
|
||||
measurement->time_from_last_bit_ms);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_DOPPLER_SHIFT,
|
||||
DopplerShiftInHz,
|
||||
measurement->doppler_shift_hz);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_DOPPLER_SHIFT_UNCERTAINTY,
|
||||
DopplerShiftUncertaintyInHz,
|
||||
measurement->doppler_shift_uncertainty_hz);
|
||||
SET(MultipathIndicator, measurement->multipath_indicator);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_SNR, SnrInDb, measurement->snr_db);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_ELEVATION,
|
||||
ElevationInDeg,
|
||||
measurement->elevation_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_ELEVATION_UNCERTAINTY,
|
||||
ElevationUncertaintyInDeg,
|
||||
measurement->elevation_uncertainty_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_AZIMUTH,
|
||||
AzimuthInDeg,
|
||||
measurement->azimuth_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_AZIMUTH_UNCERTAINTY,
|
||||
AzimuthUncertaintyInDeg,
|
||||
measurement->azimuth_uncertainty_deg);
|
||||
SET(UsedInFix,
|
||||
(flags & GNSS_MEASUREMENT_HAS_USED_IN_FIX) && measurement->used_in_fix);
|
||||
|
||||
return object.get();
|
||||
}
|
||||
@@ -1250,34 +1217,23 @@ static jobject translate_gnss_measurement(JNIEnv* env,
|
||||
GpsMeasurementFlags flags = measurement->flags;
|
||||
|
||||
SET(Svid, measurement->svid);
|
||||
SET(ConstellationType, measurement->constellation);
|
||||
SET(TimeOffsetInNs, measurement->time_offset_ns);
|
||||
SET(State, measurement->state);
|
||||
SET(ReceivedSvTimeInNs, measurement->received_sv_time_in_ns);
|
||||
SET(ReceivedSvTimeUncertaintyInNs,
|
||||
SET(ConstellationType, static_cast<int32_t>(measurement->constellation));
|
||||
SET(TimeOffsetNanos, measurement->time_offset_ns);
|
||||
SET(State, static_cast<int32_t>(measurement->state));
|
||||
SET(ReceivedSvTimeNanos, measurement->received_sv_time_in_ns);
|
||||
SET(ReceivedSvTimeUncertaintyNanos,
|
||||
measurement->received_sv_time_uncertainty_in_ns);
|
||||
SET(Cn0InDbHz, measurement->c_n0_dbhz);
|
||||
SET(PseudorangeRateInMetersPerSec, measurement->pseudorange_rate_mps);
|
||||
SET(PseudorangeRateUncertaintyInMetersPerSec,
|
||||
SET(Cn0DbHz, measurement->c_n0_dbhz);
|
||||
SET(PseudorangeRateMetersPerSecond, measurement->pseudorange_rate_mps);
|
||||
SET(PseudorangeRateUncertaintyMetersPerSecond,
|
||||
measurement->pseudorange_rate_uncertainty_mps);
|
||||
SET(AccumulatedDeltaRangeState, measurement->accumulated_delta_range_state);
|
||||
SET(AccumulatedDeltaRangeInMeters, measurement->accumulated_delta_range_m);
|
||||
SET(AccumulatedDeltaRangeUncertaintyInMeters,
|
||||
SET(AccumulatedDeltaRangeState,
|
||||
static_cast<int32_t>(measurement->accumulated_delta_range_state));
|
||||
SET(AccumulatedDeltaRangeMeters, measurement->accumulated_delta_range_m);
|
||||
SET(AccumulatedDeltaRangeUncertaintyMeters,
|
||||
measurement->accumulated_delta_range_uncertainty_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_PSEUDORANGE,
|
||||
PseudorangeInMeters,
|
||||
measurement->pseudorange_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_PSEUDORANGE_UNCERTAINTY,
|
||||
PseudorangeUncertaintyInMeters,
|
||||
measurement->pseudorange_uncertainty_m);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CODE_PHASE,
|
||||
CodePhaseInChips,
|
||||
measurement->code_phase_chips);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CODE_PHASE_UNCERTAINTY,
|
||||
CodePhaseUncertaintyInChips,
|
||||
measurement->code_phase_uncertainty_chips);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_FREQUENCY,
|
||||
CarrierFrequencyInHz,
|
||||
CarrierFrequencyHz,
|
||||
measurement->carrier_frequency_hz);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_CYCLES,
|
||||
CarrierCycles,
|
||||
@@ -1288,32 +1244,8 @@ static jobject translate_gnss_measurement(JNIEnv* env,
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_CARRIER_PHASE_UNCERTAINTY,
|
||||
CarrierPhaseUncertainty,
|
||||
measurement->carrier_phase_uncertainty);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_BIT_NUMBER, BitNumber, measurement->bit_number);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_TIME_FROM_LAST_BIT,
|
||||
TimeFromLastBitInMs,
|
||||
measurement->time_from_last_bit_ms);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_DOPPLER_SHIFT,
|
||||
DopplerShiftInHz,
|
||||
measurement->doppler_shift_hz);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_DOPPLER_SHIFT_UNCERTAINTY,
|
||||
DopplerShiftUncertaintyInHz,
|
||||
measurement->doppler_shift_uncertainty_hz);
|
||||
SET(MultipathIndicator, measurement->multipath_indicator);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_SNR, SnrInDb, measurement->snr_db);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_ELEVATION,
|
||||
ElevationInDeg,
|
||||
measurement->elevation_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_ELEVATION_UNCERTAINTY,
|
||||
ElevationUncertaintyInDeg,
|
||||
measurement->elevation_uncertainty_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_AZIMUTH,
|
||||
AzimuthInDeg,
|
||||
measurement->azimuth_deg);
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_AZIMUTH_UNCERTAINTY,
|
||||
AzimuthUncertaintyInDeg,
|
||||
measurement->azimuth_uncertainty_deg);
|
||||
SET(UsedInFix,
|
||||
(flags & GNSS_MEASUREMENT_HAS_USED_IN_FIX) && measurement->used_in_fix);
|
||||
|
||||
return object.get();
|
||||
}
|
||||
@@ -1493,21 +1425,22 @@ static jobject translate_gps_navigation_message(JNIEnv* env, GpsNavigationMessag
|
||||
return NULL;
|
||||
}
|
||||
JavaObject object(env, "android/location/GnssNavigationMessage");
|
||||
SET(Svid, static_cast<int16_t>(message->prn));
|
||||
SET(Svid, static_cast<int32_t>(message->prn));
|
||||
if (message->prn >=1 && message->prn <= 32) {
|
||||
SET(ConstellationType, static_cast<uint8_t>(GNSS_CONSTELLATION_GPS));
|
||||
SET(ConstellationType, static_cast<int32_t>(GNSS_CONSTELLATION_GPS));
|
||||
// Legacy driver doesn't set the higher byte to constellation type
|
||||
// correctly. Set the higher byte to 'GPS'.
|
||||
SET(Type, static_cast<int16_t>(message->type | 0x0100));
|
||||
SET(Type, static_cast<int32_t>(message->type | 0x0100));
|
||||
} else {
|
||||
ALOGD("Unknown constellation type with Svid = %d.", message->prn);
|
||||
SET(ConstellationType,
|
||||
static_cast<uint8_t>(GNSS_CONSTELLATION_UNKNOWN));
|
||||
SET(Type, static_cast<int16_t>(GNSS_NAVIGATION_MESSAGE_TYPE_UNKNOWN));
|
||||
static_cast<int32_t>(GNSS_CONSTELLATION_UNKNOWN));
|
||||
SET(Type, static_cast<int32_t>(GNSS_NAVIGATION_MESSAGE_TYPE_UNKNOWN));
|
||||
}
|
||||
SET(MessageId, message->message_id);
|
||||
SET(SubmessageId, message->submessage_id);
|
||||
SET(MessageId, static_cast<int32_t>(message->message_id));
|
||||
SET(SubmessageId, static_cast<int32_t>(message->submessage_id));
|
||||
object.callSetter("setData", data, dataLength);
|
||||
SET(Status, static_cast<int32_t>(message->status));
|
||||
return object.get();
|
||||
}
|
||||
|
||||
@@ -1520,11 +1453,12 @@ static jobject translate_gnss_navigation_message(
|
||||
return NULL;
|
||||
}
|
||||
JavaObject object(env, "android/location/GnssNavigationMessage");
|
||||
SET(Type, message->type);
|
||||
SET(Svid, message->svid);
|
||||
SET(MessageId, message->message_id);
|
||||
SET(SubmessageId, message->submessage_id);
|
||||
SET(Type, static_cast<int32_t>(message->type));
|
||||
SET(Svid, static_cast<int32_t>(message->svid));
|
||||
SET(MessageId, static_cast<int32_t>(message->message_id));
|
||||
SET(SubmessageId, static_cast<int32_t>(message->submessage_id));
|
||||
object.callSetter("setData", data, dataLength);
|
||||
SET(Status, static_cast<int32_t>(message->status));
|
||||
return object.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user