6650 Commits

Author SHA1 Message Date
Amith Yamasani
0184ce9295 Undo a previous change that's causing multi-user issues
Surgical hack for getting Settings to run multiple instances without
causing other system services/providers from doing the same.

Change-Id: Ic5dab61976a04c3012235299ba55edfcd8273dbb
2012-03-28 22:41:41 -07:00
Amith Yamasani
79eeae4d69 Merge "Show the current user in power menu" 2012-03-28 18:47:52 -07:00
Amith Yamasani
52f1d752f9 Show the current user in power menu
Shows a little indicator next to the current user in the power menu
when multi-user is enabled.

Fixed a bug where Settings was sometimes being launched in the wrong
process when there are 2 instances running.

Change-Id: Iaf2a00f6d1871fd2a88d8982439e445423bb2896
2012-03-28 18:19:29 -07:00
Irfan Sheriff
8a34718d84 Merge "Control suspend optimizations from framework" 2012-03-28 14:12:11 -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
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
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
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
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
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
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
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