6655 Commits

Author SHA1 Message Date
Amith Yamasani
04e0d265e3 Make SyncManager and AccountManagerService multi-user aware.
AccountManagerService
- Maintain multiple account lists, one per user
- Keep multiple databases of accounts
- Account db moved to /data/system/users/<userid>/

SyncManager
- SyncStorageEngine keeps track of multiple users' accounts.
- SyncQueue maintained as a single instance, queueing requests from
  multiple users.
- Changed some methods to take userId arguments
- Removed some deadc0de
- Store the userId in the SyncOperation, so we know which provider
  instance to bind to when queued operations are processed.

ContentService
- Pass along the userid to sync manager calls.

ActivityManagerService:
- Fixed a bug in cancelIntentSender
- Don't bring other user's task forward when resetting tasks.

Updated tests

Change-Id: If317340ef68e902787aa3f5ceb4cf96f14aea695
2012-03-08 10:52:36 -08:00
Romain Guy
250069bf6b Merge "Ignore draw requests when the display is off" 2012-03-08 10:47:02 -08:00
Jeff Brown
7ae9d5faad Use the Choreographer for Drawable animations.
Change-Id: Ifcbf33434bf3c32d1900fd0b3f5bde004604ce8a
2012-03-07 19:02:51 -08:00
Selim Gurun
09ec58ea0f Merge "Prevent potential stall in dns proxy." 2012-03-07 17:04:52 -08:00
Jim Miller
8247add51d Merge "Fix 6119433: disambiguate screen brightness changes from other lights" 2012-03-07 15:21:31 -08:00
Jim Miller
18651804ff Fix 6119433: disambiguate screen brightness changes from other lights
This fixes a bug where the code asked to change the keyboard brightness
on a device that doesn't support it.  Instead of animating the keyboard
brightness, it ended up animating the display brightness and invoking
the power off animation as a result.  The fix is to ignore keyboard
brightness because we don't have any devices that currently support it.

Change-Id: I672d89f92f991812ea676f19c40058b2d3008656
2012-03-07 14:59:06 -08:00
Jeff Sharkey
091ca2d5fb Merge "Avoid updating network stats after shutdown." 2012-03-06 20:04:26 -08:00
Jeff Sharkey
6341fcecc8 Avoid updating network stats after shutdown.
Bug: 6109476
Change-Id: I9a3a8b182c8fa56d83ddc755d204d5b267c9bc5d
2012-03-06 19:59:57 -08:00
Dianne Hackborn
5eb37241fe Merge "Work on more low memory reporting to apps." 2012-03-06 19:06:25 -08:00
Dianne Hackborn
27ff913d56 Work on more low memory reporting to apps.
There are now some new trim memory levels that are sent to
non-background applications as RAM becomes low.

There is a new API for an application to retrieve information
about memory trimming and such on demand.

Fixed various checks against the memory trim level to be
robust (not compare against exact values).

Change-Id: Ifd1c6151124350168aef20a94e517166fd2e03eb
2012-03-06 18:46:32 -08:00
Robert Greenwalt
06402e91e9 Merge "Make NDC not block forever and handle restart." 2012-03-06 11:30:28 -08:00
Craig Mautner
135fb111df Merge "Fix deadlock by making DropBoxManager call async." 2012-03-06 11:12:40 -08:00
Dianne Hackborn
4f03d35f9c Merge "Fix issues #6103378 and #5959515." 2012-03-06 10:34:18 -08:00
Craig Mautner
26caf7adf6 Fix deadlock by making DropBoxManager call async.
Created a Handler and used it to make sendBroadcast call asynchronously.
Deadlock was caused by WindowManagerService Log.wtf call requiring
ActivityManagerService lock while holding its own lock. At the same time
ActivityManagerService was holding its lock while waiting for
WindowManagerService lock.

