8549 Commits

Author SHA1 Message Date
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
Jeff Sharkey
370f2dbc37 Merge "Move network policy to per-appId (instead of UID)." 2012-03-22 11:13:54 -07:00
Jeff Sharkey
8a8b581e66 Move network policy to per-appId (instead of UID).
To support multi-user, store network policy per-appId and expand to
apply rules to all UserInfo on device.

Bug: 6140462
Change-Id: Ic0866b4d41c8c60cc1c0a597f0de927b92b65b1e
2012-03-22 11:02:43 -07:00
Amith Yamasani
483f3b06ea Package restrictions per user
Packages can be enabled/disabled per user.
This requires maintaining stopped/launched states and
enabled / disabled components and packages per user.

Refactored pm.Settings and PackageSettingsBase to keep
track of states per user.

Migrated the stopped-packages.xml to users/<u>/package-restrictions.xml

Changed intent resolution to handle individual user restrictions.
Bunch of IPackageManager calls now have a userId argument.
Make AppWidgetService handle removals of packages.

Added some tests for pm.Settings and PackageManager.

Change-Id: Ia83b529e1df88dbcb3bd55ebfc952a6e9b20e861
2012-03-22 10:08:24 -07:00
Craig Mautner
03273d00ce Continue animations started from AppWindowToken.
Animations that were started from AppWindowToken.showAllWindowsLocked
were not setting mInnerFields.mAnimating and hence the animations were
not progressing. This resulted in popups such as menus and time/date
settings not showing up.

Fixes bug 6205076.

Change-Id: I4daae5895e64182328671e282331f14dd5561d5e
2012-03-21 11:52:40 -07:00
Craig Mautner
6d332c5148 Merge "Minor refactoring prior to major refactoring." 2012-03-21 09:21:39 -07:00
Glenn Kasten
4351d4aa8e Merge "Clean up Track constructor" 2012-03-21 08:29:18 -07:00
Glenn Kasten
004f9bac41 Merge "AudioMixer can be configured for fewer max tracks" 2012-03-21 08:19:04 -07:00
Glenn Kasten
652e18d896 Merge "Update comments" 2012-03-21 07:24:21 -07:00
Glenn Kasten
32d72b2f53 Merge "Whitespace" 2012-03-21 07:22:40 -07:00
Glenn Kasten
85b51b8ae3 Merge "new doesn't fail on Android" 2012-03-21 07:21:21 -07:00
Eric Laurent
c485824804 am a48285c4: am 165ee4c5: am 14958e21: Merge "audioflinger: fix issue with camcorder and A2DP" into ics-mr1
* commit 'a48285c4f22ffc43f1771ebd1ff35dcec48db2c7':
  audioflinger: fix issue with camcorder and A2DP
2012-03-20 19:35:53 -07:00
Jeff Sharkey
e5b2b644b1 Merge "Remove unused android.net.Downloads." 2012-03-20 18:00:29 -07:00
Jeff Sharkey
948eef8254 Remove unused android.net.Downloads.
It's another set of constants that can be confused with those in
android.provider.Downloads.

Change-Id: I78ac058fa264d59a81f7655ab101c3fb2c8c17ff
2012-03-20 17:58:27 -07:00
Jeff Sharkey
3a66cf3e86 Avoid data usage notifications in airplane mode.
Only for mobile networks.

Bug: 5995839
Change-Id: I6a6dba8cfe98c8e72861f90665c3e41da6d9a474
2012-03-20 17:45:23 -07:00
Glenn Kasten
25f1bc43f8 AudioMixer can be configured for fewer max tracks
Change-Id: I371b17cef071d083eecf35cd3627a3adff907a33
2012-03-20 17:27:10 -07:00
Craig Mautner
2fb98b147b Minor refactoring prior to major refactoring.
Removal of blur layer.
Deferral of Surface actions in BlackFrame from ctor to first use.
Combine common test into single method okToDisplay().
Remove redundant logic in DimAnimator.

Change-Id: I43af0415794a8f142803ce94d7e17539aafac67d
2012-03-20 17:24:00 -07:00
Glenn Kasten
e9b2b3be13 Clean up Track constructor
The 'thread' parameter can never be NULL.
Use constructor initialization list when possible.
Make more members const.
Only put the relevant code under "if (mCblk != NULL)".
Add comment about track name leak.

Change-Id: Ib963390a69bed1999638cc982a759edd1d5f4712
2012-03-20 17:15:12 -07:00
Jeff Sharkey
481cb7ea38 Merge "Remember when NetworkPolicy was inferred." 2012-03-20 16:54:51 -07:00
Jeff Sharkey
837f9242ae Remember when NetworkPolicy was inferred.
This helps future-proof NPMS if we need to correct default policies
after an upgrade.

Change-Id: I0ddfdeaf41757a46aeb867c91d495ccf981d544b
2012-03-20 16:52:20 -07:00
Glenn Kasten
d046324582 Merge "Add libmedia_native" 2012-03-20 14:01:39 -07:00
Craig Mautner
d3ae220286 Merge "Fix flickering when starting and ending apps." 2012-03-20 12:46:48 -07:00
Craig Mautner
22ce1414a0 Fix flickering when starting and ending apps.
Surfaces were displaying animations in their entirety for a single
frame before the animation kicked in. This caused a flash on the
screen. By setting the animation to invisible (alpha=0) at their
start it makes no difference if they are displayed.

Fixed bug 6176540.

Removed redundant mDimAnimator.show call.

Change-Id: I47c1b0d38273b011d9115822a8476671d6a050fc
2012-03-20 10:16:26 -07:00
Jeff Sharkey
09f5aededa Merge "Selective enforcement of READ_EXTERNAL_STORAGE." 2012-03-19 19:24:04 -07:00