83196 Commits

Author SHA1 Message Date
Jeff Sharkey
c268f0b19e Framework interface for netd firewall.
Bug: 5756357
Change-Id: If8b9f738fcea2cf16bd01682220718b57346c7cc
2012-08-24 11:00:28 -07:00
Jeff Sharkey
899223b97c Begin moving VPN to NetworkStateTracker pattern.
Created base tracker that handles common bookkeeping, and move VPN
to become a tracker.  VPN status is now reflected in NetworkInfo, and
is mapped to LegacyVpnInfo.

Legacy VPN now "babysits" any init services it starts, watching for
when they stop unexpectedly.

Bug: 5756357
Change-Id: Iba7ec79da69469f6bd9a970cc39cf6b885b4c9c4
2012-08-23 16:41:06 -07:00
Amith Yamasani
2c1dfa29b4 Merge "Fix deadlock in removing a user" into jb-mr1-dev 2012-08-22 18:19:20 -07:00
Jeff Sharkey
3451dc9064 Merge "Iteration on multi-user external storage." into jb-mr1-dev 2012-08-22 18:17:30 -07:00
Amith Yamasani
0cd867c83e Fix deadlock in removing a user
Cleanup PackageManager settings after the package directories are removed.

Change-Id: I264bc95ea21da653a234d7c81df5b25d4de7aa9e
2012-08-22 16:45:47 -07:00
Ying Wang
9f814ac5fc Merge "Remove obsolete variables." into jb-mr1-dev 2012-08-22 15:19:44 -07:00
Chet Haase
5f9e92f46f Merge "Fix animation of notification handle bar when panel changes height" into jb-mr1-dev 2012-08-22 15:06:56 -07:00
James Dong
d78fc5b94d Merge "Let getOriginalMimeType() take a fd passed from drm java applications" into jb-mr1-dev 2012-08-22 14:50:27 -07:00
Craig Mautner
b9b56954ec Merge "Eliminate special battery calls by WindowManager" into jb-mr1-dev 2012-08-22 14:14:54 -07:00
Jeff Sharkey
2bca868361 Iteration on multi-user external storage.
Remove single-user bind mounts, since they need to remain as raw
mounts to correctly propagate when remounted.  This means we're back
to using sdcard_r GID to enforce READ_EXTERNAL_STORAGE.

Bug: 6925012
Change-Id: I41b5d7ddc985a5df2e288632a0a80d4724089e00
2012-08-22 13:59:58 -07:00
James Dong
0889fdae87 Let getOriginalMimeType() take a fd passed from drm java applications
At present, we did not actually pass the fd. This patch allows us to
make the changes necessary in the future without worrying too much
about broken build.

related-to-bug: 6426185

Change-Id: I125decff9be621a72f2631fd439994a94a526606
2012-08-22 13:47:19 -07:00
Jeff Brown
6cf3b925ca Merge "Fix auto-brightness adjustment sentinel value." into jb-mr1-dev 2012-08-22 13:31:08 -07:00
Jeff Brown
5d03a53681 Fix auto-brightness adjustment sentinel value.
Change-Id: I1b0da4566eb350333d3c3b09a96266627260baa3
2012-08-22 13:22:02 -07:00
Jeff Brown
6da92032da Merge "Fix NPE." into jb-mr1-dev 2012-08-22 13:17:22 -07:00
Jeff Brown
b5b710a485 Fix NPE.
Bug: 7034583
Change-Id: Ie6b436492d12b0dd6bbe1c25d9b7ac35b74095d3
2012-08-22 13:16:01 -07:00
Irfan Sheriff
dfe5578771 am c584a24b: am 2140d1de: Merge "Avoid system_server crashing due to mac address is null"
* commit 'c584a24ba1af0c831adf46fe57b69af396fb925c':
  Avoid system_server crashing due to mac address is null
2012-08-22 11:03:13 -07:00
Craig Mautner
259328c04c Eliminate special battery calls by WindowManager
Previous to this change the WindowManager was notifying the
BatteryDtatsService about windows that keep the screen on. WM used a
custom WakeLock tag to indicate to PowerManagerService that it had
already notified the BatteryStatsService.

