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:
Lifu Tang
2016-02-26 19:53:01 -08:00
parent 063a570ef0
commit 76a620f048
19 changed files with 800 additions and 1647 deletions

View File

@@ -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);
}