summaryrefslogtreecommitdiffstats
path: root/tests/AndroidTests/src/com
Commit message (Collapse)AuthorAgeFilesLines
* More framework tests cleanup.Brett Chabot2010-04-0130-10694/+0
| | | | | | | | | | | | Move all tests for android.* classes from tests/AndroidTests and tests/CoreTests into framework/base/<core|graphics>/tests. Consolidate all tests for java.* classes to tests/CoreTests. Eventually hopefully these will be moved to dalvik/ somewhere. Remove tests/AndroidTests entirely. Change-Id: I86584d086ab7bd045bb38a10b699907805298a95
* Move PackageManagerTests and AsecTests.Brett Chabot2010-03-262-2858/+0
| | | | | | | | Remove PackageManagerTests test's from continuous due to flakiness. merged from abandoned master. Change-Id: I0a542df9df572c37bd1aa987cdc9fb2f95001a7c
* Clean up stale containers if needed at install time.Suchi Amalapurapu2010-03-241-19/+44
| | | | | | | | | This is needed when restoring applications installed on sdcard via Market after a data wipe. The stale containers need to be cleaned up before reinstalling again. Add a test case for installing when a stale container exists. Change-Id: I20c30b3003e85fb31531dd3cf9cb59962fe8fe5f
* Merge "Asec: Add new 'StorageNotFound' response code handling for container ↵San Mehat2010-03-231-0/+11
|\ | | | | | | paths"
| * Asec: Add new 'StorageNotFound' response code handling for container pathsSan Mehat2010-03-231-0/+11
| | | | | | | | | | Change-Id: I45d113f77b9f0e519087356b70fc6c4b5c290935 Signed-off-by: San Mehat <san@google.com>
* | Don't delete stale containers on sdcard.Suchi Amalapurapu2010-03-231-3/+1
|/ | | | | | Comment out flaky test Change-Id: Ic7da6421c1a1980c19f7f1c929976432245479fa
* Add new method call back in MountService.Suchi Amalapurapu2010-03-221-0/+3
| | | | | | | | | | | PackageManager invokes this call back when its done handling the media status update. Add new uid check for updateExternalMediaStatus Change killPids method in ActivityManager. Remove mountsd command in Pm.java We cannot arbitrarily enable/disable packages in PackageManager now. Change-Id: I28dcba4afd2b4486f68abdaa1628a31b66544c91
* Grant permissions to apps on sd when enabling/disabling packages.Suchi Amalapurapu2010-03-191-0/+27
| | | | Change-Id: I0f011bd4a3348ccd46fd7ae9765edf8933b94142
* Switch default install location to unspecified.Suchi Amalapurapu2010-03-181-55/+85
| | | | | | | | | | Add a new install location unspecified for backward compatibility. There is not much difference between policies auto and unspecified. But we dont have to make any code changes in PackageParser based on our preference for install location. Add tests Change-Id: I563238133261d911d08fbc66344687b7dfc870b1
* Rework permissions to be retained when an app is temporarily uninstalled.Dianne Hackborn2010-03-181-0/+265
| | | | | | | | | | | This allows us to keep the assigned permissions when apps are temporarily removed due to the SD card being unmounted, and also if you use the facility to uninstall an app but keep its data. Also fixes issue #2515189: Potential permission spoofing attack in Android (external bug 7166) Change-Id: I2a120ec938552028c989f9e0e890c32773957738
* Merge "Add new install flag to install on internal flash only Change default ↵Suchi Amalapurapu2010-03-171-53/+623
|\ | | | | | | install location policy for new flag. New error code for media unavailable."
| * Add new install flag to install on internal flash onlySuchi Amalapurapu2010-03-171-53/+623
| | | | | | | | | | | | | | Change default install location policy for new flag. New error code for media unavailable. Change-Id: I5a5d0828b067692b2b94a15a2bcc7534f796c1a2
* | Merge "Disable the HanziToPinyinTest when there is no Chinese collator."Dmitri Plotnikov2010-03-171-0/+4
|\ \ | |/ |/|
| * Disable the HanziToPinyinTest when there is no Chinese collator.Bai Tao2010-03-181-0/+4
| | | | | | | | Change-Id: I180b927dbb24ceb254fd535633230032a3363562
* | Do storage checks before initiating a move.Suchi Amalapurapu2010-03-161-32/+113
|/ | | | | | | | | | | | Add new remote method to check for insufficient error conditions. Some fixes in MountService when updating media status on PackageManagerService Fix size calculation condition in installd. Add new error code if media is unavailable. New tests for testing error codes. Some additional debugging statements in MountService. Change-Id: Ibfe90d5ed6c71d57f9c1c67806f38b5ae9ecdfbf
* Dont include code size for apps on sdcard.Suchi Amalapurapu2010-03-101-3/+5
| | | | | | | | | Use constants defined in PackageHelper for user preferences to install auto, internal, external. Set default install location to external. Update settings db version number Change-Id: Ib5110c9377990e20a48cee923e55898dfddfd1e6
* Rename ApplicationInfo.FLAG_ON_SDCARD to ↵Suchi Amalapurapu2010-03-101-4/+4
| | | | | | | | ApplicationInfo.FLAG_EXTERNAL_STORAGE Change-Id: Iadef9f9bb2851c38b6d79be1bafbf932abce4210 Change-Id: I2e412bace3d8005db5057a3497bd836d0038b90c
* Merge "Add new shutdown observer for MountService. Use new observer before ↵Mike Lockwood2010-03-091-0/+257
|\ | | | | | | rebooting and shutting down. Add some unit tests for unmount and shutdown code paths Fix registering/unregistering part in MountService Use ShutdownThread in PowerManager.reboot() Add reboot support to ShutdownThread. Remove MountService code from PowerManagerService.java and Power.java. Clean shutdown/reboot is handled exclusively by ShutdownThread now."
| * Add new shutdown observer for MountService.Suchi Amalapurapu2010-03-091-0/+257
| | | | | | | | | | | | | | | | | | | | | | | | Use new observer before rebooting and shutting down. Add some unit tests for unmount and shutdown code paths Fix registering/unregistering part in MountService Use ShutdownThread in PowerManager.reboot() Add reboot support to ShutdownThread. Remove MountService code from PowerManagerService.java and Power.java. Clean shutdown/reboot is handled exclusively by ShutdownThread now. Change-Id: Iefb157451d3d9c426cb431707b870a873c09123d
* | Add conditions to check for updated system applications. Restrict themSuchi Amalapurapu2010-03-091-1/+76
|/ | | | | | | | | | | | | | | | | to internal flash only even before we copy. Return error codes when install flag options mismatch. Some conditions for existings apps - install flags override existing location - explicity manifest option install location overrides previous location - if upgraded package's install location is unspecified or auto, fall back to recommended install policy which considers user setting as well. Check for sdcard status before finding available size on sdcard Add light weight parsing for manifest attributes including package name and install location only Change-Id: I5143dda87c88c595f564b317326c926d0ec3ceb8
* AsecTests: Add a test to validate container sizeSan Mehat2010-03-041-12/+11
| | | | Signed-off-by: San Mehat <san@google.com>
* Rework the way PackageManager binds to default container service.Suchi Amalapurapu2010-03-031-4/+26
| | | | | | | | | | | | | Clean up stale containers when enabling/disabling packages on sdcard. Check the path of packages which are being enabled. Make sure gc's are done prior to destroying containers when moving applicati as well as enabling/disabling packages for sdcard mount status changes. Some miscellaneous issues Remove hack to avoid renaming containers. Fix test with forward locked apps Remove adding container id to asec list when renaming Some cosmetic changes to DefaultContainerService
* Re-arrange android-common so framework no longer links with it.Dianne Hackborn2010-02-253-0/+612
| | | | | | | This is the framework part, moving classes around so the framework no longer needs to link to android-common. Makes some APIs public, others that didn't need to be public are private in the framework, some small things are copied.
* Add new handler mechanism in MountService to make unmount api asynchronous.Suchi Amalapurapu2010-02-241-1/+1
| | | | | | | | | | | MountService updates state on PackageManager and then tries to kill processes holding file references to media about to be unmounted by invoking api on ACtivityManager. This is retried upto 4 times to make sure all processes holding file references are killed before unmounting the media at specified path. Also changed PackageManger api to return boolean value to indicate if MountService is likely to receive broadcasts related to apps on sd.
* AsecTests: Add teardown to testsSan Mehat2010-02-241-0/+8
| | | | Signed-off-by: San Mehat <san@google.com>
* Some framework fixes for apps on sdSuchi Amalapurapu2010-02-242-45/+152
| | | | | | | | | | | | change hard coded path in installd fix tests Work around for renaming containers. Do forced unmount when destroying containers. Force a gc in default container service to release handle to parsed package and thus avoid getting killed by vold Some cosmetic changes to PackageManager api. Unit tests for renaming container for MountService Remove internal size limit on app to be installed.
* MountService: Fix bug which would allow apps to try to rename a container ↵San Mehat2010-02-241-2/+5
| | | | | | whos dst is mounted Signed-off-by: San Mehat <san@google.com>
* Move package from internal to external and vice versa.Suchi Amalapurapu2010-02-191-6/+210
|
* framework: tests: Clean up asec unit tests and add rename testsSan Mehat2010-02-181-72/+157
| | | | Signed-off-by: San Mehat <san@google.com>
* framework: storage: Add 'force' option to unmount/destroy storage apis, and ↵San Mehat2010-02-182-10/+86
| | | | | | | | update callsites. Also adds additional storage unit tests Signed-off-by: San Mehat <san@google.com>
* framework: tests: Add some unit-tests for AsecSan Mehat2010-02-171-0/+168
| | | | Signed-off-by: San Mehat <san@google.com>
* Include install location preference when installing packages.Suchi Amalapurapu2010-02-121-174/+77
| | | | | | | | | | | | | | | | | | | | | Changes include Add new remote call in default container service to determine install location. Rename INSTALL_ON_SDCARD Remove recommentAppInstall method Add some additional flags used in remote stubs. Move check for protected apps prior to copy. Unit tests DefaultContainerService first parses the file uri(if content uri is specified it returns a default install internal only value) and returns a recommended location. Based on which the temporary id is determined either a file name or a container id and the file is copied there. This is then later renamed during install. Todo's light weight parsing of package when determining location since we just need the install location attribute only when finding out recomended location. This will also enable to move the check for updated system apps(cannot be on sdcard) prior to copying.
* Add new manifest option for install locationSuchi Amalapurapu2010-02-101-0/+166
| | | | | | | | | | | | Change recommendAppInstallLocation api add code to parse new attribute. Define flags in PackageInfo Add new settings attributes for enabling setting and value for install location Some tests The policy for install location: if explicitly set in manifest as internal only we try to install the app only on internal storage. if set to preferExternal, we try to install it on sdcard if possible. If not we fall back to internal. If the user enables setting SET_INSTALL_LOCATION(which will always be set to false in final release builds) and sets a prefered location, we try to honour it.
* Framework: Clean up / Refactor Mount APIsSan Mehat2010-02-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | - Move android.storage.* -> android.os.storage.* and refactor users - Refactor generic shares back to explicit ums enable/disable/isEnabled - Remove media insert/removed event callbacks (not ready for Froyo) - Remove 'label' from volume state change callbacks - Add public API functions for enabling/disabling USB mass storage (permissions enforced in MountSevice) - Remove some stray un-needed import lines - Move android.os.IMountService / android.os.IMountServiceListener -> android.os.storage - Improve code comments Updated: MountService: Add dup state check and move debugging behind a conditional UsbStorageActivity: Fix review comments + a TODO StorageNotification: Add @Override tags StorageManager: Don't use a static Listener list MountService: Reduce bloat and fix == where I meant .equals() PackageManagerTests: Update for new API Signed-off-by: San Mehat <san@google.com>
* Rename media resource broadcastsSuchi Amalapurapu2010-02-081-37/+421
| | | | | | Add checks for fwdlocked and updated system apps add more tests remove duplicate adds
* Some tests for install and replace package.Suchi Amalapurapu2010-02-031-0/+387
|
* Phase 2 of test cleanup: moving test files from AndroidTests closer to their ↵Neal Nguyen2010-01-29125-25670/+0
| | | | | | | | | sources. Most of these are file moves; a couple notable exceptions are the changes due to the move, and fixing up test code: - database/DatabaseCursorTest.java - database/DatabaseStatementTest.java - net/UriTest.java
* Merge "dont use sqlite_stmt_journals dir"Vasu Nori2010-01-271-2/+6
|\
| * dont use sqlite_stmt_journals dirVasu Nori2010-01-271-2/+6
| |
* | Merge "Modify the interface of HanziToPinyin class to make it generic and ↵Eugene Koh2010-01-261-0/+70
|\ \ | |/ |/| | | add test class"
| * Modify the interface of HanziToPinyin class to make it generic and add test ↵Bai Tao2010-01-231-0/+70
| | | | | | | | class
* | remove GoogleLoginService unit testDoug Zongker2010-01-221-145/+0
| | | | | | | | | | | | | | This now lives in the vendor/google directory alongside GoogleLoginService itself. Change-Id: Ic934fa563cdad965e5f95c2f6da407ea720bc0bf
* | relocate GoogleLoginServiceDoug Zongker2010-01-211-5/+5
|/ | | | Change-Id: I79f4ff658ab136adcc54c432db76f34d2de5f6ac
* Merge "Update Time.parse3339() unit tests"Kenny Root2010-01-151-14/+16
|\
| * Update Time.parse3339() unit testsKenny Root2010-01-151-14/+16
| | | | | | | | | | | | | | Month should be n-1 from input and timezone is already normalized to UTC. Change-Id: I030c6444f92b96f85acea81f1675edf061bb5451
* | fix a bug in compiled-sql caching & hide public api setMaxSqlCacheSizeVasu Nori2010-01-141-0/+14
| | | | | | | | | | | | | | | | | | | | this is a clone of https://android-git.corp.google.com/g/#change,35174. if the cache is full to its capacity and if a new statement is to be cached, one of the entries in the cache is thrown out to make room for the new one. but the one that is thrown out doesn't get deallocated by SQLiteProgram because it doesn't know that it should. fixed this by having SQLiteProgram finalize its sql statement in releaseReference*() methods, if the statement is not in cache.
* | Merge "Framework Tests Cleanup: Removing CTS duplicate files"Neal Nguyen2010-01-132-63/+0
|\ \
| * | Framework Tests Cleanup: Removing CTS duplicate filesNeal Nguyen2010-01-042-63/+0
| | | | | | | | | | | | | | | | | | This file is basically just a wrapper around AndroidTest, which is going away as part of framework test cleanup. AndroidTests.java is just a wrapper around all the actual tests, so can be removed as well.
* | | Merge "Framework Tests Cleanup: Removing CTS duplicate files"Neal Nguyen2010-01-1313-2603/+0
|\ \ \
| * | | Framework Tests Cleanup: Removing CTS duplicate filesNeal Nguyen2009-12-2313-2603/+0
| |/ / | | | | | | | | | | | | | | | First phase of cleanup: removing duplicate files that already exist in CTS. DatabaseTests.java and ContentTests.java are modified to remove entries of deleted files, the remaining files are deleted duplicates.