925 Commits

Author SHA1 Message Date
Mike Lockwood
17bc415ded Merge "Add new shutdown observer for MountService. 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." 2010-03-09 14:50:18 -08:00
Suchi Amalapurapu
6ffce2e9a3 Add new shutdown observer for MountService.
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
2010-03-09 17:00:18 -05:00
Suchi Amalapurapu
a2b6c3775e Add conditions to check for updated system applications. Restrict them
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
2010-03-09 09:24:35 -08:00
Steve Block
5ac2a3bd69 Removes from DumpRenderTree the superfluous result file for tests that time out.
This file is currently not used. Tests that time out are reported as failures.

Also fixes naming in code for tests that have no text results.

Change-Id: I6412db4dcf9884abdc80f5cff525ef9431bad001
2010-03-09 14:36:00 +00:00
Steve Block
9902279abb Removes regex tests from the DumpRenderTree skipped list
It looks like these were previously exluded due to taking too long. However,
they run in a reasonable time on passion.

Also removes AppleScript from the skipped list, as this directory no longer exists.

Change-Id: I98e3d0b3222dcd79287b15c512430341fab4f0f8
2010-03-09 12:29:59 +00:00
Steve Block
432e0eade7 Add shared workers tests to DumpRenderTree skipped list
Change-Id: I307bf718253ad3e340d3a95b1056523f37d150be
2010-03-09 12:20:48 +00:00
Christopher Tate
4528186e0d Refactor android.backup => android.app.backup
Change-Id: I0b21316ff890d7f3c7d4b82837bb60670724c2e8
2010-03-05 16:27:15 -08:00
San Mehat
9d05a18490 AsecTests: Add a test to validate container size
Signed-off-by: San Mehat <san@google.com>
2010-03-04 10:08:29 -08:00
Steve Block
780a1cb7ad Merge "Removes some storage tests from the DumpRenderTree skipped lists, now that Android-specific results are provided" 2010-03-04 03:06:42 -08:00
Suchi Amalapurapu
9b10ef5fe8 Rework the way PackageManager binds to default container service.
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
2010-03-03 14:06:10 -08:00
Steve Block
7e47f171b5 Removes some storage tests from the DumpRenderTree skipped lists, now that Android-specific results are provided
See https://android-git.corp.google.com/g/#change,42763

Change-Id: I9929b73db0f6764bb06fbe963e751294a4a787f0
2010-03-03 19:04:22 +00:00
Ying Wang
c882ddacc8 Fix Proguard flags. 2010-03-02 09:36:33 -08:00
Steve Block
e60f6730b6 Merge "Removes a Geolocation test from the DumpRenderTree skipped list" 2010-03-01 10:54:30 -08:00
Steve Block
666eecc1e3 Merge "Adds to DumpRenderTree the ability to look for Android-specific results" 2010-03-01 10:53:22 -08:00
Steve Block
12077e1179 Adds to DumpRenderTree the ability to look for Android-specific results
These Android-specific results will be added to
external/webkit/LayoutTests/platform/android-<js-engine> and are used in
preference to the generic expected results.

The JavaScript engine to use is read from the JS_ENGINE environment variable
used by the build system or can be overridden on the command line. If neither
is set, it defaults to JSC.

Change-Id: Ia8d107ced3968a5c061fd6f0f57451419bab6b27
2010-02-26 17:19:51 +00:00
Dianne Hackborn
2269d1572e Re-arrange android-common so framework no longer links with it.
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.
2010-02-25 11:39:33 -08:00
Steve Block
fc735eefe1 Removes a Geolocation test from the DumpRenderTree skipped list
We now have an Android-specific expected result for this test.

Change-Id: I41919f01ac0fb6f07f0d650695462510f3a37d98
2010-02-25 11:31:21 +00:00
Steve Block
c8f22299b1 Merge "Add HTML5 layout tests that currently fail to the DumpRenderTree skipped list" 2010-02-25 03:17:36 -08:00
Suchi Amalapurapu
c42e29e0a5 Add new handler mechanism in MountService to make unmount api asynchronous.
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.
2010-02-24 20:30:03 -08:00
Steve Block
f7483b1d5c Add HTML5 layout tests that currently fail to the DumpRenderTree skipped list
All of these tests should pass on Android. This is a temporary measure to track
all of these failures in a central place and to provide a consistent baseline
for DumpRenderTree test results while the problems are fixed.