Tested by forcing a Log.wtf in
WindowManagerServices.updateWindowsAppsAndRotationAnimationsLocked
inside mAppTokens loop. Then ran 'adb shell monkey -v -v 500000'.
Without this fix it would lock up and reboot within a couple of minutes.
With this fix it runs until the Camera app crashes. But that's a
different bug...

Fixes bug 6112676.

Change-Id: I5b360aa08412d117b1765f01bacd931020509db7
2012-03-06 09:30:18 -08:00
Dianne Hackborn
6569625bee Fix issues #6103378 and #5959515.
Change-Id: I762d86dd7119c9ac02f4b8803c4a250c6b7637c7
6103378: APR: IOOBE at android.content.pm.PackageParser.generatePackageInfo(
    PackageParser.java:355)
5959515: PackageManager doesn't validate className in setComponentEnabledSetting
2012-03-05 18:49:21 -08:00
Romain Guy
7e4e561bc7 Ignore draw requests when the display is off
When WindowManagerService's events are enabled/disabled, the state of the
display is dispatched to the known windows. This allows ViewRootImpl to
ignore draw requests until the screen is turned back on. This can potentially
lead to significant battery savings. For instance, a launcher widget showing
a repeating animation will cause the CPU and the GPU to wake up regularly
without this change.
(Change submitted by Intel and merged manually)

Change-Id: I7f93b0e60c3e6de1705f619e80860c36b1cdb978
2012-03-05 14:37:29 -08:00
Dima Zavin
e78d7670ca Merge "PowerManagerService: only turn off screen when we really mean to" 2012-03-05 13:19:33 -08:00
Dima Zavin
d975403a2d PowerManagerService: only turn off screen when we really mean to
Change-Id: I8aa574b38a4d901fce91b6d7771207949f9c8044
Signed-off-by: Dima Zavin <dima@android.com>
2012-03-05 13:13:33 -08:00
Dianne Hackborn
c3b91e9afd Merge "More work on rotation animation." 2012-03-05 11:45:19 -08:00
Dianne Hackborn
9fd74805c8 More work on rotation animation.
The black frame is now a separate animation element.  This allows us
to have it move through the aspect ratio change, without the old
and new screen elements doing weird aspect ratio scalings.  This
makes the animation generally look different (more like a reveal),
not sure if it is better or worse, but definitely has less artifacts
in things like the gallery.

Also tweaked the animation definitions a bit.

Change-Id: I94c274ba04bbc7a675946dc6c1778e19386e4a66
2012-03-05 11:44:10 -08:00
Irfan Sheriff
db9e6937f1 Merge "Enhance WPS" 2012-03-02 16:33:01 -08:00
Craig Mautner
86add4350c Fix reference to wrong ArrayList.
Fixes bug 6107296.

Change-Id: I44f2793c1c92686b276e491436a10be4f18c0d48
2012-03-02 16:09:01 -08:00
Craig Mautner
b6df928e5e Merge "Fix rotation so orientation changes aren't dropped. Modify test so that rotation animation is entered one final time after rotation completes. This last time causes mUpdateRotation to be set true forcing a test for orientation change. Fixes bug 6109189." 2012-03-02 16:06:33 -08:00
Craig Mautner
a731cd302d Fix rotation so orientation changes aren't dropped.
Modify test so that rotation animation is entered one final time after rotation completes. This last time causes mUpdateRotation to be set true forcing a test for orientation change.
Fixes bug 6109189.

Change-Id: I25475f336a3439a56b1c540205d09ee48c1d2b7c
2012-03-02 16:03:18 -08:00
Irfan Sheriff
86a5f5b9af Enhance WPS
- Add a cancel API
- Add more error reporting on WPS
- Fix network status reporting that showed up with new implementation

Change-Id: I499796c80d16d18df95fb702d029aa7e7283b603
2012-03-02 14:09:53 -08:00
yoonsung.nam
7b72ea71b9 Fix the bug net.dns1.pid is same as net.dns2.pid
writePidDns() does not increase the index in case first given dns
already exist in the property.

