This fixes a hack that was added when NetworkLocationManager was moved out of the framework.
This also lays the groundwork for supporting location providers outside of the system process.
BUG=1729031
Original author: lockwood
Automated import of CL 144664
Move broadcast receivers for wifi scan results and battery status
from LocationManagerService to NetworkLocationProvider
Add a Service for the NetworkLocationProvider, so we can install it from its
own thread rather than from BOOT_COMPLETED or callback from LocationManagerService.
(this Service was also required for receiving Intents in NetworkLocationProvider)
BUG=1729031
Original author: lockwood
Automated import of CL 144621
Move PhoneStateListener for listening to cell location changes from LocationManagerService
to the NetworkLocationProvider.
Move CellState class out of the core framework to the NetworkLocationProvider service.
NetworkLocationManager now notifies the collector of its state, rather than LocationManagerService.
BUG=1729031
Original author: lockwood
Automated import of CL 144600
Remove 1 Hz "heartbeat" polling of location providers from LocationManagerService.
Now location providers report their location to LocationManagerService via
LocationManager.setLocation() rather than waiting to be polled.
This reduces GPS fix latency by up to one second.
Remove LocationProvderImpl.getLocation().
Since we are no longer polling, this method is no longer necessary.
BUG=1729031
Original author: lockwood
Automated import of CL 144453
LocationManagerService now listens for changes to settings,
making LocationManager.updateProviders() unnecessary.
Removed LocationManager.updateProviders()
Added Settings.Secure.setLocationProviderEnabled(), which is a thread-safe way
of enabling or disabling a single location provider.
This is safer than reading, modifying and writing the LOCATION_PROVIDERS_ALLOWED directly.
BUG=1729031
Original author: lockwood
Automated import of CL 144415
We used to replace elements in the default with elements from
the overlay. This change causes us to empty the array first
so if the overlay array is smaller we don't end up with elements
from the default array showing through at the end of the array.
Ex: [A,B,C] and overlay [D] should give [D] but used to give
[D,B,C].
Original author: rgreenwalt
Automated import of CL 144413
2 levels as recorded at plug and unplug events. During charge cycles this would be useful because it would tell us
what the start and end levels were in the last discharge cycle. However during a discharge cycle this information could
be misleading as it would give you the level at the last unplug event (beginning the the discharge cycle) and last plug
event (end of the previous discharge cycle).
Now we are still keeping track of 2 values, but they are "discharge cycle start level" and "discharge cycle current level".
During a discharge cycle this will give you the level the current discharge cycle started at, and the current level. During
a charge cycle the same data will be supplied as before (the start/end of the last discharge cycle).
Original author: emillar
Automated import of CL 144410
getMinBufferSize() returns ERROR_BAD_VALUE if
sampleRateInHz < 4000 or > 48000.
Original author: xiaw
Merged from: //branches/cupcake/...
Original author: android-build
Automated import of CL 144407
Add new attributes for sdk version, software libs and gadgets
BUG = 1730924
Original author: asuchitra
Merged from: //branches/cupcake/...
Original author: android-build
Automated import of CL 144406
Added a screen to the setup wizard, after login, to ask user to
opt-in for location collection.
Added a dialog to Settings when user turns on Network location.
Fixed a security permission issue in LocationManagerService related
to this change.
Original author: yamasani
Merged from: //branches/cupcake/...
Original author: android-build
Automated import of CL 144395
Android's UI guide line. This modification is based on leland's mock.
See http://b/issue?id=1748136 for more information.
Put ProgressNumber left side, next to ProgressPercentage.
Make ProgressPercentage Bold.
Put ProgressNumber and ProgressPercentage near to the ProgressBar
above. This is same as the design of Market application.
Enable ProgressDialog change the ProgressNumber format. This is hidden
since the interface is premature.
Original author: dmiyakawa
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 144210
happens earlier than AutoDecoderCancel object is added
to the gAutoDecoderCancelMutex linked list.
Original author: raychen
Merged from: //branches/donutburger/...
Automated import of CL 144209
Take mutex in close(), and skip write path after turning bluetooth off.
Original author: npelly
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 144205
Change BugReportService to use java.os.ProcessBuilder instead.
Remove unused import from DumpStateReceiver.
An earlier change list created a private copy of this class for Term.
BUG=1750582
Automated import of CL 144129
The problem comes from the fact that AudioSystem::getOutputFrameCount() calls getOutput() to retrieve the active output (A2DP or Hardware) before calling get_audio_flinger(). If it is the first time AudioSystem::getOutputFrameCount() is called in a given process, getOutput() will return a wrong value because gA2dpEnabled has not yet been updated by get_audio_flinger().
The fix consists in calling get_audio_flinger() in getOutput() to be sure that gA2dpEnabled is valid when getOutput() reads it.
Original author: elaurent
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 144097
- We define HttpRequest and HttpResponse protocol buffers.
The RMQ mechanism is *not* used for these (though the
messages define rmq id fields in case we want to start).
- GTalkHttpClient will send an http request over the
connection to MCS if:
- gtalk_tunnel_http in gservices is turned on
- the request destination is the android proxy
- it can make a connection to gtalkservice
The request falls back to using GoogleHttpClient if it can't
be processed over the MCS connection.
A few shortcuts are taken with cookie handling, but these
are okay for the envisioned usage.
Original author: dougz
Merged from: //branches/donutburger/...
Automated import of CL 144094
in UriMatcher.match().
Before, every call to UriMatcher.match() called
Uri.getPathSegments() N + 1 times,
where N is the size of the list returned by
Uri.getPathSegments(). Since some of the implementations
of Uri.getPathSegments() are O(N), UriMatcher.match() was O(N^2).
This CL fixes the problem by calling uri.getPathSegments() once in
the beginning of match(). That should be safe since Uri is
immutable.
Original author: bringert
Merged from: //branches/donutburger/...
Automated import of CL 144010
This allows work done in later codelines to have proper
backward-compatibility checks.
Original author: jbq
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 144009
Using the same code pattern as the rest of the file:
. throw IllegalStateException if BrowserFrame.sJavaBridge is null in pauseTimers/resumeTimers.
. use (msg.arg1 == 1) to pass the boolean from WebView to WebViewCore as in CLEAR_CACHE
Original author: klobag
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 144000
init based on the phone's reported carrier ID.
Uses a core system resource string-array to contain the mapping
of carrier ID -> default locale. This should be set per project in
an overlay.
Original author: rgreenwalt
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 143902
#1748954 (New status bar fades into all white background): FrameLayout wasn't updating its foreground drawable when its padding changed, which would happen as the status bar is shown and hidden. To fix this I also ended up fixing a problem in the view debug stuff where we couldn't get a bitmap for a view that is the full screen size because it is too big... actually I just went ahead and added another function to snapshot the view hierarchy which works a lot better for us anyway.
#1737952 (Home screen icons overlap with the notification bar after exiting any camera app): Originally I punted this because it only happened in rare situations, but now that home is always portrait it happens a lot more so it is more important to fix. This involved a few things to clean up hiding/showing the status bar:
- We now determine when to hide and show it during layout, which allows us to do this at the time it is actually needed rather than during animation after we can actually catch it for the initial display of a window. This required tweaking the layout API so the policy can request a second layout pass if needed.
- When doing layout, we are now much more aggressive about skipping the layout of windows. Basically anything that we know will be hidden in the near future is ignored for layout, so that it doesn't glitch as it is transfered out of the screen. The theory being that it is better to leave it as it was originally placed while we are transitioning it out, than to switch it to something slightly more correct.
Original author: hackbod
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 143901