summaryrefslogtreecommitdiffstats
path: root/tests/ActivityTests
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue #10115327: MapCollections need to implement equalsDianne Hackborn2013-07-311-0/+59
| | | | Change-Id: I8e7b6dd092442f3870aa1a36bd2a7cd974177146
* Okay, I give in, add null key support to ArrayMap and ArraySet.Dianne Hackborn2013-07-251-10/+18
| | | | Change-Id: Iac5035f9c5884a9f9d5acb38132bb128d7a55249
* ArrayMap is great, so how about ArraySet!Dianne Hackborn2013-06-111-56/+150
| | | | | | | | | | | | Also a few little tweaks to the ArrayMap implementation. Note that these are fairly parallel implementations; I looked at what I could abstract out as a base class, but there isn't really all that much without making the resulting code more general and thus slower. If we kept the data structure for ArraySet the same as map, where the array has two values per entry, then they could probably share a lot of code. I couldn't really bring myself to do that at this point, though... Change-Id: I9e0dd8baa8e1febcc1033ecef61623ad59ce4aae
* Additional functionality and performance for ArrayMapChet Haase2013-06-061-0/+68
| | | | | | | | | | | | | | | Added equals() and hashCode() to ArrayMap to allow equals() tests of maps with the same key/value pairs to return true. Changed putAll() to handle the case of an empty map faster, just copying the arrays instead of adding elements one by one. Added to ArrayMapTests to test new equals() and copy constructor functionality. Issue #9299310 Optimize ArrayMap copy constructor Change-Id: I1186a0eddd1fd53a0f380c2f3972fc1942cdf879
* New ArrayMap class.Dianne Hackborn2013-05-242-1/+310
| | | | | | | | | | | | | | | | | | | | | | | | | This is a new kind of key/value mapping that stores its data as an array, so it doesn't need to create an extra Entry object for every mapping placed in to it. It is also optimized to reduce memory overhead in other ways, by keeping the base object small, being fairly aggressive about keeping the array data structures small, etc. There are some unit and performance tests dropped in to some random places; they will need to be put somewhere else once I decided what we are going to do with this for the next release (for example if we make it public the unit tests should go in to CTS). Switch IntentResolver to using ArrayMap instead of HashMap. Also get rid of a bunch of duplicate implementations of binarySearch, and add an optimization to the various sparse arrays where you can supply an explicit 0 capacity to prevent it from doing an initial array allocation; use this new optimization in a few places where it makes sense. Change-Id: I01ef2764680f8ae49938e2a2ed40dc01606a056b
* Fix test build failureAmith Yamasani2013-01-161-2/+3
| | | | Change-Id: Ic96c2490439a78af2fb92db49b25b67b56954a20
* More activity tests.Dianne Hackborn2012-09-254-3/+142
| | | | Change-Id: Id381ee2db55b135a0734c193fce44c55ef1cdae6
* Improve multi-user broadcasts.Dianne Hackborn2012-08-301-1/+2
| | | | | | | | | | | | | | | | | | | You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
* Switch public APIs to use new UserHandle class for identifying users.Dianne Hackborn2012-08-174-5/+8
| | | | | | Gets rid of "yet another integer" confusion. Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
* Add API to create new contexts with custom configurations.Dianne Hackborn2012-08-141-0/+33
| | | | | | | | | | | | | This allows you to, say, make a Context whose configuration is set to a different density than the actual density of the device. The main API is Context.createConfigurationContext(). There is also a new API on ContextThemeWrapper that allows you to apply an override context before its resources are retrieved, which addresses some feature requests from developers to be able to customize the context their app is running in. Change-Id: I88364986660088521e24b567e2fda22fb7042819
* More mult-user API work.Dianne Hackborn2012-08-075-1/+153
| | | | | | | | | | | - You can now use android:singleUser with receivers and providers. - New API to send ordered broadcasts as a user. - New Process.myUserHandle() API. For now I am trying out "user handle" as the name for the numbers representing users. Change-Id: I754c713ab172494bb4251bc7a37a17324a2e235e
* Add APIs for interacting across users.Dianne Hackborn2012-08-024-12/+103
| | | | | | | | | | | | | | | | - Expose the existing Context.sendBroadcast() as Context.sendBroadcastAsUser(). - Add new android:singleUser attribute for services. - Add new INTERACT_ACROSS_USERS_FULL permission for full system-level access to cross-user interface (allows sendBroadcastAsUser() to send to any receiver). - Add new INTERACT_ACROSS_USERS_FULL permission for more restricted cross-user interaction: this is required for android:singleUser, and allows you to use sendBroadcastAsUser() but only to send to your own receivers. Change-Id: I0de88f6718e9505f4de72e3f45d29c0f503b76e9
* Add new test for showing very slow animations.Dianne Hackborn2012-01-245-0/+124
| | | | Change-Id: Ibcc3e46a72210cf8a8e4cf5a932e2c9a7995f0f1
* Add APIs to remove tasks.Dianne Hackborn2011-04-122-14/+62
| | | | | | | | | | | | | | | | You can remove sub-tasks inside of a task, or an entire task. When removing an entire task, you can have its process killed as well. When the process is killed, any running services will get an onTaskRemoved() callback for them to do cleanup before their process is killed (and the service possibly restarted). Or they can set a new android:stopWithTask attribute to just have the service automatically (cleanly) stopped at this point. Change-Id: I1891bc2da006fa53b99c52f9040f1145650e6808
* Rework thumbnails in activity manager.Dianne Hackborn2011-04-084-0/+158
We now only keep a thumbnail for the task, not for each activity. However if you use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, we will make a new secondary thumbnail for that series of activities. There is a new API for the app to get these secondary thumbnails. Also set a default thumbnail size for non-xlarge screens so we have thumbnails on phones. (We need some smarter code in the platform for computing the actual thumbnail dimensions of the current device). And add a test app to show recent tasks + thumbnails. Change-Id: Ic36759f6635522118a2cb7f156662229a610c492