7552 Commits

Author SHA1 Message Date
Mike Lockwood
320a10ad8c Reset cached light sensor values when toggling auto-brightness mode
Now the screen brightness will readjust to ambient lighting when toggling
auto-brightness on and off in Settings or the Power Widget.

Bug: 5486091

Change-Id: Ic98939fe1c59cb8def0f84266e48ca00329d6b30
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-25 09:16:28 -04:00
Mike Lockwood
55174b663b Revert "PowerManagerService: Remove assumption that light sensor will always send a value as soon as it is enabled."
The correct behavior for the light sensor is to immediately report a value
when it is enabled, so this change should not be necessary.

Bug: 5426212

This reverts commit 5dca30affc517879315b3a928c78756cbc9cf689.
2011-10-25 08:34:29 -04:00
satok
cef37fb481 Fix a bug where surface crashes when the enter animation starts while the exit animation has not yet finished
Bug: 5446482
Change-Id: I2e9f2e91ab5e8b22896d12e08fac76c72c997274
2011-10-25 18:05:05 +09:00
Xavier Ducrohet
e869ca9626 CherryPick f9e455 from master to mr0. do not merge.
Fix software GL renderer.

Change-Id: I7273a8e65c23a0032d155ea6572de2923791e411
2011-10-24 13:29:26 -07:00
Robert Greenwalt
49348e77b6 Fix Tethering settings.
Two issues.  A mcc/mnc-driven overlay means that the config at boot may not be
the config we wish to use - the sim card is read later which may switch the
config.  Changed to read the configuration each time rather than once at boot.
Second, the secure-setting override was always trumping the resource config
as we weren't discriminating between a not-set default and a real setting.
This meant the config could never make DUN-required.

bug:5495862
Change-Id: Icd4e90ac1d32bbb704c0ff9cc69e954fb0a0b58c
2011-10-21 17:01:39 -07:00
Xavier Ducrohet
2f4ce2ecd0 Merge "Fix software GL renderer." 2011-10-21 16:22:15 -07:00
Xavier Ducrohet
f9e4551367 Fix software GL renderer.
Change-Id: I07ab2709fa694e41aa3fcc5b9dfc809f55853ab4
2011-10-21 16:18:48 -07:00
Mathias Agopian
9ec98cd134 am aa938c8d: Merge "mDirtyRegion is single threaded, but could be accessed from a hwc thread" into ics-mr0
* commit 'aa938c8d9c0e71c9b556657cb33794210ce6ebf8':
  mDirtyRegion is single threaded, but could be accessed from a hwc thread
2011-10-21 16:00:00 -07:00
Mathias Agopian
6497eabf0e mDirtyRegion is single threaded, but could be accessed from a hwc thread
We now have mInvalidateRegion which holds the region to invalidate, it
can be set from any thread as long as mInvalidateLock is held. We use
fine-grained locking here because mInvalidateRegion can be set from anywhere,
in particular frmo HWC callbacks.

Bug: 5466774
Change-Id: Iafca20aa3f5b25a87755e65bde7b769aa8f997bc
2011-10-21 15:41:01 -07:00
Dianne Hackborn
6ec96ec404 am 943da7b8: Merge "Fix issue #5342788: Setting wallpaper from gallery set default..." into ics-mr0
* commit '943da7b895b7cc69cdaed7979cff422a7dbaac19':
  Fix issue #5342788: Setting wallpaper from gallery set default...
2011-10-21 14:38:31 -07:00
Mike Lockwood
186e21d8fb am 6b6bfb18: Merge "PowerManagerService: Enable light sensor debug output" into ics-mr0
* commit '6b6bfb187412e4845c89d866eff0b87b6d0a5541':
  PowerManagerService: Enable light sensor debug output
2011-10-21 13:59:05 -07:00
Dianne Hackborn
943da7b895 Merge "Fix issue #5342788: Setting wallpaper from gallery set default..." into ics-mr0 2011-10-21 12:45:07 -07:00
Dianne Hackborn
3da318202f Fix issue #5342788: Setting wallpaper from gallery set default...
...wallpaper first time IRK81.

We were monitoring for file creates when those are not needed, and
receiving the initial file create was causing us to be confused.

