summaryrefslogtreecommitdiffstats
path: root/test-runner
Commit message (Collapse)AuthorAgeFilesLines
...
* | Improve multi-user broadcasts.Dianne Hackborn2012-08-301-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Keep track of whether an app is installed for each user.Dianne Hackborn2012-08-242-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This add a new per-user state for an app, indicating whether it is installed for that user. All system apps are always installed for all users (we still use disable to "uninstall" them). Now when you call into the package manager to install an app, it will only install the app for that user unless you supply a flag saying to install for all users. Only being installed for the user is just the normal install state, but all other users have marked in their state for that app that it is not installed. When you call the package manager APIs for information about apps, uninstalled apps are treated as really being not visible (somewhat more-so than disabled apps), unless you use the GET_UNINSTALLED_PACKAGES flag. If another user calls to install an app that is already installed, just not for them, then the normal install process takes place but in addition that user's installed state is toggled on. The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED, PACKAGE_REPLACED etc broadcasts to users who don't have a package installed or not being involved in a change in the install state. There are a few things that are not quite right with this -- for example if you go through a full install (with a new apk) of an app for one user who doesn't have it already installed, you will still get the PACKAGED_REPLACED messages even though this is technically the first install for your user. I'm not sure how much of an issue this is. When you call the existing API to uninstall an app, this toggles the installed state of the app for that user to be off. Only if that is the last user user that has the app uinstalled will it actually be removed from the device. Again there is a new flag you can pass in to force the app to be uninstalled for all users. Also fixed issues with cleaning external storage of apps, which was not dealing with multiple users. We now keep track of cleaning each user for each package. Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
* | Allow verifiers to extend timeoutrich cannings2012-08-231-0/+6
| | | | | | | | | | | | | | | | Create a new verifier API to extend the timeout for a giving package, including the resulting action (allow or deny) upon the timeout occuring. Bug: 6901038 Change-Id: I351f7944327f863aff1d7dd1227be74652fa1511
* | Improve multi-user app management.Dianne Hackborn2012-08-211-1/+2
| | | | | | | | | | | | | | Introduce API to get per-user storage information, keep track of services associated with users, and various small cleanup. Change-Id: I5d4e784e7ff3cccfed627d66a090d2f464202634
* | Pass URLs to package verifiersrich cannings2012-08-201-0/+11
| | | | | | | | | | | | | | | | This change passes the originating URL and accompanied referrer to package verifiers, when available. Bug: 6544677 Change-Id: I9ebc71bc13f549bd88267e444816151a99bda000
* | Refactor for multi-display support.Jeff Brown2012-08-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split WindowManagerImpl into two parts, the WindowManager interface implementation remains where it is but the global communications with the window manager are now handled by the WindowManagerGlobal class. This change greatly simplifies the challenge of having separate WindowManager instances for each Context. Removed WindowManagerImpl.getDefault(). This represents the bulk of this change. Most of the usages of this method were either to perform global functions (now handled by WindowManagerGlobal) or to obtain the default display (now handled by DisplayManager). Explicitly associate each new window with a display and make the Display object available to the View hierarchy. Add stubs for some new display manager API features. Start to split apart the concepts of display id and layer stack. since they operate at different layers of abstraction. While it's true that each logical display uniquely corresponds to a surface flinger layer stack, it is not necessarily the case that they must use the same ids. Added Display.getLayerStack() and started using it in places where it was relatively easy to do. Change-Id: I29ed909114dec86807c4d3a5059c3fa0358bea61
* | Switch public APIs to use new UserHandle class for identifying users.Dianne Hackborn2012-08-171-2/+3
| | | | | | | | | | | | Gets rid of "yet another integer" confusion. Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
* | Add API to create new contexts with custom configurations.Dianne Hackborn2012-08-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | User Manager service to manage users and query user detailsAmith Yamasani2012-08-111-48/+0
| | | | | | | | | | | | | | | | | | | | Moved a bunch of methods from PackageManager to UserManager. Fix launching of activities from recents to correct user. Guest creation APIs Change-Id: I0733405e6eb2829675665e225c759d6baa2b708f
* | Merge "Revert "Pass URLs to package verifiers"" into jb-mr1-devRich Cannings2012-08-081-11/+1
|\ \
| * | Revert "Pass URLs to package verifiers"Rich Cannings2012-08-081-11/+1
| | | | | | | | | | | | | | | | | | This reverts commit 24713907fe4632d263aea82f7a35c8fb08918a09 Change-Id: Ie04ba73475b813635c4a74915c45e83250801b6b
* | | Merge "More mult-user API work." into jb-mr1-devDianne Hackborn2012-08-081-5/+12
|\ \ \
| * | | More mult-user API work.Dianne Hackborn2012-08-071-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | am a8583c29: am 40eee61e: docs: fix broken links and update sitemap text fileScott Main2012-08-071-1/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| * commit 'a8583c2934836572632bb82d1fe7607392d4ca72': docs: fix broken links and update sitemap text file
| * | docs: fix broken linksScott Main2012-08-061-1/+1
| | | | | | | | | | | | | | | | | | and update sitemap text file Change-Id: I6982c3f029c46135ae856b8484d906c2882bad3a
* | | Merge "Add APIs for interacting across users." into jb-mr1-devDianne Hackborn2012-08-021-2/+1
|\ \ \ | |_|/ |/| |
| * | Add APIs for interacting across users.Dianne Hackborn2012-08-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | Pass URLs to package verifiersrich cannings2012-08-021-1/+11
|/ / | | | | | | | | | | | | | | This change passes the originating URL and accompanied referrer to package verifiers, when available. Bug: 6544677 Change-Id: If9ff6663ad7f3426b7aea2aceb1413b689788138
* | am dd4448ef: am 32189e26: Merge "misc doc bug fixes" into jb-devScott Main2012-07-251-1/+1
|\ \ | |/ | | | | | | * commit 'dd4448ef6807f096cdfdf632857baefd7cbc85ec': misc doc bug fixes
| * Merge "misc doc bug fixes" into jb-devScott Main2012-07-251-1/+1
| |\
| | * misc doc bug fixesScott Main2012-07-241-1/+1
| | | | | | | | | | | | Change-Id: I68963d79422e5cedb1726e91e9639860b13a2471
* | | am 71930dd7: am a45746ef: Fix several cases of broken droiddoc syntax ↵Jeff Smith2012-07-252-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | external issue 35214 * commit '71930dd77e4dc6f6be5c648019d2ab0da5f0584c': Fix several cases of broken droiddoc syntax external issue 35214
| * | Fix several cases of broken droiddoc syntaxJeff Smith2012-07-252-2/+2
| |/ | | | | | | | | | | | | | | external issue 35214 patch contributed by Jeff Smith <whydoubt@yahoo.com> Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
* | am 101a120c: am 9be0105f: docs: fix several linksScott Main2012-06-221-1/+1
|\ \ | |/ | | | | | | * commit '101a120c27f68fb7d44e6221244cb9441dfc4285': docs: fix several links
| * docs: fix several linksScott Main2012-06-221-1/+1
| | | | | | | | Change-Id: I89d9fd64dc22c90680bb05415cc966c255165af9
* | Add an icon to the user information.Amith Yamasani2012-06-121-1/+1
| | | | | | | | | | | | | | Store the icon in the user folder under /data/system, similar to how the wallpaper is stored. Change-Id: Id8ccb55b9e2ba7b4c557505a7f69f04eca1518cf
* | am f3b4c93e: am ae5811c7: Merge "Fix (mostly) issue #5109947: Race condition ↵Dianne Hackborn2012-05-291-0/+5
|\ \ | |/ | | | | | | | | | | between retrieving a..." into jb-dev * commit 'f3b4c93e0da9af2db9e16864faa734cf70fecfe3': Fix (mostly) issue #5109947: Race condition between retrieving a...
| * Fix (mostly) issue #5109947: Race condition between retrieving a...Dianne Hackborn2012-05-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...content provider and updating its oom adj This introduces the concept of an "unstable" reference on a content provider. When holding such a reference (and no normal stable ref), the content provider dying will not cause the client process to be killed. This is used in ContentResolver.query(), .openAssetFileDescriptor(), and .openTypedAssetFileDescriptor() to first access the provider with an unstable reference, and if at the point of calling into the provider we find it is dead then acquiring a new stable reference and doing the operation again. Thus if the provider process dies at any point until we get the result back, our own process will not be killed and we can safely retry the operation. Arguably there is still the potential for a race -- if somehow the provider is killed way late by the OOM killer after the query or open has returned -- but this should now be *extremely* unlikely. We also continue to have the issue with the other calls, but these are much less critical, and the same model can't be used there (we wouldn't want to execute two insert operations for example). The implementation of this required some significant changes to the underlying plumbing of content providers, now keeping track of the two different reference counts, and managing them appropriately. To facilitate this, the activity manager now has a formal connection object for a client reference on a content provider, which hands to the application when opening the provider. These changes have allowed a lot of the code to be cleaned up and subtle issues closed. For example, when a process is crashing, we now have a much better idea of the state of content provider clients (olding a stable ref, unstable ref, or waiting for it to launch), so that we can correctly handle each of these. The client side code is also a fair amount cleaner, though in the future there is more than should be done. In particular, the two ProviderClientRecord and ProviderRefCount classes should be combined into one, part of which is exposed to the ContentResolver internal API as a reference on a content provider with methods for updating reference counts and such. Some day we'll do that. Change-Id: I87b10d1b67573ab899e09ca428f1b556fd669c8c
* | Merge "Delete duplicate copies of junit source."Brett Chabot2012-05-118-756/+1
|\ \ | |/ |/|
| * Delete duplicate copies of junit source.Brett Chabot2012-05-098-756/+1
| | | | | | | | | | | | Bug 5826326 Change-Id: Ie361b3778076686c5a59d8392aadb8c86a9ae981
* | Add infrastructure for accessing "unstable" content providers.Dianne Hackborn2012-05-091-0/+12
|/ | | | | | | We have an API and some stuff that purports to this, but no real implementation yet. Change-Id: I93555440014a50fdf79fa3f65318d90fb82265b4
* Merge "Move CancellationSignal to android.os package." into jb-devJeff Brown2012-05-082-2/+2
|\
| * Move CancellationSignal to android.os package.Jeff Brown2012-05-072-2/+2
| | | | | | | | | | Bug: 6427830 Change-Id: I39451bb1e1d4a8d976ed1c671234f0c8c61658dd
* | Add encryption parameters to package installationAnonymous Coward2012-05-071-5/+3
|/ | | | Change-Id: Ic9f8ab9f8110f08bb3c00725cfce5b8ee7b766f3
* Upgrade junit.runner classes to their JUnit4.10 implementation.Brett Chabot2012-04-1117-776/+810
| | | | | | Bug 5826326 Change-Id: If7e4c48a4369c1056dee5a2049c891bb6ab7d8d0
* Try Alternate Constructor for Single Method TestsBrian Muramatsu2012-04-031-2/+23
| | | | | | | | | Some tests do not have a no argument constructor. If they don't have one, then try a constructor with a String argument. A lot of CTS tests from open source projects have different practices and may not have a no arg constructor. Change-Id: I87c490c22347a2f4b03c3125308be0d2259f9208
* User management and switchingAmith Yamasani2012-03-271-0/+9
| | | | | | | | | | | | | | | | | | | 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
* Remove unused BandwidthTestRunnerDavid Hu2012-03-191-92/+0
| | | | Change-Id: I5d77682cf662cc88e3d182501c78bb77805e74d1
* BandwidthTestCaseDavid Hu2012-03-191-32/+0
| | | | | | | A test case that measures bandwidth metrics when annotated with android.test.BandwidthTest and adds the metrics to the status bundle Change-Id: I085110c66c7fcf651aefeeac3d4cdf5bd438ff67
* Add new "options" argument to all startActivity APIs.Dianne Hackborn2012-03-141-0/+17
| | | | | | | | This will be used to allow new features to be requested... such as, say, a special kind of animation. Right now there are no options defined. Change-Id: I4eb6f27275cdd4bf186f6da316ab93a2372ad4b7
* New development permissions.Dianne Hackborn2012-02-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are permissions that an application can request, but won't normally be granted. To have the permission granted, the user must explicitly do so through a new "adb shell pm grant" command. I put these permissions in the "development tools" permission group. Looking at the stuff there, I think all of the permissions we already had in that group should be turned to development permissions; I don't think any of them are protecting public APIs, and they are really not things normal applications should use. The support this, the protectionLevel of a permission has been modified to consist of a base protection type with additional flags. The signatureOrSystem permission has thus been converted to a signature base type with a new "system" flag; you can use "system" and/or "dangerous" flags with signature permissions as desired. The permissions UI has been updated to understand these new types of permissions and know when to display them. Along with doing that, it also now shows you which permissions are new when updating an existing application. This also starts laying the ground-work for "optional" permissions (which development permissions are a certain specialized form of). Completing that work requires some more features in the package manager to understand generic optional permissions (having a facility to not apply them when installing), along with the appropriate UI for the app and user to manage those permissions. Change-Id: I6571785c6bb5f6b291862b7a9be584885f88f3a5
* Fix Power Control widgetAmith Yamasani2012-02-161-0/+6
| | | | | | | | | | Some changes in AppWidgetService were interfering with widget permissions. Added some hidden methods in Context to communicate the requesting user information instead of using the calling uid. Bug: 6019296 Change-Id: I5e519fd3fbbfa5b3fcc5c297b729c671dac8e7c7
* Multi-user - wallpaper serviceAmith Yamasani2012-02-101-0/+6
| | | | | | | | | | | | - Allow each user to have their own wallpaper (live or static). - Migrate old wallpaper on upgrade. - Update SystemBackupAgent to backup/restore from primary user's new wallpaper directory. Reduce dependency on Binder.getOrigCallingUser() by passing the userId for bindService. Change-Id: I19c8c3296d3d2efa7f28f951d4b84407489e2166
* Rename CancellationSignal using preferred spelling.Jeff Brown2012-02-022-6/+6
| | | | | Bug: 5943637 Change-Id: I12a339f285f4db58e79acb5fd8ec2fc1acda5265
* Implement a cancelation mechanism for queries.Jeff Brown2012-01-272-2/+14
| | | | | | | | | | | | | Added new API to enable cancelation of SQLite and content provider queries by means of a CancelationSignal object. The application creates a CancelationSignal object and passes it as an argument to the query. The cancelation signal can then be used to cancel the query while it is executing. If the cancelation signal is raised before the query is executed, then it is immediately terminated. Change-Id: If2c76e9a7e56ea5e98768b6d4f225f0a1ca61c61
* Merge "BandwidthTestRunner"David Hu2012-01-053-0/+134
|\
| * BandwidthTestRunnerDavid Hu2011-12-143-0/+134
| | | | | | | | | | | | | | Added BandwidthTest annotation and BandwidthTestRunner to start and stop the network traffic profiler Change-Id: Id29ac21ab99ff36bd864121276db59b61eb6e154
* | docs: Add developer guide cross-references, Project ACRE, round 4Joe Fernandez2011-12-225-2/+33
|/ | | | Change-Id: I1b43414aaec8ea217b39a0d780c80a25409d0991
* Fix ownership of CursorWindows across processes.Jeff Brown2011-10-092-35/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5332296 Ensure that there is always an owner for each CursorWindow and that references to each window are acquired/released appropriately at all times. Added synchronization to CursorToBulkCursorAdaptor to prevent the underlying Cursor and CursorWindow from being remotely accessed in ways that might violate invariants, resulting in leaks or other problems. Ensured that CursorToBulkCursorAdaptor promptly releases its references to the Cursor and CursorWindow when closed so they don't stick around longer than they should, even if the remote end hangs onto the IBulkCursor for some reason. CursorWindow respects Parcelable.FLAG_WRITE_RETURN_VALUE as an indication that one reference to the CursorWindow is being released. Correspondingly, CursorToBulkCursorAdaptor acquires a reference to the CursorWindow before returning it to the caller. This change also prevents races from resulting in the transfer of an invalid CursorWindow over the wire. Ensured that BulkCursorToCursorAdaptor promptly releases its reference to the IBulkCursor when closed and throws on attempts to access the cursor while closed. Modified ContentProviderNative to handle both parts of the wrapping and unwrapping of Cursors into IBulkCursors. This makes it a lot easier to ensure that the right things happen on both ends. Also, it turns out that the only caller of IContentProvider.bulkQuery was ContentProviderNative itself so there was no need to support bulkQuery on ContentProviderProxy and it was just getting in the way. Implement CloseGuard on CursorWindow. Change-Id: Ib3c8305d3cc62322f38a06698d404a2989bb6ef9
* Allow non-required package verifiersKenny Root2011-09-231-0/+2
| | | | | | | | | | * Verifiers can be specified in the AndroidManifest.xml * Those verifiers can respond to the new Intent action * PackageManager API for those verifiers: verifyPendingInstall Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5