83375 Commits

Author SHA1 Message Date
Jeff Brown
aa202a6dc3 Add a mechanism to adjust auto-brightness at night.
Uses the twilight service to determine the hours of
sunrise and sunset.  Shortly after sunset or before sunrise
gradually start to apply a gamma correction factor to the
auto-brightness calculations to make the screen a little
dimmer at night.

The effect is relatively small and is mostly noticeable
in dark rooms.  This is just a first pass at the algorithm,
we can tweak the adjustment later to ensure that it has even less
impact in moderate or bright environments.

Change-Id: Idf89022a5d0bb52975e04779352d53fa63371178
2012-08-22 00:02:41 -07:00
Jeff Brown
2416e09649 Extract the twilight detection into its own service.
Moving the detection out of UiModeManagerService will
make it easy for other services to register for the
information.

Fixed a bugs related to updating twilight state
when the time is updated.

We're using the same algorithm as before for passively
tracking the location.  Ideally we should update it
to use the new location manager features for low-power
location requests.

Change-Id: I520c53b9946ab6f8d994587d357fd6542c300c07
2012-08-22 00:02:41 -07:00
Jeff Brown
ae25108a7b Merge "Add support for auto-brightness adjust, but leave it disabled." into jb-mr1-dev 2012-08-21 23:40:19 -07:00
Jeff Brown
11167b887a Merge "Make the screen brightness setting limits configurable." into jb-mr1-dev 2012-08-21 23:19:08 -07:00
Jeff Brown
572a0859dd Merge "Add FloatMath.pow." into jb-mr1-dev 2012-08-21 23:15:56 -07:00
Wink Saville
b44b13a3f5 Empty DC's apnList when the DC is free.
Not doing this causes DC.apnList's to have multiple entries in the
apnlist which causes DC's to look like its connected to both IMS and
INTERNET. And when selecting CDMA only mode on a Xoom we will not bring
up the connection thus no data connectivity.

Bug: 6939338
Change-Id: I17bc17cd1938ebac773db8131d12d0fa724348b0
2012-08-21 22:58:54 -07:00
Jeff Brown
330560f53b Add support for auto-brightness adjust, but leave it disabled.
Auto-brightness adjustment applies a gamma correction factor
between 1/3 and 3 depending on the setting.  This feature
is disabled for now.

Change-Id: I2b300b5c455da545bea56b2bae5bc7903e30f30e
2012-08-21 22:27:42 -07:00
Jeff Brown
f9bba13692 Make the screen brightness setting limits configurable.
Change-Id: Ica84951c482edef6b7faebe1af22c609a1b9e8be
2012-08-21 22:27:42 -07:00
Jeff Brown
e2c279e8a1 Add FloatMath.pow.
Change-Id: I5c584f4894caba47fccfa22ba95f8665990d516c
2012-08-21 22:27:41 -07:00
Chih-Wei Huang
21326d8b77 Avoid system_server crashing due to mac address is null
It's possible that the mac address is null (getMacAddress() of WifiNative.java).
In this case system_server will crash like:

E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: WifiWatchdogStateMachine
E AndroidRuntime: java.lang.NullPointerException
E AndroidRuntime:        at android.net.arp.ArpPeer.<init>(ArpPeer.java:57)
E AndroidRuntime:        at android.net.wifi.WifiWatchdogStateMachine.doArpTest(WifiWatchdogStateMachine.java:866)

Check the mac address before parsing to avoid crashing.

Change-Id: I5d4205c04d479a3a2837172c6382816ea4bf74d6
2012-08-22 11:26:51 +08:00
Selim Gurun
92b81a3e4b Fix onFindResultReceived API
This is to fix open source bug 36509, i.e.
http://code.google.com/p/android/issues/detail?id=36509
the parameters are swapped.

Change-Id: I6245d254943c7c97e847a241d0069d85118763f7
2012-08-21 18:02:47 -07:00
Ying Wang
ddcca31997 Remove obsolete variables.
Bug: 6987838
Now emma is only enabled for apks.

