8115 Commits

Author SHA1 Message Date
Craig Mautner
5642a48fbb Fix unprotected variable access by serializing.
The variables mKeyguardDisabled and mAllowDisableKeyguard were
being modified unprotected by mKeyguardTokenWatcher. Fix is to
serialize accesses to these variables by only referencing them
from the same Handler that mKeyguardTokenWatcher uses. Eliminates
synchronization blocks and mKeyguardDisabled variable.

Fixes bug 7045624.

Change-Id: I6355aa393507408296316bee61e178dc81e2a172
2012-08-23 14:25:34 -07:00
Craig Mautner
6715d1effa Merge "Clean up displayId and layerStack usage." into jb-mr1-dev 2012-08-23 08:44:53 -07:00
Craig Mautner
b47bbc3d80 Clean up displayId and layerStack usage.
Make better use of Display object by saving it in DisplayContent.
Only use layerStack when referring to Surfaces. Get displayId from
default Display or default DisplayContent. Remove warnings.

Fixes bug 7038151.

Change-Id: Ie493f0f5e755dc9b91ee969ff561c2a098283ead
2012-08-23 08:43:54 -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
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
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
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
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
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
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
Brian Muramatsu
43c7aae4d0 Merge "Listen for CONNECTIVITY_ACTION in GPS Provider" into jb-mr1-dev 2012-08-21 17:08:17 -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
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
Craig Mautner
de1d96c736 Merge "Hide non user app windows from other users." into jb-mr1-dev 2012-08-21 14:26:28 -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
Dianne Hackborn
d4ec5ae504 Merge "Improve multi-user app management." into jb-mr1-dev 2012-08-21 11:17:12 -07:00
Dianne Hackborn
0c38049502 Improve multi-user app management.
Introduce API to get per-user storage information, keep track
of services associated with users, and various small cleanup.

Change-Id: I5d4e784e7ff3cccfed627d66a090d2f464202634
2012-08-21 10:34:20 -07:00
Amith Yamasani
a10d1aa6c7 Multiprocess activity should be allowed to run on current user
Multiprocess flag should override singleton checks.

This allows ChooserActivity to run in the process/user that launched it.
Wallpaper chooser from Launcher now works for secondary users.

Change-Id: I17a99278ed2a6d2491c3016a549134a85bc2af00
2012-08-21 09:51:13 -07:00
Jeff Brown
8eaba60026 Merge "Disable electron beam on animation." into jb-mr1-dev 2012-08-20 20:28:50 -07:00
Jeff Brown
256237c99f Merge "Plumb the switch code into Dalvik." into jb-mr1-dev 2012-08-20 20:26:11 -07:00
Jeff Brown
892f371c6b Merge "Encapsulate locks in UEventObservers." into jb-mr1-dev 2012-08-20 20:25:14 -07:00
Jeff Brown
5356c7dc72 Disable electron beam on animation.
We want the screen to come back on as soon as possible.

Change-Id: Ifdaa2e88d19590c3da53be985dd886633e5cac59
2012-08-20 20:19:16 -07:00
Jeff Brown
5338428ddb Plumb the switch code into Dalvik.
Bug: 6548391
Change-Id: If0e918669ba27ca0e6561930d4abc427c34de42d
2012-08-20 20:16:01 -07:00
Jeff Brown
008b1762a8 Encapsulate locks in UEventObservers.
Synchronized methods make me cry so fixing this first before
I introduce any new functionality that could result in a deadlock.

Bug: 6548391
Change-Id: I9c006dc491ce205bfd86acf828dcebda2a63b2ca
2012-08-20 20:15:34 -07:00
Jeff Brown
4b72463d7c Merge "Add factory test feature to shut off on long press power." into jb-mr1-dev 2012-08-20 19:41:48 -07:00
Brian Muramatsu
a5d5d608cc Merge "add wireless charger support" into jb-mr1-dev 2012-08-20 16:57:14 -07:00
Craig Mautner
9dc52bc44c Hide non user app windows from other users.
When transitioning between old user and new user application windows
from the old user may not be shown because only one user's windows
can be shown at a time.

Change-Id: I4e17b36c9100c9457cc6eb3cb3b77f3a94fa2b41
2012-08-20 16:23:12 -07:00
Jeff Brown
ca7a9ef0e5 Merge "Adjust auto-brightness time constants." into jb-mr1-dev 2012-08-20 15:09:41 -07:00
Jeff Brown
3fee5c6bd8 Merge "Fix some proximity sensor bugs." into jb-mr1-dev 2012-08-20 14:59:18 -07:00
Jeff Brown
9a538ee7bd Add factory test feature to shut off on long press power.
Bug: 6847329
Change-Id: I2f4f975c3af2d13ccc06812a5a42e79032700862
2012-08-20 14:56:57 -07:00
Benoit Goby
7b7feee803 Merge "Add UsbDebuggingManager and UsbDebuggingActivity" into jb-mr1-dev 2012-08-20 14:48:11 -07:00
rich cannings
a811e0848d Merge "Pass URLs to package verifiers" into jb-mr1-dev 2012-08-20 14:24:49 -07:00
Jeff Brown
5f47ba4db7 Adjust auto-brightness time constants.
Specifically, dim a little more slowly.

Change-Id: I10d66a83ddc3a63f8c93d740a0cb116e6c974d10
2012-08-20 14:02:12 -07:00
Benoit Goby
4e68bd420b Add UsbDebuggingManager and UsbDebuggingActivity
The UsbDebuggingManager listens to adbd requests and displays a dialog
when the public key authentification fails, for the user to confirm if it
wants to allow USB debugging from the attached host. If the user chooses
to always allow USB debugging, the UsbDebuggingManager writes the public
key to adbd's config file so that the public key authenfication succeeds
next time.

Change-Id: I115c828331d8e326c380844ee33915d5dff22260
2012-08-20 13:44:34 -07:00