Network Location Provider behavior

108 views
Skip to first unread message

Andrew Boie

unread,
Feb 8, 2010, 3:50:56 PM2/8/10
to android-platform
Hello,

I have noticed some occasional odd behavior with the
NetworkLocationProvider which drained my device's battery overnight.
We are curious if you have any thoughts. Since the code for the Google
Network Location provider is not available to us, we can only
conjecture from the logs. Our device is running Donut.

From the logs, we found that NetworLocationProvider did not seem to
stop calling getLocation() even though enableLocationTracking was set
to false:

01-28 21:44:59.398 D/NetworkLocationProvider( 1234):
enableLocationTracking(): false
01-28 21:44:59.568 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:45:04.589 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
01-28 21:45:49.609 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:45:54.659 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
01-28 21:45:58.439 D/NetworkLocationProvider( 1234):
onCellLocationChanged [22699,8812166]
01-28 21:46:04.139 D/NetworkLocationProvider( 1234):
onCellLocationChanged [22699,8813215]
01-28 21:46:21.489 D/NetworkLocationProvider( 1234):
onCellLocationChanged [22699,8812166]
01-28 21:46:39.679 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:46:44.709 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
01-28 21:47:29.729 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:47:34.759 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
01-28 21:48:19.779 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:48:24.809 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
01-28 21:49:09.829 D/NetworkLocationProvider( 1234): getLocation():
triggering a wifi scan
01-28 21:49:14.849 D/NetworkLocationProvider( 1234): getLocation():
falling back to cell
...
It continued for quite a while until the next enableLocationTracking
disabled request:

01-28 23:01:53.793 D/NetworkLocationProvider( 1234): removeListener():
providers.settings
01-28 23:01:53.793 D/NetworkLocationProvider( 1234): removeListener():
commands.testengine
01-28 23:01:53.793 D/NetworkLocationProvider( 1234): removeListener():
server.vpn
01-28 23:01:53.793 D/NetworkLocationProvider( 1234): removeListener():
providers.subscribedfeeds
01-28 23:01:53.803 D/NetworkLocationProvider( 1234): removeListener():
android
01-28 23:01:53.803 D/NetworkLocationProvider( 1234): removeListener():
server.checkin
01-28 23:01:53.803 D/NetworkLocationProvider( 1234): removeListener():
settings
01-28 23:01:53.803 D/NetworkLocationProvider( 1234): removeListener():
location
01-28 23:01:53.803 D/NetworkLocationProvider( 1234):
enableLocationTracking(): false
01-28 23:02:03.713 D/NetworkLocationProvider( 1234):
onDataConnectionStateChanged 3
01-28 23:17:04.613 D/NetworkLocationProvider( 1234):
onDataConnectionStateChanged 3
01-28 23:17:06.523 D/NetworkLocationProvider( 1234):
onDataConnectionStateChanged 3
01-29 07:24:47.611 D/NetworkLocationProvider( 1234):
onCellLocationChanged [22699,8813215]

Is it possible that this is normal behavior, or is something going
wrong?

Best Regards,
Andrew Boie

Andrew Boie

unread,
Feb 17, 2010, 5:42:23 PM2/17/10
to android-platform
> I have noticed some occasional odd behavior with the
> NetworkLocationProvider which drained my device's battery overnight.
> We are curious if you have any thoughts. Since the code for the Google
> Network Location provider is not available to us, we can only
> conjecture from the logs. Our device is running Donut.

We have studied this some more and have found some weird behavior
related to Google Voice Search. It seems to be asking for location
updates every 2 minutes. Invoking Google Voice Search in turn causes
Google NLP to trigger elapsed RT alarm every 2 mins, not stopping
until the com.google.android.voicesearch process is killed. We
reproduce this by invoking once and then going back to the homescreen
or doing some other activity,

Does anyone have visibility on why Google Voice Search does not
deregister for location updates when it is put to background or not in
use? Is there an issue with Google Voice Search with respect to
deregistering itself with the Google NLP? Is there any way we can
prevent Google Voice Search from adding these 2min elapsed RT alarms
indefinitely?

In addition to the phone we're working on, we reproduced this behavior
on the Motorola Droid and the G1.

Best Regards,
Andrew Boie

Reply all
Reply to author
Forward
0 new messages