8896 Commits

Author SHA1 Message Date
Colin Cross
c8947b3d79 Merge "Move services/powermanager from frameworks/base to frameworks/native" 2012-03-28 14:12:30 -07:00
Irfan Sheriff
8a34718d84 Merge "Control suspend optimizations from framework" 2012-03-28 14:12:11 -07:00
Colin Cross
4be0041630 Move services/powermanager from frameworks/base to frameworks/native
Move services/powermanager into frameworks/native so audioflinger can
use it.  Note that this is not the same as a PowerManagerService,
which is part of systemserver and handles turning the screen on and
off, etc.  This is just a binder interface to allow taking wakelocks.

Change-Id: I1142e6d9ddbb651cc19ac07d946fa24d8feed8a3
2012-03-28 13:57:51 -07:00
James Dong
d927a1d996 Deleted the media, camera, drm related files since they are relocated
Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
2012-03-28 10:42:44 -07:00
Christopher Tate
3df92c50fe Merge "Fix uninstallation tracking in the Backup Manager" 2012-03-27 16:44:28 -07:00
Christopher Tate
a3d55342be Fix uninstallation tracking in the Backup Manager
This never worked properly; now it does.  We also no longer
do a redundant pair of remove/add operations when a package is
updated.

Bonus memory savings: we were keeping sets of ApplicationInfo
objects as part of the ongoing bookkeeping, but those were no longer
being used for anything other than the package names.  That's been
tossed out now and only the name strings are now used; hooray for
memory savings!

Change-Id: I4c6e592a1680e28550bcb4f76789260ded22280d
2012-03-27 16:29:35 -07:00
Amith Yamasani
8b5bce8d90 Merge "User management and switching" 2012-03-27 11:24:54 -07:00
Amith Yamasani
135936072b User management and switching
Broadcast intents that get sent out when users are added/removed/switched.

More work on generating user-specific information in package manager queries.
APIs to update user name and query a user by id.
Removed Package.mSetStopped and mSetEnabled, since they're not user specific.

User removal:
- Cleanup ActivityManager, PackageManager, WallpaperManager, AppWidgetService
  and AccountManager.
- Shutdown processes belonging to the user.

Don't show vibrate option in long-press power if there's no vibrator.

Lock the screen when switching users, to force unlocking.

Change-Id: Ib23a721cb75285eef5fd6ba8c7272462764038fa
2012-03-27 11:23:01 -07:00
John Grossman
f9f27197eb TimedAudio: Fix a cause of audio popping.
Fix an issue with buffer lifecycle management which could cause audio
pops on timed outputs.  There were two issues at work here.

1) During trim operations for the queued timed audio data, buffers
   were being trimmed based on their starting PTS instead of when the
   chunk of audio data actually ended.  This means that if you have a
   very large chunk of audio data (larger than the mixer lead time),
   then a buffer at the head of the queue could be eligible to be
   trimmed before its data had been completely mixed into the output
   stream, even though the output stream was fully buffered and in no
   danger of underflow.
2) The implementation of getNextBuffer and releaseBuffer for timed
   audio tracks was not keeping anything like a reference to the data
   that it handed out to the mixer.  The original architecture here
   seemed to be expecting a ring buffer design, but timed audio tracks
   use a packet based design.  Pieces of packets are handed out to the
   mixer which then frequently will hold onto that chunk of data
   across two mix operations, using the first part of the chunk to
   finish a mix buffer and then using the end of the chunk for the
   start of the next mix buffer.  If the buffer that the mixer is
   holding a piece of got trimmed before the start of the next mix
   operation, it would return to its heap and could be filled with who
   knows what by the time it actually got mixed.  On debug builds,
   they seem to get zero'ed out as they go back to the heap causing
   obvious pops in presentation.