Change-Id: I1129d0042929b3ee119160e53cae0e4143c7ea88
Signed-off-by: yoonsung.nam <yoonsung.nam@samsung.com>
2012-03-02 10:23:03 -08:00
Craig Mautner
f8acebe4a5 Merge "Separate animation steps into start, step and finish phases. Fixes bug 6089126." 2012-03-01 19:29:46 -08:00
Dianne Hackborn
b132506e6e Merge "Fix issue where pm would clear preferred apps when updating an app." 2012-03-01 19:21:22 -08:00
Craig Mautner
dbb7991b4e Separate animation steps into start, step and finish phases.
Fixes bug 6089126.

Change-Id: Iafbde36ff719640335a7ecf762e1d991cf7915e4
2012-03-01 19:06:07 -08:00
Irfan Sheriff
209266e93f Merge "Fix WifiManager async API" 2012-03-01 16:26:52 -08:00
Jim Miller
46f31c31ea Fix 5797764: fix crash on tablets
This fixes a crash on tablets introduced by Change Ifad76fb2. It was caused
by calling nativeStartSurfaceFlingerAnimation() on devices that previously
didn't call it and apparently don't support some feature it uses.

Change-Id: Ia4c04e7e611f45cde0fbeb861aec3435d1719552
2012-03-01 14:56:47 -08:00
Jim Miller
3f4b1c4d58 Merge "Fix 5797764: don't hold PowerManager lock when changing native brightness" 2012-03-01 14:30:21 -08:00
Irfan Sheriff
d3975a9177 Fix WifiManager async API
Fix the current asynchronous API to use callback like the way
was done with p2p API.

In the process, fix the use of WPS

Change-Id: Ib6f8714cf51b3525b655948268804e7eaaf17587
2012-03-01 13:57:23 -08:00
Christopher Tate
5bb59daf42 Merge: Send UpdateLock broadcasts to manifest receivers
So that e.g. the system update service doesn't need to run all the time.

Bug 5543442

Change-Id: I4cd38240e67851daa5542a2962953e5dbed15b86
2012-03-01 13:00:30 -08:00
Robert Greenwalt
10bcb6fbb1 Merge "Don't forget to turn off mobile_dun" 2012-03-01 08:13:24 -08:00
Irfan Sheriff
43d8a95fa8 Merge "Improve Wi-Fi hand-off" 2012-02-29 19:33:06 -08:00
Irfan Sheriff
07573b3249 Improve Wi-Fi hand-off
When Wi-fi connects at L2 layer, the beacons reach and the device
can maintain a connection to the access point, but the application
connectivity can be flaky (due to bigger packet size exchange).

We now use Watchdog to monitor the quality of the last hop on
Wi-Fi using signal strength and ARP connectivity as indicators
to decide if the link is good enough to switch to Wi-Fi as the uplink.

ARP pings are useful for link validation but can still get through
when the application traffic fails to go through and thus not best indicator
real packet loss since they are tiny packets (28 bytes) and have
much low chance of packet corruption than the regular data
packets.

Signal strength and ARP used together ends up working well in tests.
The goal is to switch to Wi-Fi after validating ARP transfer
and RSSI and then switching out of Wi-Fi when we hit a low
signal strength threshold and waiting until the signal strength
improves and validating ARP transfer.

Change-Id: Ica593291ec7772da892f03cf45b649635b730c47
2012-02-29 17:33:36 -08:00
Robert Greenwalt
470007f69a Make NDC not block forever and handle restart.
Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
bug:6019952
Change-Id: I43e4c5072863b8b812d4fe24d30d92eb1a11651a
2012-02-29 16:53:27 -08:00
Christopher Tate
8662cab5c6 Merge: Introduce UpdateLocks
An "UpdateLock" works similarly to a wake lock in API: the caller is
providing a hint to the OS that now is not a good time to interrupt
the user/device in order to do intrusive work like applying OTAs.
This is particularly important for headless or kiosk-like products
where ordinarily the update process will be automatically scheduled
and proceed without user or administrator intervention.