Change-Id: I2cfaaa8df07be3b43c8e6517f75a7c438f147150
2010-02-24 22:11:07 +00:00
San Mehat
7db3e5e287 AsecTests: Add teardown to tests
Signed-off-by: San Mehat <san@google.com>
2010-02-24 12:13:54 -08:00
Suchi Amalapurapu
cf6eaeaae9 Some framework fixes for apps on sd
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.
2010-02-24 11:31:36 -08:00
Mike Lockwood
c8998e1735 Merge "LocationTracker: change copyright from Google to AOSP." 2010-02-24 10:00:51 -08:00
Mike Lockwood
8ab8b411b8 LocationTracker: change copyright from Google to AOSP.
Change-Id: Id74bf74ac8eb372617136b4021853270d4bf5174
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-24 12:59:14 -05:00
San Mehat
85451ee15f MountService: Fix bug which would allow apps to try to rename a container whos dst is mounted
Signed-off-by: San Mehat <san@google.com>
2010-02-24 08:54:18 -08:00
Brian Carlstrom
778ce48665 Issue 5697: getContextClassLoader returns a non-application classloader
ActivityThread should try to set the value for Java
Thread.getContextClassLoader to the PathClassLoader that loaded the
APK's classes so that Java frameworks that use the Java context class
loader, which is not to be confused with the
android.content.Context.getClassLoader which serves a similar purpose
in the Android framework.

However, we avoid setting the Java context ClassLoader to the APK's
PathClassLoader if there is a static indication that multiple packages
may share the VM, since they could load in an unpredictable order
leading to different values for the thread local Java context
ClassLoader. In this case, we instead use a specially created
WarningContextClassLoader that warns the user the first time the Java
context ClassLoader.

Currently the static indications that a package might share a VM with
other packages are the presence in the AndroidManifest of a
sharedUserId or requesting a non-default application process name.
2010-02-23 15:58:00 -08:00
Mike Lockwood
191d898468 Move LocationTracker from com.google.android to com.android package.
Change-Id: I75757373e39669955d5f753a31a2a7b78d0b68ed
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-23 07:50:18 -05:00
Mike Lockwood
e5a1d4a21e Merge "Move LocationTracker test app from vendor/google to frameworks/base/tests" 2010-02-22 20:58:43 -08:00
Mike Lockwood
c9d3be3f0e Move LocationTracker test app from vendor/google to frameworks/base/tests
Change-Id: I49f1bfe2081f2c48fcb22b74aa2377857c2bae6d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-02-22 23:57:44 -05:00
Guang Zhu
8cd303aec6 Quick fix layout test path problems
SD card mount point has changed from /sdcard to /mnt/sdcard. layout test was calling getCanonicalPath to determine the path to the test case, which causes problem because /sdcard is now a symlink, and canonical path is actually the "real" path. Using quick dirty fix for now, will properly migrate any hard-coded reference to "/sdcard" to system function calls.
2010-02-22 17:45:05 -08:00
Steve Block
164bd79537 In DumpRenderTree, skip tests for which we have the wrong results
Currently, the list of tests with incorrect results is not used.

Change-Id: I5d3ab9bde6201c2574f08c7c87efa4873ee6fdd1
2010-02-22 14:28:05 +00:00
Brett Chabot
e70f61b116 Retry test-runner tests move.
This time change the frameworks makefile so it only includes test-runner/src
in the public API.
2010-02-20 17:29:05 -08:00
Christopher Tate
1bb6906c7a Automatically restore app data at install time
When an application being installed defines a backupAgent in its manifest, we
now automatically perform a restore of the latest-known-good data for that app.
This is defined as "data backed up by this app from this handset, if available;
otherwise data for this app as it existed when the device was initially
provisioned."  If neither option exists for the app, no restore action is
taken.

The CL involves major changes in the Backup and Package Managers...

* The Package Manager's act of installing an application has now been split
into two separate phases, with a data-restore phase optionally occurring
between these two PM actions.  First, the details of the install are performed
as usual.  Instead of immediately notifying install observers and issuing the
install-related broadcasts, the in-process install state is snapshotted and
the backup manager notified that a restore operation should be attempted.  It
does this by calling a new API on IBackupManager, passing a token by which it
identifies its in-progress install state.

