summaryrefslogtreecommitdiffstats
path: root/test-runner
Commit message (Collapse)AuthorAgeFilesLines
...
* Add API to retrieve cursor notification URI.Dianne Hackborn2013-05-151-3/+4
| | | | Change-Id: I89f6c4d6ee6ef3675eff62ff6bca691b54c69f75
* New ContentProvider initialization for testing.Dianne Hackborn2013-02-263-5/+5
| | | | | | Using this turns off app ops checks. Change-Id: If29d4ca2fe9ddf1a1663d3a824b2f0afe7375862
* Add explicit userId to AppWidget binder callsJim Miller2013-02-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keyguard currently relies on being in the system process to grab the given user's widgets. When we split keyguard into a new process, it will need to have access to user-specific info to instantiate a specific user's widgets. In order to accomplish this, we add an explicit userid to each binder call as well as new permission check to allow keyguard access. This also fixes a potential race condition of having an incorrect user id due to an async call to change the user. Every binder call now has a specific user id. The user id is either the calling process user's id or an explicit one passed by applications like keyguard. It is created once when an AppWidgetManager is instantiated and remains for the lifetime of the object. Fixed bug where widgets sometimes didn't show up for secondary users. Moved permission check in AppWidgetService into getImplForUser() Refactored to use userid from context associated AppWidgetManager instance. Clean up AppWidgetHost to use userId from Context. Remove redundant userId check in checkPermission since it's handled by ActivityManager.handleIncomingUser() Removed redundant userid check. Upload after rebase... Change-Id: Iae3e20f2b342c323bb58768b3d22051510f8268b
* App ops: new operations for SMS.Dianne Hackborn2013-02-051-0/+14
| | | | | | | Implementation required a new framework feature to associate an app op with a broadcast. Change-Id: I4ff41a52f7ad4ee8fd80cbf7b394f04d6c4315b3
* Fixing the buildSvetoslav2013-01-281-2/+1
| | | | Change-Id: Ief7654775307c829a60e65217ae821aa6801303c
* Adding UI test automation APIs.Svetoslav Ganov2013-01-222-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds APIs support for implementing UI tests. Such tests do not rely on internal application structure and can span across application boundaries. UI automation APIs are encapsulated in the UiAutomation object that is provided by an Instrumentation object. It is initialized by the system and can be used for both introspecting the screen and performing interactions simulating a user. UI test are normal instrumentation tests and are executed on the device. UiAutomation uses the accessibility APIs to introspect the screen and a special delegate object to perform privileged operations such as injecting input events. Since instrumentation tests are invoked by a shell command, the shell program launching the tests creates a delegate object and passes it as an argument to started instrumentation. This delegate allows the APK that runs the tests to access some privileged operations protected by a signature level permissions which are explicitly granted to the shell user. The UiAutomation object also supports running tests in the legacy way where the tests are run as a Java shell program. This enables existing UiAutomator tests to keep working while the new ones should be implemented using the new APIs. The UiAutomation object exposes lower level APIs which allow simulation of arbitrary user interactions and writing complete UI test cases. Clients, such as UiAutomator, are encouraged to implement higher- level APIs which minimize development effort and can be used as a helper library by the test developer. The benefit of this change is decoupling UiAutomator from the system since the former was calling hidden APIs which required that it is bundled in the system image. This prevented UiAutomator from being evolved separately from the system. Also UiAutomator was creating additional API surface in the system image. Another benefit of the new design is that now test cases have access to a context and can use public platform APIs in addition to the UiAutomator ones. Further, third-parties can develop their own higher level test APIs on top of the lower level ones exposes by UiAutomation. bug:8028258 Also this change adds the fully qualified resource name of the view's id in the emitted AccessibilityNodeInfo if a special flag is set while configuring the accessibility service. Also added is API for looking up node infos by this id. The id resource name is relatively more stable compared to the generaed id number which may change from one build to another. This API facilitate reuing the already defined ids for UI automation. bug:7678973 Change-Id: I589ad14790320dec8a33095953926c2a2dd0228b
* Rework ParceledListSlice to be much easier to use.Dianne Hackborn2013-01-181-0/+6
| | | | | | | | | | | | | | | Take advantage of this to return better information about packages filtered by permissions -- include the permissions they have in the requested array. Also fix issue #8026793 (Contact picture shows default pic while searching for a contact in qsb) by using the base package name of the Context when reporting the app name of an operation. Otherwise you could make a resource-only context for another application and do calls through that and get reported as the wrong app. Change-Id: I5e0488bf773acea5a3d22f245641828e1a106fb8
* Always give ContentResolver a valid Context.Jeff Sharkey2013-01-171-4/+12
| | | | | | | | | Also add MockContentResolver constructor to provide a Context, and move to singleton ActivityThread, since there is only one inside each process. This makes ActivityThread accessible from threads like InstrumentationThread. Change-Id: Ib8b18f1b9bba8820ff412d782a43511066eabf24
* Merge "AppOps: fix nested op tracking, new API to get apps using permissions."Dianne Hackborn2013-01-171-0/+6
|\
| * AppOps: fix nested op tracking, new API to get apps usingDianne Hackborn2013-01-161-0/+6
| | | | | | | | | | | | permissions. Change-Id: I20c7bd58febc01d6911a90440867eaacd133c464
* | Merge "Rename bindService to bindServiceAsUser to follow convention."Amith Yamasani2013-01-161-1/+2
|\ \ | |/ |/|
| * Rename bindService to bindServiceAsUser to follow convention.Amith Yamasani2013-01-161-1/+2
| | | | | | | | | | | | This is for the multi-user version of bindService, not the original. Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
* | More work on App Ops service.Dianne Hackborn2013-01-162-25/+33
|/ | | | | | | | | | | | | | | | | | | | | | | | | Implemented reading and writing state to retain information across boots, API to retrieve state from it, improved location manager interaction to monitor both coarse and fine access and only note operations when location data is being delivered back to app (not when it is just registering to get the data at some time in the future). Also implement tracking of read/write ops on contacts and the call log. This involved tweaking the content provider protocol to pass over the name of the calling package, and some infrastructure in the ContentProvider transport to note incoming calls with the app ops service. The contacts provider and call log provider turn this on for themselves. This also implements some of the mechanics of being able to ignore incoming provider calls... all that is left are some new APIs for the real content provider implementation to be involved with providing the correct behavior for query() (return an empty cursor with the right columns) and insert() (need to figure out what URI to return). Change-Id: I36ebbcd63dee58264a480f3d3786891ca7cbdb4c
* New "app ops" service.Dianne Hackborn2013-01-091-0/+7
| | | | | | | | | | | | | | | | | | | | Initial implementation, tracking use of the vibrator, GPS, and location reports. Also includes an update to battery stats to also keep track of vibrator usage (since I had to be in the vibrator code anyway to instrument it). The service itself is only half-done. Currently no API to retrieve the data (which once there will allow us to show you which apps are currently causing the GPS to run and who has recently accessed your location), it doesn't persist its data like it should, and no way to tell it to reject app requests for various operations. But hey, it's a start! Change-Id: I05b8d76cc4a4f7f37bc758c1701f51f9e0550e15
* am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
|\ | | | | | | | | * commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6': Correct executable bit for source files
| * am 768d9e1a: Merge "Correct executable bit for source files"Kenny Root2012-11-071-0/+0
| |\ | | | | | | | | | | | | * commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04': Correct executable bit for source files
| | * Correct executable bit for source filesKenny Root2012-11-071-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Many media files and source code files were marked as executable in Git. Remove those. Also a shell script and python script were not marked as executable. Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
* | | Remove erroneous override of package-private method.Brett Chabot2012-10-241-2/+2
|/ / | | | | | | Change-Id: I8d473c1eb32f2513d01b3f7f14f0001286a6a9ca
* | Load resources for the correct userAmith Yamasani2012-09-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For apps that are only installed on secondary users, the SystemUI is unable to see them by default. Added some methods to explicitly pass the userId of the user the resources are requested for by the StatusBarIcon Bug: 7214384 Also fix binding to remote views Bug: 7192802 Change-Id: I5d6c5f624aa37fb231f3467f9764c8d99077a91d
* | Merge "Allow acquiring ContentProviders across users." into jb-mr1-devJeff Sharkey2012-09-231-0/+7
|\ \
| * | Allow acquiring ContentProviders across users.Jeff Sharkey2012-09-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise services like SystemUI will always open content://-style Uris as USER_OWNER. Surfaces through createPackageContextAsUser() which points all ContentResolver operations towards a given user. Start using in RemoteViews, so that Notifications correctly resolve image Uris to the sending user. Also add user support for "content" shell tool. Bug: 7202982 Change-Id: I8cb7fb8a812e825bb0b5833799dba87055ff8699
* | | Multi-user support for the accessibility layer.Svetoslav Ganov2012-09-211-3/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. This change converts the accessibility manager service to maintain a state per user. When the user changes the services for the user that is going away are disconnected, the local accessibility managers in the processes for this user are disabled, the state is swapped with the new user's one, and the new user state is refreshed. This change updates all calls into the system to use their user specific versions when applicable. For example, regisetring content observers, package monitors, calls into other system services, etc. There are some components that are shared across users such as UI created by the system process and the SystemUI package. Such components are managed as a global state shared across all users and are updated accordingly on a user switch. Since the SystemUI is running in a normal app process this change adds hidden APIs on the local window manager to allow the SystemUI to notify the accessibility layer that it will run accross users. Calls to AccessibiltyManager's isEnabled(), isTouchExplorationEnabled() and sendAccessibilityEvent return false or a are a nop for a background user sice he should not send accessibility events, and should not perform touch exploration. Update the internal accessibility tests due to changes in the AccessibilityManager. This change also fixes several issues that were encountered such as calling out the accessibility manager service with a lock held. Removed some incorrect debugging code from the TouchExplorer that was leading to a system crash. bug:6967373 Change-Id: I2cf32ffdee1d827a8197ae4ce717dc0ff798b259
* | More multi-user methods in PMAmith Yamasani2012-09-081-0/+13
| | | | | | | | | | | | | | | | pm can list installed packages by user now. Bug: 6926465 Change-Id: I822311bfd6e7e2d6fb315fc484739fbf953c9bb6
* | Add registering for explicit users.Dianne Hackborn2012-09-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | New API to register as an explicit user, which allows you to also select ALL to see broadcasts for all users. New BroadcastReceiver API to find out which user the broadcast was sent to. Use this in app widget service to handle per-user package broadcasts and boot completed broadcasts correctly. Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
* | Initial draft of high-level multi-display APIs.Jeff Brown2012-08-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the ability to create a Context that is bound to a Display. The context gets its configuration and metrics from that display and is able to provide a WindowManager that is bound to the display. To make it easier to use, we also add a new kind of Dialog called a Presentation. Presentation takes care of setting up the context as needed and watches for significant changes in the display configuration. If the display is removed, then the presentation simply dismisses itself. Change-Id: Idc54b4ec84b1ff91505cfb78910cf8cd09696d7d
* | Enforce permissions for calls with specified userIdAmith Yamasani2012-08-301-0/+6
| | | | | | | | | | | | Fix a couple of places where incorrect userIds were being passed in. Change-Id: I398c676e0488ff7e584be96e96c8b32652134238
* | 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