UpdateLocks require that the caller hold the new signatureOrSystem
permission android.permission.UPDATE_LOCK.  acquire() and release()
will throw security exceptions if this is not the case.

The "is now convenient?" state is expressed to interested parties
by way of a sticky broadcast sent only to registered listeners.  The
broadcast is protected; only the system can send it, so listeners
can trust it to be accurate.  The broadcast intent also includes a
timestamp (System.currentTimeMillis()) to help inform listeners that
wish to implement scheduling policies based on when the device became
idle.

The API change here is a tiny one: a dump(PrintWriter) method has been
added to the TokenWatcher class to facilitate getting information out
of it for dumpsys purposes.  UpdateLock itself is still @hide.

Bug 5543442

Change-Id: I3709c831fc1883d7cb753cd2d3ee8e10a61e7e48
2012-02-29 14:05:24 -08:00
Robert Greenwalt
c9dac1185d Don't forget to turn off mobile_dun
When we find a higher priority match for tethering traffic we should turn off
whatever we were trying before.

bug:6083611
Change-Id: I06ee41336df107353bf1a979150345e461574a48
2012-02-29 14:02:55 -08:00
Dianne Hackborn
0450510f59 Fix issue where pm would clear preferred apps when updating an app.
The code for this was fairly conservative since the components of the
apps could change, leaving junk in the preferred app list.  Now we
don't pro-actively clear them, but try to catch missing components
later.

Change-Id: I793063449dcc577fd3d56bb56495b308f0c95ea8
2012-02-29 12:34:04 -08:00
Craig Mautner
c38358025d Merge changes I08fcd278,I1f496bb7
* changes:
  Detect animation completions like we used to. Previous approximations weren't indicating completion and windows weren't being layered correctly as a result.
  debug
2012-02-29 06:18:23 -08:00
satok
a6bae56fc5 Merge "Unblock IPC call in TextServicesManagerService" 2012-02-28 17:56:43 -08:00
Craig Mautner
343511c9ec Detect animation completions like we used to.
Previous approximations weren't indicating completion and windows weren't being layered correctly as a result.

Change-Id: I08fcd278485bb87dc10bca257b9f8073108753f3
2012-02-28 17:34:22 -08:00
Craig Mautner
ba64dfe872 debug
Change-Id: I1f496bb71068b6c3a09095c39fb04c9f4153e051
2012-02-28 17:34:21 -08:00
Jeff Sharkey
8097e1c567 Merge "Disable verbose NetworkStats logging." 2012-02-28 15:14:19 -08:00
Jeff Sharkey
e7bb71d269 Disable verbose NetworkStats logging.
Bug: 6076584
Change-Id: I4efcda2b474f623f4fe70db8b43b0aa69017d749
2012-02-28 15:13:08 -08:00
Dianne Hackborn
00e6fc4c73 am 4953ec1c: am a2e0e3b5: am 27e20ccd: Merge "Fix issue #6073913: onActivityResult() not getting called..." into ics-mr1
* commit '4953ec1c71c4c2c134da2c969945c0d8b4fcb03c':
  Fix issue #6073913: onActivityResult() not getting called...
2012-02-28 15:10:39 -08:00
Dianne Hackborn
4953ec1c71 am a2e0e3b5: am 27e20ccd: Merge "Fix issue #6073913: onActivityResult() not getting called..." into ics-mr1
* commit 'a2e0e3b5f63dc741fd5e54f45f8dde1a3cb58c6c':
  Fix issue #6073913: onActivityResult() not getting called...
2012-02-28 15:07:43 -08:00
Dianne Hackborn
c221d6ec2f am 27e20ccd: Merge "Fix issue #6073913: onActivityResult() not getting called..." into ics-mr1
* commit '27e20ccd9ac4dd1f9bf902ed2b359cc8beff7c9b':
  Fix issue #6073913: onActivityResult() not getting called...
2012-02-28 15:03:18 -08:00