This change addresses both issues.  Trim operations are now based on
ending presentation time for a chunk of audio, not the start.  Also,
when the head of the queue is in flight to the mixer, it can no longer
be trimmed immediately, merely flagged for trim by the mixer when the
mixer finally does call releaseBuffer.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: Ia1ba08cb9dea35a698723ab2d9bcbf804f1682fe
2012-03-27 10:58:11 -07:00
Eric Laurent
79763f3ce7 Merge "Fixed headset detection broken on stingray" 2012-03-27 10:54:35 -07:00
Irfan Sheriff
262f766ac8 Control suspend optimizations from framework
The suspend optimizations handling in the driver is being removed.
The framework will hence forth control when these optimizations occur -
we do this at screen off and hold a short wakelock to ensure this.

We also remove the use of the now defunct setsuspendopt command and
handle the high perf locking with the new suspend mode command.

Change-Id: Ia12e38befb2c4f85cad6612bc8f807805bd0dae1
2012-03-26 23:48:53 -07:00
Craig Mautner
b3cbd0b4d8 Merge "Refactor animation out of WindowState." 2012-03-26 17:27:16 -07:00
Craig Mautner
a2c77053b8 Refactor animation out of WindowState.
Remove the animation stepping from WindowState and move it into a new
class, WindowStateAnimator. Update all references to moved variables
in related files.

Change-Id: I7540d8f897b370c73975f3ffe450140861cb0cd1
2012-03-26 12:14:43 -07:00
Michael Jurka
dcbe048f4d Merge "Fix bug: don't show system bar in app thumbnails" 2012-03-26 11:29:09 -07:00
Dianne Hackborn
eba00ce996 Merge "Okay now let's really turn it off." 2012-03-26 11:12:28 -07:00
Dianne Hackborn
69dc66e91b Okay now let's really turn it off.
Change-Id: Idda3c13339a6a29a300555d31e67219c9af4ae68
2012-03-26 10:50:54 -07:00
Dianne Hackborn
a026b48972 Merge "Turn off "too slow" logs." 2012-03-26 10:40:50 -07:00
Dianne Hackborn
551d0b1f2a Turn off "too slow" logs.
Change-Id: I6ec306ca1c55226269c4644a869a984c4fa00f0d
2012-03-26 10:25:59 -07:00
Michael Jurka
4accb6a88b Fix bug: don't show system bar in app thumbnails
Bug: 5953608
Change-Id: Ib730638fe130f287ff446db0c6cd42efc5746c5c
2012-03-26 09:42:35 -07:00
Glenn Kasten
39581f9248 Merge "IAudioFlinger::createTrack and openRecord flags" 2012-03-26 07:16:37 -07:00
Craig Mautner
c9f67764a8 Merge "Skip layout if performShow fails." 2012-03-25 22:01:18 -07:00
Craig Mautner
cf8cbbe774 Skip layout if performShow fails.
In cases where a Surface does not go from hidden to shown, do not set
the perform layout flag. This keeps us out of repeated passes through
the layout code.

Fixes bug 6222487.

Change-Id: I22601bef5733d2f996a8cbdd50d6b89517bc3122
2012-03-25 21:54:36 -07:00
Christopher Tate
a6deda436b Merge "Don't crash when wiping backup data redundantly in the local transport" 2012-03-23 17:52:25 -07:00
Christopher Tate
0abf6a0014 Don't crash when wiping backup data redundantly in the local transport
Previously, if using the "local" debugging transport:

    adb shell bmgr wipe com.android.browser
    adb shell bmgr wipe com.android.browser

... would bring down the runtime.  This no longer happens.  The fix
covers two aspects of the situation:  1. the local transport no longer
blows up in this use case, and 2. the backup manager itself now catches
blowups on the part of the transport, and tidies up after them.

Bug 6205185

