372 Commits

Author SHA1 Message Date
Suchi Amalapurapu
089262dc02 Dont include code size for apps on sdcard.
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
2010-03-10 16:08:51 -08:00
Suchi Amalapurapu
6069beb2df Rename ApplicationInfo.FLAG_ON_SDCARD to ApplicationInfo.FLAG_EXTERNAL_STORAGE
Change-Id: Iadef9f9bb2851c38b6d79be1bafbf932abce4210

Change-Id: I2e412bace3d8005db5057a3497bd836d0038b90c
2010-03-10 09:46:49 -08:00
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
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
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
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
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
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
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
Suchi Amalapurapu
8946dd3355 Move package from internal to external and vice versa. 2010-02-19 14:20:54 -08: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
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
Suchi Amalapurapu
5b993ce7bc Include install location preference when installing packages.
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.
2010-02-12 18:50:47 -08:00
Suchi Amalapurapu
117818e4f1 Add new manifest option for install location
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.
2010-02-10 08:59:08 -08:00
San Mehat
b104340496 Framework: Clean up / Refactor Mount APIs
- 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>
2010-02-09 11:03:16 -08:00
Suchi Amalapurapu
b56ae20b22 Rename media resource broadcasts
Add checks for fwdlocked and updated system apps
add more tests
remove duplicate adds
2010-02-08 14:52:25 -08:00
Jeff Hamilton
420bc12ed0 Remove reference to unused static library.
Change-Id: I5ad76658129b003fb96fc1e960a12f6e672da108
2010-02-05 18:27:08 -06:00
Suchi Amalapurapu
afbaaa189f Some tests for install and replace package. 2010-02-03 17:34:18 -08:00
Neal Nguyen
1a44d5dcab Phase 2 of test cleanup: moving test files from AndroidTests closer to their 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
2010-01-29 13:35:51 -08:00
Vasu Nori
445cc0e4bf Merge "dont use sqlite_stmt_journals dir" 2010-01-27 12:10:56 -08:00
Vasu Nori
ad8d0d1b4d dont use sqlite_stmt_journals dir 2010-01-27 12:10:14 -08:00
Eugene Koh
bce2806a37 Merge "Modify the interface of HanziToPinyin class to make it generic and add test class" 2010-01-26 16:48:52 -08:00
Bai Tao
4256586663 Modify the interface of HanziToPinyin class to make it generic and add test class 2010-01-23 12:57:21 +08:00
Doug Zongker
39b17a1566 remove GoogleLoginService unit test
This now lives in the vendor/google directory alongside
GoogleLoginService itself.

Change-Id: Ic934fa563cdad965e5f95c2f6da407ea720bc0bf
2010-01-22 14:23:14 -08:00
Doug Zongker
0a2fb2174e relocate GoogleLoginService
Change-Id: I79f4ff658ab136adcc54c432db76f34d2de5f6ac
2010-01-21 14:36:17 -08:00
Kenny Root
d60e31cbe3 Merge "Update Time.parse3339() unit tests" 2010-01-15 14:44:58 -08:00
Kenny Root
de8aa87016 Update Time.parse3339() unit tests
Month should be n-1 from input and timezone is already normalized to
UTC.

Change-Id: I030c6444f92b96f85acea81f1675edf061bb5451
2010-01-15 14:23:20 -08:00
Vasu Nori
e495d1f74a fix a bug in compiled-sql caching & hide public api setMaxSqlCacheSize
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.
2010-01-14 15:22:58 -08:00
Neal Nguyen
96e40b4b37 Merge "Framework Tests Cleanup: Removing CTS duplicate files" 2010-01-13 14:19:11 -08:00
Neal Nguyen
8d1966eac0 Merge "Framework Tests Cleanup: Removing CTS duplicate files" 2010-01-13 14:18:48 -08:00
Neal Nguyen
83fe5de254 Merge "Framework Tests Cleanup: Removing CTS duplicate files" 2010-01-13 14:18:17 -08:00
Romain Guy
980a938c1c Deprecate fill_parent and introduce match_parent.
Bug: #2361749.
2010-01-08 15:11:38 -08:00
Doug Zongker
edc5189c33 change remaining frameworks/base Gservices to Secure settings
Change-Id: I61bdb05a2526523700c2833154d5a4133881ef10
2010-01-07 15:00:37 -08:00
Doug Zongker
43866e0c48 move some system services from gservices to secure settings
Change-Id: Ie2dfb99a2b42b2cc9310b858c044d8684e3493fa
2010-01-07 14:20:39 -08:00
Daisuke Miyakawa
1301341f13 Fix test breakage in vCard exporter.
Due to the change Iae8dbac1, all tests for vCard exporeter has failed.
This change fixes the breakage by using a kind of dirty Dependency Injection.

Current test framework for vCard exporter strongly depends on the assumption that
ContentValues objects are able to be directly passed to objects which use
ContentResolver, while the change above disabled the feature by removing
queryEntities().

This change makes VCardComposer forcibly uses queryEntities() via Reflection.
I agree that this change is not so clean, but works fine for now.
2010-01-05 13:44:51 +09:00
Neal Nguyen
ae46195d4f Framework Tests Cleanup: Removing CTS duplicate files
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.
2010-01-04 12:23:56 -08:00
Dan Egnor
e38d58bf89 Remove Google-specific (or only-used-by-Google-code) classes.
Fix a small typo in Context javadoc.
2010-01-04 10:14:21 -08:00
Neal Nguyen
2574d50bd5 Framework Tests Cleanup: Removing CTS duplicate files
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.
2009-12-23 18:05:01 -08:00
Neal Nguyen
c19be0527c Framework Tests Cleanup: Removing CTS duplicate files
NeighboringCellInfoTest.java is already included in CTS, so removing this one under frameworks.
2009-12-23 16:30:36 -08:00
Tom Taylor
f0108cda21 resolved conflicts for merge of ad2fa35d to master
Change-Id: Ia4362cd48ac0689b91003943a4cd9660da72ff90
2009-12-22 10:11:55 -08:00
Jean-Baptiste Queru
5237f019b9 am c4978805: merge from open-source master
Merge commit 'c4978805dc8837570701629a9b8098e80804ad34'

* commit 'c4978805dc8837570701629a9b8098e80804ad34':
  ImageButton example doesn't work. Default state should be at the last.
  Time.parse3339 range checking and proper 'sec-frac' skip
2009-12-21 15:52:57 -08:00
Tom Taylor
ad2fa35d88 am d4a4729c: Update imports to android-common
Merge commit 'd4a4729c0cac582a2dcec7c8cfb316b81885a0f0' into eclair-mr2-plus-aosp

* commit 'd4a4729c0cac582a2dcec7c8cfb316b81885a0f0':
  Update imports to android-common
2009-12-21 15:44:34 -08:00
Tom Taylor
d4a4729c0c Update imports to android-common
Several files were moved to android-common. Update all the references
to import those files from the new location.
2009-12-21 13:59:18 -08:00
Paul Westbrook
b8d4698818 Bug 2330278
Deleted old copy of SimplePullParser, since it has been moved to
gdata
2009-12-17 10:47:17 -08:00
Paul Westbrook
01dde47ea9 Bug 2326468
Deleted old copy of the GoogleHttpClient, and the unit tests.
2009-12-15 14:26:13 -08:00
Paul Westbrook
e143bc92b2 resolved conflicts for merge of 15d3bb2c to master 2009-12-14 10:56:45 -08:00