Change-Id: Iccd3b7492c82895dba87f25c4881c538f300d342
2011-10-21 12:29:10 -07:00
Mike Lockwood
22d12ab14c PowerManagerService: Enable light sensor debug output
Bug: 5426212

Change-Id: I46ca01eee8d69f7bd6fc63e53506ba42c3fe537d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-21 09:05:05 -04:00
satok
48019c65ed am 2cf1cf09: Fix possible NPE
* commit '2cf1cf098513807ffd3420ae106f438e943d0cd8':
  Fix possible NPE
2011-10-20 23:35:27 -07:00
satok
2cf1cf0985 Fix possible NPE
Bug: 5494803
Change-Id: I6f9d0076405ab7c99076a1168198c2ee70ad5082
2011-10-21 15:25:23 +09:00
Mathias Agopian
10b4503f2b am 16bece04: Merge "added dpi and refresh rate info in SF\'s dumpsys" into ics-mr0
* commit '16bece04bdbac9af5228436f70267ec5763315de':
  added dpi and refresh rate info in SF's dumpsys
2011-10-20 17:48:02 -07:00
Mathias Agopian
abf88bead4 added dpi and refresh rate info in SF's dumpsys
Change-Id: I2327248eb1993689367e3daeaccba74c172dfceb
2011-10-20 17:22:38 -07:00
Christopher Tate
257e67e44c Merge "Don't inappropriately kill ANRing drop recipients" 2011-10-20 13:21:07 -07:00
Christopher Tate
05e9c65a53 Don't inappropriately kill ANRing drop recipients
If an app takes the 5-second ANR timeout before responding to a
drop, but then recovers, we were inappropriately throwing an
exception back at it for having acknowledged the drop after we'd
abandoned the operation out from under it.  Now we let such
responses slide without taking any punitive action: the app is
still okay, and the drag/drop operation was cleanly terminated
already anyway.

Bug 5045618

Change-Id: I0b7e76c61f0f8c97e41280b542a470a7d3c8d86f
2011-10-20 12:34:36 -07:00
Jean Chalard
e0d32a60da Fix a warning from the binder, step 3.
This patch fixes the following warning:
W/Binder: The following Binder class should be static or
  leaks might occur: com.android.server
  .InputMethodManagerService.MethodCallback

...in hope of removing a possible memory leaks.

Bugs: 5481376, 5461066
Change-Id: I1764090a7059d9bf9e5d90683d7ac190c83415de
2011-10-20 20:45:21 +09:00
Chih-Chung Chang
38cdb60630 am f806871f: Fix 5487571: Make sure shutter sound is played when it\'s enforced
* commit 'f806871f3016a8184de4c9dcfbe0b9069dc0d72c':
  Fix 5487571: Make sure shutter sound is played when it's enforced
2011-10-19 20:09:13 -07:00
Chih-Chung Chang
f806871f30 Fix 5487571: Make sure shutter sound is played when it's enforced
Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
2011-10-20 10:48:21 +08:00
Daniel Sandler
22522289fc am 84e825a8: Merge "Add hasNavigationBar() to the window manager." into ics-mr0
* commit '84e825a84d7dde03042228c79638935c92d13c92':
  Add hasNavigationBar() to the window manager.
2011-10-19 18:07:18 -07:00
Daniel Sandler
84e825a84d Merge "Add hasNavigationBar() to the window manager." into ics-mr0 2011-10-19 18:05:20 -07:00
Dianne Hackborn
bf83971ba8 am 16362041: Merge "Fix issue #5484096: Device rebooted after turning WiFi tethering ON, IRL19 Crespo." into ics-mr0
* commit '163620417bc2980528e2079e3456c9600a92e165':
  Fix issue #5484096: Device rebooted after turning WiFi tethering ON, IRL19 Crespo.
2011-10-19 17:17:29 -07:00
Dianne Hackborn
c7d233d93f Fix issue #5484096: Device rebooted after turning WiFi tethering ON, IRL19 Crespo.
Change-Id: Iee530ae4adac20eb9637cc1b933a2202f4beb373
2011-10-19 16:55:27 -07:00
Eric Laurent
ee00c0541e am 3c86134a: Merge "Fix issue 381905: BassBoostTest CTS tests fail..." into ics-mr0
* commit '3c86134a50618605c86eb9f5f120dbf97826e3e1':
  Fix issue 381905: BassBoostTest CTS tests fail...