Change-Id: Ieb9b8827a62523148ad5a0ec15b05a954d198b3d
2012-03-23 17:47:58 -07:00
Eric Laurent
857d6c27f2 Fixed headset detection broken on stingray
commit 5e64321e broke the headset detection on stingray.
This is because the name passed with the UEvent upon headset insertion/removal is
different from the dev path (h2w). It actually indicates the type of headset connected.

The fix consists in using the dev path received with the UEvent to find the corresponding
entry in uEventInfo.

Change-Id: I8481cfa17a7af3c8f5d83fc87d0f7c0d2c981098
2012-03-23 17:32:37 -07:00
Craig Mautner
d5f2374e13 Merge "Reset layout needed at each animation step." 2012-03-23 16:20:47 -07:00
Craig Mautner
bb1449b392 Reset layout needed at each animation step.
The member variable WindowAnimator.mPendingLayoutChanges was never
being reset to 0. Consequently once it was set it was causing endless
calls to the layout method.

Fixes bug 6208114, 6220403, 6219546.

Fixed NPE in RecentsPanelView.

Change-Id: Ie529b8f31e535543cb5ae0af9447146306b14eeb
2012-03-23 16:11:14 -07:00
Jeff Sharkey
69f819b397 Merge "Include GIDs for unenforced permissions." 2012-03-23 15:21:00 -07:00
Dianne Hackborn
7cf4640e81 Merge "Add new thumbnail animation." 2012-03-23 15:00:59 -07:00
Dianne Hackborn
8078d8c8a2 Add new thumbnail animation.
Use it for recent tasks switching.

Not perfect yet by far, but something.

Also fix issue #6186758: Twitter crashes after tapping on a tweet on JRM75D

Change-Id: I49bf6c94aafde875ac652dedaf96d6c08cc9e7d2
2012-03-23 14:13:13 -07:00
Glenn Kasten
243806cfeb Merge "Revert "AudioFlinger does not need libmedia any more"" 2012-03-23 14:05:02 -07:00
Glenn Kasten
4bfcca92d2 Revert "AudioFlinger does not need libmedia any more"
This reverts commit c920dee060ac69684be33210ee44b99a5fc3e8b2
2012-03-23 14:04:27 -07:00
Christopher Tate
5b6f07b461 Merge "Deal gracefully with fatal exceptions during full backup" 2012-03-23 14:01:40 -07:00
Christopher Tate
aa0c02d221 Deal gracefully with fatal exceptions during full backup
In particular, if the low-level zip or crypto layers of the output
pipeline throw, the output becomes invalid at that point, but we
were not properly detecting this; we were missing the exception and
the runtime was going down.  Now we catch any such fatal exception
and make sure to shut down the backup operation cleanly, leaving
the output at whatever point in its construction that it had
achieved.

Bug 6131870

Change-Id: If0fe0337857404b776f407a79d11dd88b8e60fd0
2012-03-23 13:56:34 -07:00
Christopher Tate
9c2efb35e2 Sanity-check backup agent name prior to instantiation
Fixes a crash that would occur if an app with a pending backup
pass in the pipeline was updated to remove its agent declaration
from the manifest (or other more esoteric ways that a backup
pass was expected to run for an app without their own agent).

Bug 5776591

Change-Id: I5a8bc8c12de6a2bfa82f5093fe3a15b754109ab1
2012-03-23 13:00:05 -07:00
Jeff Sharkey
b9a070189c Include GIDs for unenforced permissions.
When READ_EXTERNAL_STORAGE isn't enforced, grant its GID to all
launched processes.  When changing enforcement, kill all processes
below foreground adjustment, causing them to be relaunched with
update GIDs.

Bug: 6131916
Change-Id: I6d83efc937919f13a1a7d9caac902e572869406a
2012-03-23 10:22:54 -07:00
Craig Mautner
54c546223c Merge "Separate animation into separate class." 2012-03-22 17:15:17 -07:00
Craig Mautner
764983d169 Separate animation into separate class.
Introduction of the class WindowAnimator which takes care of all
animations stepping and Surface operations.

