6513 Commits

Author SHA1 Message Date
Dianne Hackborn
cadaa3a983 Merge "Improve handling of low memory." 2011-07-14 10:48:01 -07:00
Dianne Hackborn
ce86ba86df Improve handling of low memory.
Now classify background processes into a set of bins of how much
memory they should try to clear.  The last bin also involves
destroying all activities in that process.

Removed the old code for the simulator that is no longer needed
(yay).  The debugging features it had are now integrated into the
regular oom adj code.

Small fixes to load average service.

Change-Id: Ic8df401714b188c73b50dbc8f8e6345b58f1f3a0
2011-07-14 10:39:39 -07:00
Jeff Brown
9302c8796f Refactor input dispatcher use of window/app handles.
This change moves the cached window and application input state
into the handle objects themselves.  It simplifies the dispatcher
somewhat because it no longer needs to fix up references to
transient InputWindow objects each time the window list is updated.

This change will also make it easier to optimize setInputWindows
to avoid doing a lot of redundant data copying.  In principle, only
the modified fields need to be updated.  However, for now we
continue to update all fields in unison as before.

It turns out that the input dispatcher was inappropriately retaining
pointers to InputWindow objects within the mWindows InputWindow
vector.  This vector is copy-on-write so it is possible and the
item pointers to change if an editing operation is performed on
the vector when it does not exclusively own the underlying
SharedBuffer.  This bug was uncovered by a previous change that
replaced calls to clear() and appendVector() with a simple use
of operator= which caused the buffer to be shared.  Consequently
after editItemAt was called (which it shouldn't have, actually)
the buffer was copied and the cached InputWindow pointers became
invalid.  Oops.  This change fixes the problem.

Change-Id: I0a259339a6015fcf9113dc4081a6875e047fd425
2011-07-14 04:11:21 -07:00
Svetoslav Ganov
f382dc2d97 Merge "Touch exploration gesture events change the window id." 2011-07-13 17:23:41 -07:00
Svetoslav Ganov
63c04eeb00 Touch exploration gesture events change the window id.
1. Touch exploration start and end events are generated
   by the sytstem to provide additional information for
   accessibility services. Since such events do not come
   from any particular window they whould not change the
   id of the window that currently allows exploring its
   content.

2. Touch exploration start and end events were lealing the
   touch explorer class wich is private.

bug:5026258

Change-Id: Icaf3e2bd9566716f2afb876cf8e0d50813b0c76e
2011-07-13 17:22:15 -07:00
Mike Lockwood
c1b9bbb21c Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build
Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-13 19:45:44 -04:00
Kenny Root
a1b68687de Merge "Add StorageVolume list to MountService dump" 2011-07-13 15:53:12 -07:00
Christopher Tate
9a79cda53b Merge "Compress the backup output stream" 2011-07-13 15:37:21 -07:00
Christopher Tate
7926a693c4 Compress the backup output stream
Zlib compression, with a full flush between each application's
data.  Encryption will be performed on the already-compressed data
once that's implemented.

On restore, the streamed data is similarly uncompressed on the fly.

Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
2011-07-13 15:30:41 -07:00
Jeff Sharkey
19d2c0b0c0 Merge "Control socket tagging through Settings.Secure." 2011-07-13 15:28:06 -07:00
Jeff Sharkey
62a2c8fed9 Control socket tagging through Settings.Secure.
When NetworkManagementService starts, it determines if qtaguid
should be enabled.  The changes pushes the enabled state to a system
property to control socket tagging.

Change-Id: I5697a990dbaad4b220a2fb055931b18077d07a74
2011-07-13 15:25:11 -07:00
Mathias Agopian
40001da8fa Merge "get rid of overlay HAL" 2011-07-13 14:07:01 -07:00
Jeff Brown
023e8c72e9 Merge "Revert "fix a weird use of Vector::appendVector()"" 2011-07-13 13:00:38 -07:00
Jeff Brown
b99a82437c Revert "fix a weird use of Vector::appendVector()"
This reverts commit 198fd888add624cf9e53ce31b776568a5d069916

This change seems to have exposed some other bugs.
Bug: 5026631
2011-07-13 12:51:11 -07:00
Kenny Root
4161f9b303 Add StorageVolume list to MountService dump
Change-Id: If2be6e420d9671032d2e7a66c71a6733e6e48ac8
2011-07-13 09:48:33 -07:00
Mike Lockwood
de033beae4 Merge "UsbDeviceManager: clean up HandlerThread creation" 2011-07-13 07:34:29 -07:00
Mike Lockwood
3fd13eb632 UsbDeviceManager: clean up HandlerThread creation
Change-Id: I84683b1753fcf3c3b501f8a506d6d890edf2eb37
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-13 09:39:54 -04:00
Jeff Sharkey
3862096cbf Merge "Include full network history around current time." 2011-07-12 20:23:03 -07:00
Jeff Sharkey
434962e44e Include full network history around current time.
When requesting historical values with time ranges, always include
full values for buckets that span current time.  (It doesn't make
sense to interpolate partial data.)  Move getTotalData() to return
full Entry objects to prepare for packet counts.

Bug: 4691901
Change-Id: I717bd721be9f1d4a47c4121e46e07a56cb15bbf1
2011-07-12 20:20:56 -07:00
Mathias Agopian
a7b28df5f0 Merge "take the state transform into account with h/w composer hal" 2011-07-12 17:36:22 -07:00
Mathias Agopian
6e62dba519 get rid of overlay HAL
Change-Id: I461f633d172ab10e05326ef10544c67dea664c0e
2011-07-12 16:04:12 -07:00
Jeff Sharkey
f0c3b1b6b7 Merge "Hide NetworkStatsHistory internals." 2011-07-12 15:19:31 -07:00
Mathias Agopian
9e37abb636 take the state transform into account with h/w composer hal
if the state transform didn't preserve rectangles, we
would still try to use h/w composer hal using the bounds
of the transformed rect, which isn't correct.

now we correctly fall back to composition.

Change-Id: Iff78f4339ece415d4987e95a5717b04934d370ab
2011-07-12 14:51:45 -07:00
Jeff Sharkey
d37948f6ed Hide NetworkStatsHistory internals.
Instead of exposing internal storage details, offer getValues()
accessor which populates values into a recycled structure.

Change-Id: I5228d7099a8f61b2018a435a813435a67dae49b4
2011-07-12 13:57:06 -07:00
Jeff Brown
8c55a9a57e Merge "Remove the simulator target from all makefiles. Bug: 5010576" 2011-07-12 12:15:07 -07:00
Jeff Sharkey
1ea4cc6464 Merge "Return stats from inactive ifaces, packet counts." 2011-07-12 11:09:09 -07:00
Mark Brophy
622c03e6cf Merge "Expose app resume times to the ApplicationProvider." 2011-07-12 02:57:16 -07:00
satok
6df76aa9f1 Merge "Change IME picker dialog from Activity to Broadcast" 2011-07-11 22:12:59 -07:00
Jeff Brown
bd882b1c87 Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11 22:12:16 -07:00
Mathias Agopian
e230189444 Merge "fix a weird use of Vector::appendVector()" 2011-07-11 18:30:41 -07:00
Robert Greenwalt
0870e81467 Merge "Fix wifi tethering." 2011-07-11 16:47:25 -07:00
satok
683e2383c8 Change IME picker dialog from Activity to Broadcast
Change-Id: I4822899f34a2951d2f2a1258d1adcc7d8fccbb12
2011-07-12 08:28:52 +09:00
Mathias Agopian
198fd888ad fix a weird use of Vector::appendVector()
operator= is way more efficient.

Change-Id: I61c9adb1413bed230801a77151b8f7000fd11471
2011-07-11 16:26:36 -07:00
Jeff Brown
9f845cff9b Merge "Increase activity timeouts when using a wrapper process." 2011-07-11 16:00:11 -07:00
Jeff Brown
3f9dd287b9 Increase activity timeouts when using a wrapper process.
This patch enables the Zygote to tell the ActivityManager when
it has started a process with a wrapper attached so that the
ActivityManager can allow it extra time to start up or process
events.

This is useful when wrapping an app with Valgrind or other tools
which add significant runtime overhead.

Bug: 4584468
Change-Id: I5db6f2f15cd30b0ec40f547d2fadfa216de2926d
2011-07-11 15:57:15 -07:00
Mike Lockwood
801525cecc Merge "UsbDeviceManager: Include kernel USB state in dumpsys output" 2011-07-11 15:52:30 -07:00
Mike Lockwood
8f540d4d02 Merge "UsbDeviceManager: Initialize state based on persist.sys.usb.config rather than current kernel state" 2011-07-11 15:52:06 -07:00
Robert Greenwalt
7c34f29c8a Fix wifi tethering.
The new link-status netlink monitor is a bit chatty and we were getting race conditions.
The wl0.1 soft-ap interface was getting created, but in the off state.  We would report
it available (link-added always reports it) causing wifi to start tethering, but then
we'd sometimes get a link-status-down notification and a link-status-up, causing wifi
to freak out with these two requests.

The simple fix was to not listen to the new link-status notifications.  This should be
redesigned in the future.
bug:4983942

Change-Id: Ica4f34d8bf2a07fc19b35a1e15283a7f8022165e
2011-07-11 15:24:43 -07:00
Mike Lockwood
6ea146c239 UsbDeviceManager: Include kernel USB state in dumpsys output
Change-Id: Ia7f015057e24f376e285a40e583644f9d0b9213e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 18:23:44 -04:00
Mike Lockwood
c264afeb55 UsbDeviceManager: Initialize state based on persist.sys.usb.config rather than current kernel state
This makes it more robust when recovering from runtime restarts

Bug: 4986841

Change-Id: I54b94213447130ca881c66da2d0ce490242f0c96
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 18:23:44 -04:00
Jeff Sharkey
fd8be3e5e7 Return stats from inactive ifaces, packet counts.
When an iface goes inactive, xt_qtaguid maintains historical counters
instead of discarding.  Now reading and returning those values in
NetworkManagementService summary calls.  Tests to verify stats are
returned.

Modify NetworkStats to include rxPackets and txPackets values, and
move to Entry to eventually hide internal storage details.

Bug: 4984539
Change-Id: I1ba0bb5580c62e946d9dff2cc2a6f64aff403efc
2011-07-11 14:39:56 -07:00
Jeff Brown
f25a8ce4a6 Merge "Remove more simulator support code. Bug: 5010576" 2011-07-11 13:41:26 -07:00
Jeff Brown
501c4671e7 Merge "Eliminate single-process mode. Bug: 5010576" 2011-07-11 13:37:53 -07:00
Jeff Brown
5d6d90fac8 Remove more simulator support code.
Bug: 5010576

Change-Id: Ie6c8665306bf4e822693b76f25c3a0f05c12d42d
2011-07-11 13:33:22 -07:00
Mike Lockwood
ce060f722a Merge "UsbDeviceManager: Fix indentation" 2011-07-11 10:41:52 -07:00
Mike Lockwood
e6d24ab6a9 Merge "MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system" 2011-07-11 10:41:08 -07:00
Mike Lockwood
abc4ac6d48 UsbDeviceManager: Fix indentation
Change-Id: I3eb1d407bdb4bf885d1765eedbfb30555f558b3b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 13:40:08 -04:00
Mike Lockwood
7a59dd2ce3 MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system
Bug: 4561836

Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-11 13:40:02 -04:00
Jeff Sharkey
104344e507 Cached NTP time for system services.
Uses NTP server and timeout from secure settings, or fallback to
defaults in resources.  Update various system services to use cached
NTP time when fresh enough, or force updates as needed.

Bug: 4517273
Change-Id: Ie1c4c4883836013d02ca0bbd850cf8949f93b34b
2011-07-10 14:25:18 -07:00
Mark Brophy
9fc0330832 Expose app resume times to the ApplicationProvider.
Add ActivityManager.getAllPackageUsageStats which returns
the PkgUsageStats object for all packages.

In UsageStatsService, remember the last resume time of each component, and
add that info to PkgUsageStats instances.

ApplicationProvider will use getAllPackageUsageStats and the new field
in PkgUsageStats to set the new SearchManager column
SUGGEST_COLUMN_LAST_USAGE_HINT for requests with the GLOBAL_SEARCH
permission.

Change-Id: I80e9b127410ed0d528515d2256787f30a953e9b0
2011-07-10 21:19:23 +01:00