2011-10-19 14:02:10 -07:00
Eric Laurent
3c86134a50 Merge "Fix issue 381905: BassBoostTest CTS tests fail..." into ics-mr0 2011-10-19 13:59:55 -07:00
Daniel Sandler
0c4ccff369 Add hasNavigationBar() to the window manager.
It is no longer sufficient to check the value of
internal.R.bool.config_showNavigationBar to determine if a
navigation bar (separate from the status bar) is shown on a
device, because the emulator needs to be able to override
this value (now possible by setting qemu.hw.mainkeys to "1"
or "0", for navbar or no navbar, respectively).

This logic is now contained in PhoneWindowManager, and any
clients wishing to know whether the system has a software
nav bar should consult the new hasNavigationBar() method.

Bug: 5404945
Change-Id: I119d32a8c84b88b2ef46f63244e7f11dc5de0359
2011-10-19 16:39:14 -04:00
Eric Laurent
7fa1cee12c Fix issue 381905: BassBoostTest CTS tests fail...
When AudioEffectTest is executed, an Equalizer is created
and enabled on a MediaPlayer session. Effects on the output
mix are therefore suspended.
Then the MediaPlayer is released with the effect still enabled.
In this case, Audioflinger::purgeStaleEffects_l() fails to restore
the suspended effects when the effect attached to the released audio session
is removed.
When subsequent tests are executed on output mix effects, these effects cannot be
enabled as they are still suspended.

Fixed purgeStaleEffects_l() to restore suspended effects if the effect removed is enabled.

Also fixed EffectHandle::disconnect() to only restore suspended effects if the disconnected
handle actually has control over the effect.

Change-Id: I67232e7c34680b0cc01abfd57d5d510a524e5d4f
2011-10-19 11:44:54 -07:00
Ben Komalo
667580b716 am 8408e516: Merge "Fix remote device wipe to not hang." into ics-mr0
* commit '8408e5165a74ddee7d2d8698314cfda521fbfc76':
  Fix remote device wipe to not hang.
2011-10-19 10:31:42 -07:00
Ben Komalo
8408e5165a Merge "Fix remote device wipe to not hang." into ics-mr0 2011-10-19 09:32:50 -07:00
Dave Burke
2696d0520f am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0
* commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac':
  Add a LayerScreenshot
2011-10-18 23:00:08 -07:00
Dave Burke
70ac412b2f Merge "Add a LayerScreenshot" into ics-mr0 2011-10-18 22:58:09 -07:00
Dave Burke
3254774b92 am d7035c58: Merge "Fix a hang in SF caused by invalid transform matrix from the WM" into ics-mr0
* commit 'd7035c58b006b62084232c8db6c4f7c4002170cc':
  Fix a hang in SF caused by invalid transform matrix from the WM
2011-10-18 22:34:51 -07:00
Dave Burke
d7035c58b0 Merge "Fix a hang in SF caused by invalid transform matrix from the WM" into ics-mr0 2011-10-18 22:33:40 -07:00
Mathias Agopian
960a0b4813 am f7613743: Merge "Don\'t call hwc set() if there is nothing new to do" into ics-mr0
* commit 'f7613743f29f38cbbaf4ae09996c380845a17daf':
  Don't call hwc set() if there is nothing new to do
2011-10-18 20:24:23 -07:00
Mathias Agopian
43d109c2c8 am 23bf2505: Merge "Make sure set GL state properly" into ics-mr0
* commit '23bf250522b7dff9acd14c5900b66b1df9c76745':
  Make sure set GL state properly
2011-10-18 20:24:21 -07:00
Mathias Agopian
f7613743f2 Merge "Don't call hwc set() if there is nothing new to do" into ics-mr0 2011-10-18 20:23:22 -07:00
Mathias Agopian
23bf250522 Merge "Make sure set GL state properly" into ics-mr0 2011-10-18 20:23:15 -07:00
Mathias Agopian
0ab84ef507 Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Make sure to call compositionComplete() after rendering into a FBO.

Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
2011-10-18 20:21:47 -07:00
Mathias Agopian
526f0a0e15 Fix a hang in SF caused by invalid transform matrix from the WM
WindowManager could create by transforms because of divide by zero.