Change-Id: I78f1c269fa57df0616c08adbe156e3059709ae48
2012-03-22 16:46:01 -07:00
Glenn Kasten
8b80a7ea8d Merge "AudioFlinger does not need libmedia any more" 2012-03-22 15:46:16 -07:00
Jeff Sharkey
6143f31537 Merge "NetworkPolicy multi-user tests." 2012-03-22 15:29:40 -07:00
Glenn Kasten
c920dee060 AudioFlinger does not need libmedia any more
Change-Id: Ifd2c61882109ec36ca68072a2bf6506e08c8cf34
2012-03-22 15:24:22 -07:00
Jeff Sharkey
cae04a29da NetworkPolicy multi-user tests.
Bug: 6214004
Change-Id: If13023a689dadfefe1475e0ef2f192922f2e7753
2012-03-22 15:18:57 -07:00
Mike Lockwood
ced11a5bc4 Merge changes I35a76a27,I04bb7ad4,If38a1a10,Ice5be6e5,I009e443f,I968ddf90,I69d4e518,I09b1dfc9
* changes:
  Merge commit '74803dc'
  add config_bluetooth_default_profiles config var and use it to disable bt profiles
  Do not allow Surface creation on machines without SurfaceFlinger We will fail later anyways, but this change makes it much easier to track down places where we are inadvertently doing operations that depend on the flinger.
  fix setting only usb mode
  Detect (at runtime) kernel support for the "hdmi_audio" switch.
  Add a config resource to disable key-chord screenshotting
  Do not assume that there is always a running activity (Necessary for headless devices)
  Add batch volume adjust support to adjustMasterVolume() in AudioManager and AudioService.
2012-03-22 15:16:03 -07:00
Mike Lockwood
11c0ab9a08 Merge "ActivityManagerService: Disable app crashed dialog on headless builds" 2012-03-22 15:13:20 -07:00
Amith Yamasani
ad812a23df Merge "Package restrictions per user" 2012-03-22 15:11:51 -07:00
RoboErik
dab2072365 fix setting only usb mode
If you cleared the last usb mode it would fail (and so would setting
it if you started with none). This fixes it to set and unset the
last property correctly.

Change-Id: Ice5be6e57b6ca6b8c9241b0ac62071a3bc72606a
2012-03-22 15:09:36 -07:00
John Grossman
5e64321ebf Detect (at runtime) kernel support for the "hdmi_audio" switch.
A new switch was introduced in AndroidAtHome to deal with a race
condition between the WiredAccessoryObserver and the HW composer HAL.
When the new switch ("hdmi_audio") is present, we want to pay
attention to it instead of paying attention to the old switch
("hdmi").  This change checks at startup for the presence or absence
of the new switch and uses it if available, otherwise it falls back on
classic behavior.

see change ID I960cfc2f3e8df5342e7248a26fd313fdad2ca322 for the kernel
side changes.

see bug 6023647 for a discussion of the issue.

Change-Id: I009e443f25662e7beb233e892ca71034b05ebfc2
Signed-off-by: John Grossman <johngro@google.com>
2012-03-22 15:09:29 -07:00
Kevin Hester-Chow
d87a9be444 Do not assume that there is always a running activity
(Necessary for headless devices)

Change-Id: I69d4e518df99a02f2fbf19a9d86a693cea292f80
2012-03-22 15:09:21 -07:00
Mike Lockwood
86548c472a ActivityManagerService: Disable app crashed dialog on headless builds
Change-Id: I78bf2cb2cd9f99db57f447b7bfaca80c4fefbd66
Signed-off-by: Mike Lockwood <lockwood@android.com>
2012-03-22 15:09:00 -07:00
Jeff Sharkey
4b63d69759 Fix test breakage.
Change-Id: I2c5fc8c3bf7795ccdd474caa3f858e9a56f026ed
2012-03-22 12:36:45 -07:00