Change-Id: Id8d198467076a8dff705195a8e051f3fb00d5660
2012-08-21 17:24:03 -07:00
Jason Sams
f9678070a0 Merge "Fix bug in grain." into jb-mr1-dev 2012-08-21 17:09:56 -07:00
Jason Sams
a8309cb7ee Merge "Move the kernel launch to specific intrinsic class." into jb-mr1-dev 2012-08-21 17:08:17 -07:00
Brian Muramatsu
43c7aae4d0 Merge "Listen for CONNECTIVITY_ACTION in GPS Provider" into jb-mr1-dev 2012-08-21 17:08:17 -07:00
John Grossman
df44184816 Merge "common_time: Move default election config to bcast." into jb-mr1-dev 2012-08-21 16:54:36 -07:00
John Grossman
7a947c4978 common_time: Move default election config to bcast.
Change the default master election and arbiration to use broadcast
instead of multicast.  As nice as the idea of using multicast for
discovery is, in the end it had just proven to be too unreliable in
random people's home infrastructures as well as the more complicated
managed infrastructures we are using internally.  Multicast still
works, and the service can still be configured to use it, but for now
we are switching to broadcast.

Also, add runtime checks to filter out our own broadcast traffic as
there does not seem to be any good sockopt in linux to do this for us
(there is one for multicast, but not broadcast).

Change-Id: I8ada3541cceca2e76c7a0c1a624a72026122c312
2012-08-21 16:39:11 -07:00
Brian Muramatsu
b94b41f516 Listen for CONNECTIVITY_ACTION in GPS Provider
Bug: 7020678

The broadcast receiver in GpsLocationProvider now listens for
CONNECTIVITY_ACTION changes. Set the intent filter so that
it catches those actions and updates the network state.

Change-Id: I7efd393dfe2aa8b172dd6701d42ff9ed687648a2
2012-08-21 16:30:57 -07:00
Nick Pelly
4a81ef8fd3 Merge "Fix some location issues exposed by CTS." into jb-mr1-dev 2012-08-21 16:29:54 -07:00
Nick Pelly
1332b53522 Fix some location issues exposed by CTS.
Change-Id: I5859ee2c9db5745b0a3bc8abfa8f08728fb25059
2012-08-21 16:26:26 -07:00
Selim Gurun
a6d16993eb Merge "Small tidy up to getDefaultUserAgent. DO NOT MERGE" into jb-mr1-dev 2012-08-21 16:12:56 -07:00
Jonathan Dixon
951fcabef6 Small tidy up to getDefaultUserAgent. DO NOT MERGE
- no need for WebSettings to bounce via WebView to get to the factory
- move this static (non-factory) method into the Statics inner class.

Bug: 6329117

Clean cherry pick: d1c4faa5a4c2be71d529d35572c5f807beee7ddc

Change-Id: I96807df0171c7308421ca8811cfcb1bf710cb007
2012-08-21 16:08:22 -07:00
Selim Gurun
b62999c136 Merge "Implement WebSettings.{get|set}TextSize via {get|set}TextZoom. DO NOT MERGE" into jb-mr1-dev 2012-08-21 16:06:04 -07:00
Stephen Hines
cdb05977ac Merge "Switch to v8 (and appropriate llvm-rs-cc stuff)." into jb-mr1-dev 2012-08-21 16:01:30 -07:00
Jason Sams
f1c051b6f2 Fix bug in grain.
Compare with 0 was done against unsigned which did not
correctly clamp.

Change-Id: I6dbff36190c279961017e57db3aaba51c60a0ad3
2012-08-21 15:54:07 -07:00
Jason Sams
19e1086df1 Move the kernel launch to specific intrinsic class.
This allows support of both input types. Kernel source
and global source.

Change-Id: Iea60bebd79c786795eae81c14cbec352b470a9c0
2012-08-21 15:53:29 -07:00
Mikhail Naganov
9d5e7aa38d Implement WebSettings.{get|set}TextSize via {get|set}TextZoom. DO NOT MERGE
TextSize is deprecated, so we wouldn't expect from WebViewProvider
implementations to re-implement it in some other way than Android WebView does
it. This also makes recently added TextSize.getValue method redundant.

Clean cherry pick: 1202d66f78fb24850b997e37f0ce3cb3b36e4bbf

Change-Id: Ib6aecb187f10ac3ec5d12cb839cb814ec0c564fe
2012-08-21 15:52:40 -07:00
Dianne Hackborn
b4f56b5ea2 am 8b97ee6d: am b0b4a704: Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH"
* commit '8b97ee6d8c26974a6fc9ce85c3d7a07ca1e9cac2':
  ActivityThread: Avoid creating duplicate handlers and reuse mH
2012-08-21 15:42:42 -07:00
Dianne Hackborn
8b97ee6d8c am b0b4a704: Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH"
* commit 'b0b4a704400319ceaa1002f3194a40553a00cc82':
  ActivityThread: Avoid creating duplicate handlers and reuse mH
