7364 Commits

Author SHA1 Message Date
Dima Zavin
98e044a609 BatteryService(jni): properly handle read's return value
Change-Id: I10f5cf3728424e7f5a0c1b460049102fd00a6246
Signed-off-by: Dima Zavin <dima@android.com>
2011-10-28 23:15:11 -07:00
Robert Greenwalt
4efe58d8e7 Temp disable Tethering if DUN is required
Getting source-based routing working is too risk for this point
in the project but tethering is broken otherwise, so disable
the tethering option if DUN is required until we can get a real
fix in.

bug:5495862
Change-Id: I5e852bf30c887599024a8b61af86ffec1d5333af
2011-10-27 14:50:27 -07:00
Robert Greenwalt
8d059ac5b1 Merge "Fix Tethering settings." into ics-mr0 2011-10-27 13:20:15 -07:00
Mike Lockwood
aac4184a5a Merge "Revert "PowerManagerService: Enable light sensor debug output"" into ics-mr0 2011-10-27 06:49:12 -07:00
Dianne Hackborn
3ec891ae80 Fix issue #5508024: Rotation jank seen in live wallpapers
Fix a few places where we would unfreeze the screen too early.
Now that we are no longer relying on surface flinger freezing, we
can't depend on it keeping the screen frozen until surfaces get
drawn.

Change-Id: Icb03bf30c9599a5e2016817bfa5ca6458adc7249
2011-10-25 14:14:26 -07:00
Mike Lockwood
ae92eb3496 Revert "PowerManagerService: Enable light sensor debug output"
This reverts commit 22d12ab14cefa8d9a59e63945f57b4f809849c76.

Bug: 5505809
2011-10-25 10:11:46 -04:00
Mike Lockwood
9dc20214f5 Merge "Reset cached light sensor values when toggling auto-brightness mode" into ics-mr0 2011-10-25 07:02:52 -07:00
Mike Lockwood
141fc9868b Merge "Revert "PowerManagerService: Remove assumption that light sensor will always send a value as soon as it is enabled."" into ics-mr0 2011-10-25 07:02:45 -07:00
Mike Lockwood
2ffe0ad391 Always use fresh NTP time for GPS
This is especially important when AGPS is disabled

Bug: 5355661

Change-Id: I072dbe1ddf43aa24c8fc39b750040504a1633c53
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-10-25 09:47:05 -04:00
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
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
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
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
2cf1cf0985 Fix possible NPE
Bug: 5494803
Change-Id: I6f9d0076405ab7c99076a1168198c2ee70ad5082
2011-10-21 15:25:23 +09: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
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
84e825a84d Merge "Add hasNavigationBar() to the window manager." into ics-mr0 2011-10-19 18:05:20 -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
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
8408e5165a Merge "Fix remote device wipe to not hang." into ics-mr0 2011-10-19 09:32:50 -07:00
Dave Burke
70ac412b2f Merge "Add a LayerScreenshot" into ics-mr0 2011-10-18 22:58:09 -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
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
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
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
Svetoslav Ganov
d8581c7a61 TouchExplorer crashes if there is incative pointer while dragging.
The TouchExplorer was not taking into account the case with incative
pointers while dragging. If one puts a finger down and then perfroms
a dragging gestore the explorer tries to inject UP event for the end
of the gesture upon every of the two dragging pointers going up instead
only for one the first went up.

bug:5476098

Change-Id: I20d2dd7bde7e016b0678a35d14cd068d9ff37023
2011-10-18 11:28:52 -07:00
Ben Komalo
ed48c8b4f5 Fix remote device wipe to not hang.
The DPM seemed to always go through ExternalStorageFormatter to wipe the
device and SD card. For SD cards emulated on a fuse filesystem, this
seems to fail unless the device is wholly encrypted. Bypass
ExternalStorageFormatter in those cases and just wipe as normal.

Bug: 5458396
Change-Id: Iec759ef894c6bd3863cb4e7329f4de4584c60c1a
2011-10-18 10:13:34 -07:00
Chih-Chung Chang
a84e37f37c Merge "Fix 5468644: Use the proper audio stream type to play sound." into ics-mr0 2011-10-17 19:40:12 -07:00
Jeff Sharkey
b0aec07f74 Validate commands and arguments.
Bug: 5465176
Change-Id: I9402054c20ea6cae42781c35bfc2ade90aac31ce
2011-10-17 14:51:42 -07:00
Dianne Hackborn
71e14da93c Fix issue #5445666: bunch of com.android.server.TextServicesManagerService crashes
Only unbind once.

Also protection from removing a SpellCheckerBindGroup from mSpellCheckerBindGroups
if it is no longer the current entry there.

Change-Id: Ic585295dfae77eae101a611afbf116bc681290ad
2011-10-17 10:21:25 -07:00
Chih-Chung Chang
4091f0ba08 Fix 5468644: Use the proper audio stream type to play sound.
Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
2011-10-17 19:04:00 +08:00
Mathias Agopian
840b8a6785 Revert "Add a LayerScreenshot"
This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
2011-10-16 23:54:25 -07:00
Mathias Agopian
e757a87ff1 we need to guarantee that h/w comp set() is called when a buffer has been retired
removed a test that could violate this guarantee. note that we
have no proof tha this ever happened, but consequences could be
hard lock-ups.

the code here was intended to track the region to update for displays
that can do partial update. the logic discarded the update entirely
if that region was empty. instead we just redraw the whole thing
(note that we should never be there with an empty region and retired
buffers though).

Bug: 5466259

Change-Id: I91ccab3b1a599e729e438eb833939e2236da6854
2011-10-16 18:59:38 -07:00
Mathias Agopian
57337eb78e Merge "Add a LayerScreenshot" into ics-mr0 2011-10-14 15:35:54 -07:00
Mathias Agopian
d6809f40cf 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.

Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
2011-10-14 14:32:48 -07:00
Christopher Tate
8f4e49a8fe Merge "DO NOT MERGE - Require device encryption password for adb backup/restore" into ics-mr0 2011-10-14 10:33:13 -07:00
Wink Saville
8a058cbf12 Merge "In releaseWifiLockLocked call noteReleaseWifiLock." into ics-mr0 2011-10-13 17:40:01 -07:00
Christopher Tate
b9c1acfb0b DO NOT MERGE - Require device encryption password for adb backup/restore
This supersedes any backup-password that the user might supply.  Per
design, the device encryption password is also always used to encrypt
the backup archive.

The CL introduces two new strings, used for prompting the user for
their device encryption password rather than their settings-defined
"backup password" when confirming a full backup or restore operation.

Bug 5382487

Change-Id: I278737927a4ecbb765bfb5ecfd28a4cb8dae52ef
2011-10-13 17:39:48 -07:00