The backup manager then downloads [if possible] the data for the newly-installed
application and invokes the app's backupAgent to do the restore.  After this
step, regardless of failure, it then calls back into the Package Manager to
indicate that the restore phase has been completed, supplying the token that
was passed in the original notification from the Package Manager.

The Package Manager then runs the final post-install actions: notifying install
observers and sending out all the appropriate broadcasts.  It's only at this
point that the app becomes visible to the Launcher and the rest of the OS.

... and a few other bits and pieces...

* The ApplicationInfo.backupAgentName field has been exposed to the SDK.  This
can be reverted if there's a reason to do so, but it wasn't clear that this
info needs to be hidden from 3rd party apps.

* Debug logging of restore set IDs and operation timeout tokens [used during
any asynchronous Backup Manager operation] are now consistently in hex for
readability.

* We now properly reset our binder identity before calling into the transport
during restore-set operations.  This fixes a permissions failure when a
single-app restore was attempted.

* The 'BackupTest' test app is no longer lumped onto the system partition
by default.

Change-Id: If3addefb846791f327e2a221de97c8d5d20ee7b3
2010-02-19 17:24:07 -08:00
Suchi Amalapurapu
6c81defa3d Merge "Move package from internal to external and vice versa." 2010-02-19 14:27:29 -08:00
Suchi Amalapurapu
8946dd3355 Move package from internal to external and vice versa. 2010-02-19 14:20:54 -08:00
Steve Block
5e8f52f5c5 Ignore TEMPLATE.html in LayoutTest directories
Change-Id: I5b1bbd915a569568db368d678a5cc32309fd7be5
2010-02-19 18:47:17 +00:00
Steve Block
2eae0694ea Merge "Remove tests that no longer exist from the DumpRenderTree skipped list" 2010-02-19 10:45:28 -08:00
Steve Block
0584242360 Merge "Merges unused bug list with ignored result list in DumpRenderTree" 2010-02-19 10:45:00 -08:00
Brett Chabot
c1ca8c51c6 Revert "Move framework test-runner unit tests to be closer to their source."
This reverts commit 12093976a4842a795491cfd2b1d3b71e18503f2d.
2010-02-19 10:31:05 -08:00
Brett Chabot
9db619e5d3 Merge "Move framework test-runner unit tests to be closer to their source. Move the test-runner source into a separate src folder to accommodate the test move." 2010-02-19 10:02:10 -08:00
Brett Chabot
12093976a4 Move framework test-runner unit tests to be closer to their source.
Move the test-runner source into a separate src folder to accommodate the test
move.
2010-02-19 09:58:29 -08:00
Steve Block
f53833b728 Remove tests that no longer exist from the DumpRenderTree skipped list
Change-Id: If927b40bc3aebdf73b6d23d6cda06cdf31479778
2010-02-19 15:44:34 +00:00
Steve Block
52f4362ecd Merges unused bug list with ignored result list in DumpRenderTree 2010-02-19 14:59:22 +00:00
Ben Murdoch
8a032a3b29 Pass key modifier state to webcore for touch events and update DRT so it can simulate them.
Change-Id: Ic5aa8cb0376f6a3eecaa6340d57f28fa97f016bd
2010-02-19 11:47:31 +00:00
San Mehat
da2ca7a5b8 framework: tests: Clean up asec unit tests and add rename tests
Signed-off-by: San Mehat <san@google.com>
2010-02-18 13:19:38 -08:00
San Mehat
d970998b0d framework: storage: Add 'force' option to unmount/destroy storage apis, and update callsites.
Also adds additional storage unit tests

Signed-off-by: San Mehat <san@google.com>
2010-02-18 11:48:48 -08:00
Steve Block
0668db2adc Merge "Sorts the lists of tests in DumpRenderTree in preparation for cleaning up the lists." 2010-02-17 11:25:28 -08:00
Steve Block
be6079a76c Merge "Removes tests from DumpRenderTree skipped list where the corresponding bugs have been fixed." 2010-02-17 11:04:53 -08:00
San Mehat
fea87ae1a7 framework: tests: Add some unit-tests for Asec
Signed-off-by: San Mehat <san@google.com>
2010-02-17 09:05:16 -08:00
Steve Block
cdb4ef4cdb Sorts the lists of tests in DumpRenderTree in preparation for cleaning up the lists. 2010-02-16 18:03:49 +00:00