Bug: 5422468
Change-Id: I782f87ebb78b5ff23750e22837f36ca6cfed1f2f
2011-10-18 20:21:47 -07:00
Eric Laurent
a6f4fb1fbb am ecfdd7ff: Merge "Limit AudioFlinger log." into ics-mr0
* commit 'ecfdd7ff468bfc861e84fe18992e26b89cc63126':
  Limit AudioFlinger log.
2011-10-18 19:31:12 -07:00
Eric Laurent
ecfdd7ff46 Merge "Limit AudioFlinger log." into ics-mr0 2011-10-18 19:29:39 -07:00
Mathias Agopian
0d0fba4587 Don't call hwc set() if there is nothing new to do
there was situations where SF's main loop would run (as if there was
an invalidate), but the dirty region was empty (so no new buffers
were retired). In this case we return early and don't swap, which
would cause drawing artifacts.

Bug: 5476838
Change-Id: Id3b7bf4b7aabec7919c50d9278eb2165973a4c3d
2011-10-18 17:39:09 -07:00
Eric Laurent
276fa43b98 Limit AudioFlinger log.
AudioFlinger logs a warning when a write to the audio HAL
takes too long to return. The threshold for this warning is
a rule of thumb based on the assumption that the audio HAL will consume
buffers at a regular pace.
The introduction of low power audio mode with larger buffers and writes
occuring in bursts makes that this threshold is often exceeded resulting
in excessive and misleading warnings.

The threshold is raised to remove unwanted warnings but we should reconsider
the usefulness of this warning altogether.

Change-Id: I5ef6898ea28d879cede3e47da542a64092a3cca4
2011-10-18 15:42:27 -07:00
Mathias Agopian
9044ef05d5 Make sure set GL state properly
when taking a screenshot, in particular, we could end up
with stale GL state when drawing LayerDim which resulted
in incortect rendering.

Bug: 5467587
Change-Id: Id9fbed2843481d31063620f3662b364c7e3ac781
2011-10-18 15:32:57 -07:00
Dianne Hackborn
06f3e84595 am 535f6eac: Merge "Fix issue #5461497: Landed on Welcome screen after a tap on \'Next\' in Screen 500" into ics-mr0
* commit '535f6eacb9bd508caac463a12ab69be1cd58c5a5':
  Fix issue #5461497: Landed on Welcome screen after a tap on 'Next' in Screen 500
2011-10-18 14:36:31 -07:00
Dianne Hackborn
98cfebc6e8 Fix issue #5461497: Landed on Welcome screen after a tap on 'Next' in Screen 500
The basic problem was that at some points during setup wizard, this would
happen:

1. The app's process is killed.
2. The app's process is restarted, but not to actually resume the
   setup wizard activity, just to put it in the stopped state.
   When doing this, the saved state is cleared but the app will
   never provide a new one.
3. The app's process is killed again.  At this point, because the
   saved state is cleared, the activity is completely removed.
4. Eventually the entire activity stack becomes empty, and a new
   setup wizard activity needs to be created as the home app.

There is a combination of bad stuff going on here.

First, why is the process being killed?  At this point the setup
wizard is the home app, so it shouldn't be killed.  There were two
reasons why this was happening:

- CryptKeeper still was not completely cleanly going away.  To fix
  this, I removed the check in the activity manager to not allow
  an activity to finish if it is the only activity on the stack and
  maybe-kindof looks like the home app.  This really wasn't necessary
  (we always take care of starting a new home activity if we find the
  stack is empty), and outright dangerous with all of these things
  purporting to be home but not.

- There was an issue in computing the oom_adj where the home app
  would not be marked as "not hidden", and if we had to re-compute
  its oom adj in the current sequence would then give it an
  adjustment as a background process...  and with all the processes
  we spin through during boot, it quickly got down to background
  #16 and killed.

Second, what is going on with the state?  This is easier, the code
in the activity manager to create a new activity but put it in the
stopped state was still clearing the saved state.  The saved state
should only be cleared when going in to the resumed state.  When
going in to the stopped state, we can just keep holding the same
saved state.

Change-Id: I7d21cdcfa082d98ca70c79d9923e29605ee4353e
2011-10-18 13:41:10 -07:00