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
Automated import of CL 144372
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).
B=144249
Automated import of CL 144333
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/...
Automated import of CL 144182
- 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.
Automated import of CL 144044
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.
BUG=1751158
Automated import of CL 144008
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/...
Automated import of CL 143999
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/...
Automated import of CL 143900
#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/...
Automated import of CL 143899
Adds stats for:
- Number of raw user events that have happened in the system.
- Number of times user activity has been reported, dividied by UID and type of activity.
- Duration of screen brightness levels in 4 buckets.
- Per-UID tracking of who has turned on Wifi and how long we can attribute it being on because of them.
Original author: hackbod
Merged from: //branches/cupcake/...
Automated import of CL 143800
Also clean up the error codes returned by the framework, so that the settings app can properly detect an error.
Original author: npelly
Merged from: //branches/cupcake/...
Automated import of CL 143788
-total network sent/received
-total full/partial wakelock times.
-Format the network sent/received amounts to be more easily readable.
Original author: emillar
Merged from: //branches/cupcake/...
Automated import of CL 143710
TextView was previously following the "relaxed" line breaking
convention and would allow a line break between any two
ideographic characters. Tighten that up and do not allow
line breaks before non-starter characters (sound and iteration
marks and small Hiragana and Katakana).
Original author: enf
Merged from: //branches/cupcake/...
Automated import of CL 143678
The hardware keyboard doesn't have all the accents needed for
Czech and Polish, so round out the selection.
Original author: enf
Merged from: //branches/cupcake/...
Automated import of CL 143669
Add a function to change getBackground color.
Add a function to check whether EditStyledText has styled text or not.
Refactor function and variable names for readability.
Original author: satok
Merged from: //branches/cupcake/...
Automated import of CL 143196
Also do most of the work for issue #1732012 (Only show screen rotation animation when triggered by sensor). This just needs to be hooked up to the surface flinger API when that appears.
Original author: hackbod
Merged from: //branches/cupcake/...
Automated import of CL 143169
Define orientation limits for various cases.
Values between 235 and 295 are considered landscape,
0 - 60 are considered portrait.
0-235 are ignored since we don't support Surfaces for 180 and 270 yet.
A linear threshold value is calculated for values between 265 and 355 to switch between landscape and portrait.(different for both cases)
Based on current mode we not only calculate the threshold but also compare accordingly based on increasing or decreasing orientation
BUG = 1734325
Original author: asuchitra
Merged from: //branches/cupcake/...
Automated import of CL 143162
Added a new WITH_EMAIL_OR_IM_FILTER_URI to find people with a given string as either an E-mail or IM address. This cleans up the original code, and lets us handle duplicates when there are multiple ContactMethod matches for a single person. (We don't get GROUP BY through the ContentProvider interface.)
In ContactsListActivity we don't show possibly-incorrect labels when in MODE_QUERY_PICK_TO_VIEW, as any labels and values would be identical. (The people appearing in that list are there because their ContactMethod matches the query.)
Original author: jsharkey
Merged from: //branches/cupcake/...
Automated import of CL 143159
The problem was that the Preference widget was reenabled when its dependency
was in enabled state. The enabled field was basically overloaded. The fix was
to add an additional field to keep track of whether its dependencies were met.
BUG=1653960
Automated import of CL 143150