1. class_init_native
it is used to initialize callback functions.
it is called by GpsLocationProviderThread class with static method.
2. native_is_supported
check if lower layer support GPS feature by using below method.
(sGpsInterface != NULL || get_gps_interface() != NULL);
it is called by isSupported() in GpsLocationProvider.java.
3. native_init
it is called while GPS is enabled.
4. native_cleanup
call cleanup in GpsInterface.
it is called while GPS is disabled.
5. native_set_position_mode
call set_position_mode in GpsInterface.
it is called while starting navigation and setMinTime() function.
6. native_start
call start in GpsInterface.
it is called while starting navigation.
7. native_stop
call stop in GpsInterface.
it is called while stopping navigation.
8. native_delete_aiding_data
call delete_aiding_data in GpsInterface.
it is only be called by Application send command with sendExtraCommand() API and command - delete_aiding_data.
9. native_read_sv_status
used to transfer sv status to java layer
it is triggered by native layer callback function - reportSvStatus().
10. native_read_nmea
used to transfer nmea data to java layer
it is triggered by native layer callback function - reportNmea().
11. native_inject_time
call inject_time in GpsInterface.
this interface can be called by two channels.
the first is:
it is be called by Application send command with sendExtraCommand() API and command - force_time_injection.
the second is:
while Network becomes available, it will be called automatically.
12. native_inject_location
call inject_location in GpsInterface.
it is called in framework layer to notify other providers of the new location.
13. native_supports_xtra
call init in GpsXtraInterface.
it is called when GPS is enabled to get capability of lower layer - whether it supports xtra funcation.
14. native_inject_xtra_data
call inject_xtra_data in GpsInterface.
this interface can be called by two channels.
the first is:
it is be called by Application send command with sendExtraCommand() API and command - force_xtra_injection.
the second is:
while Network becomes available, it will be called automatically.
15. native_agps_data_conn_open
call data_conn_open in AGpsInterface.
it is triggered by native layer callback function - reportAGpsStatus().
there are two possiblibilty: APN_ALREADY_ACTIVE / APN_REQUEST_STARTED.
16. native_agps_data_conn_closed
call data_conn_closed in AGpsInterface.
it is triggered by native layer callback function - reportAGpsStatus().
17. native_agps_data_conn_failed
call data_conn_failed in AGpsInterface.
it is triggered by native layer callback function - reportAGpsStatus().
there are three possiblibilty: APN_ALREADY_ACTIVE / APN_REQUEST_STARTED / other status.
18. native_agps_set_id
call set_set_id in AGpsInterface.
it is triggered by native layer callback function - requestSetID().
19. native_agps_set_ref_location_cellid
call set_ref_location in AGpsRilInterface.
it is triggered by native layer callback function - requestRefLocation().
20. native_set_agps_server
call set_server in AGpsInterface.
it is called while GPS is enabled.
21. native_send_ni_response
call respond in GpsNiInterface.
it can be called by two channels.
the first is:
it is called after user responses NI pop-up UI.
handleNiNotification() in GpsLocationProvider.java -> openNiDialog() -> onClick() in NetInitiatedActivity.java -> sendUserResponse() -> locationManager.sendNiResponse()
-> mService.sendNiResponse() -> mNetInitiatedListener.sendNiResponse()
-> native_send_ni_response() in GpsLocationProvider.java.
the second is:
for NI ACCEPT cases, this function will be called in handleNiNotification() in GpsNetInitiatedHandler.java.
handleNiNotification() in GpsLocationProvider.java -> mLocationManager.sendNiResponse() ->... -> native_send_ni_response().
in fact, all these two cases are triggered by reportNiNotification() callback function from native layer.
23. native_agps_ni_message
call ni_message in AGpsRilInterface.
it is called by checkSmsSuplInit() and checkWapSuplInit() in GpsLocationProvider.java.
24. native_get_internal_state
call get_internal_state in GpsDebugInterface.
it is called by dump() in LocationManagerService.java.
25. native_update_network_state
call update_network_state in AGpsRilInterface.
it is called by handleUpdateNetworkState() in GpsLocationProvider.java.