This change eliminates WindowManager notifying the BatteryStatsService
and lets PowerManagerService do the job.

Fixes bug 7030326.

Change-Id: I666dc6ef8f094b8d3d109fea6876be058e057b4f
2012-08-22 11:01:35 -07:00
Irfan Sheriff
c584a24ba1 am 2140d1de: Merge "Avoid system_server crashing due to mac address is null"
* commit '2140d1de47579db839b6a4ccc87394e80449d7a6':
  Avoid system_server crashing due to mac address is null
2012-08-22 11:01:03 -07:00
Irfan Sheriff
2140d1de47 Merge "Avoid system_server crashing due to mac address is null" 2012-08-22 10:48:23 -07:00
Amith Yamasani
98dddda791 Merge "Remove permission requirement for some UserManager calls" into jb-mr1-dev 2012-08-22 10:31:30 -07:00
Amith Yamasani
1952637425 Remove permission requirement for some UserManager calls
Update javadocs to be explicit about permissions.
Minor fixes in UserManagerService

Change-Id: I0d355e0a60e5dbdb49ed06091111d480ff249f3d
2012-08-22 10:28:56 -07:00
Selim Gurun
6479ecd1b2 Merge "Fix onFindResultReceived API" into jb-mr1-dev 2012-08-22 09:06:04 -07:00
Kenny Root
9b90ee2d0b Merge "Add KeyPairGenerator for Android keystore" into jb-mr1-dev 2012-08-22 08:55:26 -07:00
Kenny Root
db026710ec Add KeyPairGenerator for Android keystore
This allows end-users to generate keys in the keystore without the
private part of the key ever needing to leave the device. The generation
process also generates a self-signed certificate.

Change-Id: I114ffb8e0cbe3b1edaae7e69e8aa578cb835efc9
2012-08-22 08:52:55 -07:00
Chet Haase
4d179dc6cc Fix animation of notification handle bar when panel changes height
The notification panel uses LayoutTransition to animate changes to
the list of notifications. This works for the items themselves as
items are added or removed; the new/old items animate in/out and the
existing items animate to make or remove space.

But the handle at the bottom of the list (the gray translucent line) does
not play well with these changes. For example, when an item is swiped away
the handle snaps into its new location before the rest of the items have
finished animating.

The problem comes from a constraint of LayoutTransition; it handles changes
to the container it operates on, and to the parent hierarchy all the way up
to the root. However, it cannot animate changes to siblings of the parents.
So when the list resizes due to item changes, the handle (which is in a sibling
of the list) does not animate this change, but just reacts instantly.

The fix is to draw the handle not as a view itself, but rather as part of the
parent container of the list. So as the list animates a resize, the container will
also animate, and any graphics in the container will animate along with it.
No matter what size the container of the list is, the line will be drawn at
the bottom of it.

Issue #7024902 Notification panel animation incorrect when swiping notification out

Change-Id: Ifc412cb6bcdc6ead35993b0320364a2a95a16e11
2012-08-22 07:53:44 -07:00
Jean-Baptiste Queru
2bd65b61ba am 29c6f24b: am 6ffe2594: Merge "restorecon /data/anr directory."
* commit '29c6f24b254b4ea1a7d8448980e736355e4badf6':
  restorecon /data/anr directory.
2012-08-22 07:49:03 -07:00
Jean-Baptiste Queru
29c6f24b25 am 6ffe2594: Merge "restorecon /data/anr directory."
* commit '6ffe2594674f250c16c5e3055aa69680efaa6f69':
  restorecon /data/anr directory.
2012-08-22 07:46:41 -07:00
Jean-Baptiste Queru
6ffe259467 Merge "restorecon /data/anr directory." 2012-08-22 07:18:39 -07:00
Jeff Brown
00a8f4ff62 Make the electron beam animation shorter.
Now using about the same duration as it used to have when
it was implemented in Surface Flinger.

Change-Id: I09b28222379f4b6583f1f7b34188cc36c50509e9
2012-08-22 00:06:09 -07:00
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
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