2012-08-21 15:39:42 -07:00
Craig Mautner
7e877fa00c Merge "Fix to allow SYSTEM_UID to display windows." into jb-mr1-dev 2012-08-21 15:30:42 -07:00
Craig Mautner
a2d7b1117a Fix to allow SYSTEM_UID to display windows.
Was not previously checking to make sure that the appId was not
SYSTEM_UID (1000). This caused certain system windows to fail to
appear.

Change-Id: I939dc2f8a256acb84b7c413c7e00003a89aff6d4
2012-08-21 15:24:54 -07:00
Justin Ho
72404a82d3 Merge "Update Back softkey icon Bug: 6020915" into jb-dev 2012-08-21 15:19:15 -07:00
Dianne Hackborn
b0b4a70440 Merge "ActivityThread: Avoid creating duplicate handlers and reuse mH" 2012-08-21 15:12:45 -07:00
Craig Mautner
de1d96c736 Merge "Hide non user app windows from other users." into jb-mr1-dev 2012-08-21 14:26:28 -07:00
Justin Ho
962daf9b1c Update Back softkey icon
Bug: 6020915

Change-Id: I780f09bd1e99a10b2189ab253dd1a082118a385d
2012-08-21 14:21:29 -07:00
Amith Yamasani
23e282554e Merge "Multiprocess activity should be allowed to run on current user" into jb-mr1-dev 2012-08-21 14:19:51 -07:00
Teng-Hui Zhu
2253eeab6c Add context support into the filter framework.
Basically we need the context to pass the content URI into MediaPlayer.
bug:6837809

Change-Id: I9390b57baff06f80246584fb3a4b746e1a308ff2
2012-08-21 14:17:02 -07:00
Jean-Baptiste Queru
02df84a3b1 am 34d85746: am b8da225f: Merge "Tests/RS: Add RS context check for RsBalls setAccel()"
* commit '34d8574665caaef52f7c595b57f45f1c9efd7e39':
  Tests/RS: Add RS context check for RsBalls setAccel()
2012-08-21 14:02:02 -07:00
Jean-Baptiste Queru
34d8574665 am b8da225f: Merge "Tests/RS: Add RS context check for RsBalls setAccel()"
* commit 'b8da225f26b689288710ff0eafefa906b4f5700f':
  Tests/RS: Add RS context check for RsBalls setAccel()
2012-08-21 14:00:11 -07:00
Nick Pelly
257662efe2 Merge "Print timestamp (instead of age) in Location#toString()" into jb-mr1-dev 2012-08-21 13:53:04 -07:00
Nick Pelly
5584b497b7 Print timestamp (instead of age) in Location#toString()
Age was a bad idea, since it depends when toString() was called

Change-Id: Ica0b6bfa9a93b5a452ba3def5fbb2b0a0194c401
2012-08-21 13:52:20 -07:00
Scott Anderson
ccc7b98eaf Merge "BatteryService: Fix comment to match code" into jb-mr1-dev 2012-08-21 13:34:48 -07:00
Jim Miller
f644976101 Merge "Update AppWidgetHost with better support for OnClickHandlers" into jb-mr1-dev 2012-08-21 13:19:31 -07:00
Scott Anderson
5ad9fc2182 BatteryService: Fix comment to match code
Change-Id: Ib4e30e7808ff3a2a8a49c000eac719a3a4273fdd
Signed-off-by: Scott Anderson <saa@android.com>
2012-08-21 13:11:26 -07:00
Jean-Baptiste Queru
b8da225f26 Merge "Tests/RS: Add RS context check for RsBalls setAccel()" 2012-08-21 13:09:19 -07:00
Chet Haase
66bcbb9e39 Merge "Fix notification panel bug which prevented proper resizing" into jb-mr1-dev 2012-08-21 13:03:49 -07:00
Baligh Uddin
df5c3a54c7 Merge "Import translations. DO NOT MERGE" into jb-mr1-dev 2012-08-21 12:19:53 -07:00
Irfan Sheriff
5e8e41e41a Merge "Fix NPE" into jb-mr1-dev 2012-08-21 11:47:19 -07:00
Irfan Sheriff
06d371f87b Fix NPE
Bug: 7026244
Change-Id: I21f13bdbd2d33f0cc082f85474229d9909eb47c1
2012-08-21 11:44:01 -07:00
Maxim Siniavine
88cb79e7a1 Merge "Added a test to measure memory usage of apps." into jb-mr1-dev 2012-08-21 11:43:07 -07:00