summaryrefslogtreecommitdiffstats
path: root/test-runner
Commit message (Collapse)AuthorAgeFilesLines
* Per-app media directories on external storage.Jeff Sharkey2014-05-301-0/+5
| | | | | | | | | | This change defines per-app directories on external storage that will be scanned and included in MediaStore. This gives apps a way to write content to secondary shared storage in a way that can easily be surfaced to other apps. Bug: 14382377 Change-Id: I4cb367c870509e76f0c2c598f01e2f699780030a
* Variant of sendBroadcast with appOp flag for cross-user.Amith Yamasani2014-05-161-0/+10
| | | | | | Needed for delivering SMS notifications to multiple users. Change-Id: Ib772292699aba37144621742e6f0ee5c68aadd78
* Initial support for split APKs, PackageInstaller.Jeff Sharkey2014-05-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Defines a new PackageInstaller class that will be used for installing and upgrading packages. An application desiring to install an application creates a session, stages one or more package files in that session, and then kicks off the install. Previously, PackageManager would always make its own copy of a package before inspecting it, to ensure the data could be trusted. This new session concept allows the installer to write package data directly to its final resting place on disk, reducing disk I/O and footprint requirements. Writes are directed through an intermediate pipe to ensure we can prevent mutations once an install has been initiated. Also uses fallocate() internally to support optimal ext4 block allocation using extents to reduce fragmentation. Sessions are also the way we support installing multiple "split" APKs in a single atomic operation. For a set of packages to form a valid application, they must have exactly the same package name, version code, and certificates. A session can also be used to add a small handful of splits to an application by inheriting existing packages when not performing a full install. Add PackageParser support for extracting split names and certificates. Bug: 14975160 Change-Id: I23d1bf4fbeb9f99a8c83be0c458900a0f0d1bccc
* Cleaning code related to the forwarding intent filters.Nicolas Prevot2014-05-061-0/+17
| | | | | | | Checking for INTERACT_ACROSS_USERS_FULL Adding equivalent methods in the PackageManager Change-Id: Iaa1328fa666613a78e67ca669ea045144275e895
* am 9e99cab7: am 970417c7: Added getLeanbackLaunchIntentForPackage()Jose Lima2014-04-111-0/+6
|\ | | | | | | | | * commit '9e99cab7d9a0ec2315140c21bb1958eb7ff76a09': Added getLeanbackLaunchIntentForPackage()
| * Added getLeanbackLaunchIntentForPackage()Jose Lima2014-04-111-0/+6
| | | | | | | | Change-Id: I23be3bfa59be812a915adc37e08fdf59be8ad90f
* | Expand install observer semanticsChristopher Tate2014-03-271-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and now fail conservatively when two apps both attempt to define the same permission. Apps signed with the same certificate are permitted to redefine permissions. We also finally have a (hidden) interface class for observing package installation so that we can now rev the interface without breaking existing callers. Bug 13551375 Change-Id: Ifa4e59154dcccbb286ee46a35a6f25e4ad0f0f01
* | Revert "Expand install observer semantics"Glenn Kasten2014-03-261-31/+0
| | | | | | | | | | | | This reverts commit ab8a501f255b272af887acb0e66eb71cdf24c755. Change-Id: I4ab4ae1a96efa2adf9d5a513793d8b84eef38b4e
* | Expand install observer semanticsChristopher Tate2014-03-251-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | ...and now fail conservatively when two apps both attempt to define the same permission. We also finally have a (hidden) interface class for observing package installation so that we can now rev the interface without breaking existing callers. Bug 13551375 Change-Id: I3a286d024a30e812ee4b098f345401df3c00e178
* | resolved conflicts for merge of 4882ddfa to masterJose Lima2014-03-131-0/+21
|\ \ | |/ | | | | Change-Id: I179899697c148ac34a67b195e2dbd3df2f9138de
| * Add banner attribute to app manifestJose Lima2014-03-121-0/+21
| | | | | | | | Change-Id: I28b0dc6dee9623ec7534bb0e741b88f439b48c9f
* | Tabs -> spaces in frameworks/base.John Spurlock2014-02-251-1/+1
| | | | | | | | Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
* | am e014eb63: am fc6b772f: am bf6d0797: am 2f1c2e32: am 3126ce6e: Merge ↵quddusc2014-01-161-2/+3
|\ \ | |/ | | | | | | | | | | "docs: Fixed typo in InstrumentationTestRunner page. Bug: 11386360" into klp-docs * commit 'e014eb6368f380545113fc115a6002da2d124726': docs: Fixed typo in InstrumentationTestRunner page. Bug: 11386360
| * docs: Fixed typo in InstrumentationTestRunner page.quddusc2014-01-141-2/+3
| | | | | | | | | | | | Bug: 11386360 Change-Id: I7626fe6fe1a22e223a8929ed3e5178c8df8966c9
* | Remove unused imports from frameworks/base.John Spurlock2013-11-2013-31/+0
| | | | | | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* | Set mServiceCreated to false when onDestroy().Mathew Inwood2013-10-221-0/+1
|/ | | | | | | | If tests call shutdownService() themselves, we should not call onDestroy() again from tearDown(). Set mServiceCreated to false when we call onDestroy to prevent this. Change-Id: I618cb770cb43072273abdd2fdffd3390911203a1
* Add <intent-filter> support to <provider>.Jeff Sharkey2013-10-071-0/+12
| | | | | | | | | | | | | | For the new documents work, we're only interested in the subset of ContentProviders that actually implement DocumentsContract. Instead of returning all providers, add <intent-filter> support to make it easier to limit the set of returned ProviderInfo. Define a well-known action for DocumentsProviders, and start using it when querying for roots. Continue supporting the old <meta-data> approach until all apps have been updated. Bug: 8599233 Change-Id: I05f049bba21311f5421738002f99ee214447c909
* Add hidden API for querying available 'home' activitiesChristopher Tate2013-09-131-0/+7
| | | | | | | | To support improved home-app selection UX in Settings. Bug 9958444 Change-Id: I106090784618bf7bea6fce28f4f9b9fb8480d310
* Fix issue #10688644: Java crash in com.android.phone:Dianne Hackborn2013-09-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | java.lang.SecurityException: Operation not allowed There was a situation I wasn't taking into account -- components declared by the system has a special ability to run in the processes of other uids. This means that if that code loaded into another process tries to do anything needing an app op verification, it will fail, because it will say it is calling as the system package name but it is not actually coming from the system uid. To fix this, we add a new Context.getOpPackageName() to go along-side getBasePackageName(). This is a special call for use by all app ops verification, which will be initialized with either the base package name, the actual package name, or now the default package name of the process if we are creating a context for system code being loaded into a non-system process. I had to update all of the code doing app ops checks to switch to this method to get the calling package name. Also improve the security exception throw to have a more descriptive error message. Change-Id: Ic04f77b3938585b02fccabbc12d2f0dc62b9ef25
* Work on issue #10130785: Restore silence and vibrate settings...Dianne Hackborn2013-09-062-0/+20
| | | | | | | | | ...in settings > sound Add a new ContentProvider API to canonicalize URIs, so they can be transported across backup/restore. Change-Id: Ie5af3662f6822a32310e49c7f1e1ff084986c56e
* Add CancellationSignal support to file operations.Jeff Sharkey2013-08-232-6/+10
| | | | | | | | | | | | | | | | | | | | Since ContentProvider file operations can end up doing substantial network I/O before returning the file, allow clients to cancel their file requests with CancellationSignal. Ideally this would only be needed for openFile(), but ContentResolver heavily relies on openAssetFile() and openTypedAssetFile() for common cases. Also improve documentation to mention reliable ParcelFileDescriptors and encourage developers to move away from "rw" combination modes, since they restrict provider flexibility. Mention more about places where pipes or socket pairs could be returned. Improve DocumentsContract documentation. Bug: 10329944 Change-Id: I49b2825ea433eb051624c4da3b77612fe3ffc99c
* Catch a few extra users of UserEnvironment.Jeff Sharkey2013-08-111-0/+15
| | | | Change-Id: I3112773b72c329893e4118ef1c4f4087d899139e
* Single-user restrictionsAmith Yamasani2013-06-251-0/+19
| | | | | | | | | | | Introduces a new "blocked" state for each package. This is used to temporarily disable an app via Settings->Restrictions. PIN creation and challenge activities for use by Settings and other apps. PIN is stored by the User Manager and it manages the interval for retry attempts across reboots. Change-Id: I4915329d1f72399bbcaf93a9ca9c0d2e69d098dd
* Add activity token to display system.Craig Mautner2013-06-221-2/+2
| | | | | | | | First step in adding activity specific information to displays. Replace CompatibilityInfoHolder with DisplayAdjustmentsHolder that holds an activity token in addition to the CompatibilityInfo. Change-Id: Ie113cd8dd9c62e0b5311204e039a4829096bea68
* 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