summaryrefslogtreecommitdiffstats
path: root/packages/DefaultContainerService/src
Commit message (Collapse)AuthorAgeFilesLines
* Always close incoming PFD to avoid leaking.Jeff Sharkey2013-04-251-0/+2
| | | | Change-Id: I9559bb1e83c9bf2f9fd2af9c7b0d8b9e3aadc4ae
* Improve performance of storage measurement.Jeff Sharkey2013-03-011-8/+11
| | | | | | | | | | | | | | When calculating directory sizes of data living on emulated external storage, translate the path to use the internal backing data, which avoids going through the emulation layer. It carefully retreats to the original path when it runs into trouble. Testing with a hierarchy of 10 directories deep and 2 directories and 10 files wide at each level, this change improves performance from 5900ms before to 250ms after; over 20 times faster (!). Bug: 8172425 Change-Id: Ia7365416f091e102bf7345a49f7d7209a22580a9
* Quiet down a lot of logging.Dianne Hackborn2012-11-271-1/+1
| | | | | | | Also fix a little problem where the USER_STARTED broadcasts were not being sent as ordered broadcasts(!). Change-Id: I3aa3e0a9b3900967cdd2d115ee103371b0a50c41
* Try to free cache before giving up on installKenny Root2012-10-181-0/+15
| | | | | | | | Try to get installd to free up cache before giving up when there is too little space free. Bug: 7232123 Change-Id: Ie3c8ca8dfc190abbb9a29a7baee31f32e9de7d69
* Migrate more Secure settings to Global.Jeff Sharkey2012-09-271-2/+2
| | | | | | | | Migrate networking, storage, battery, DropBox, and PackageManager related Secure settings to Global table. Bug: 7232014, 7231331, 7231198 Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
* Always bind to DefaultContainerService as OWNER.Jeff Sharkey2012-09-231-7/+9
| | | | | | | | | When PackageManagerService deals with external storage, always bind to DefaultContainerService as USER_OWNER. This avoids binding to a stopped user, which would fail. Bug: 7203111 Change-Id: I8e303c7558e8b5cbe4fea0acc9a472b598df0caa
* Keep track of whether an app is installed for each user.Dianne Hackborn2012-08-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix issue #6761130: Clearing app data in settings does not clear app's USB ↵Dianne Hackborn2012-06-291-0/+10
| | | | | | | | | | storage The package manager calls to clear data / clear cache were not also having default container service clear the data on external storage. Now they do. Change-Id: Ib5e5eb6adf2cac5a4cc094cc1a02ac8cfb6a2edf
* Change thread priority for disk measurement to bgKenny Root2012-05-141-0/+4
| | | | | | | | | | | Change the thread priority for all disk measurement and statfs calls to background priority. Also move the measurement fully into the measurement task since it makes more sense. Bug: 6332097 Change-Id: Iafc2151313ad9b14117daf67e933dccd32f68d54
* Use long instead of int for file offsetsKenny Root2012-05-101-7/+18
| | | | | | | | Use long instead of int so we don't run into a 2GB file limit. Fix possible overflows in offset and length. Change-Id: Idb3a34f5600f9c2372b9c89256f21757049fa43b
* Add encryption parameters to package installationAnonymous Coward2012-05-071-58/+218
| | | | Change-Id: Ic9f8ab9f8110f08bb3c00725cfce5b8ee7b766f3
* Fix some problems with ASECsKenny Root2012-05-021-2/+9
| | | | | | | | | | | | On devices that had external storage, permissions weren't set correctly on non-forward-locked applications. Also, moving forward locked applications didn't work since DefaultContainerService wasn't able to read it. Fixed some faulty unit tests as well. Bug: 6427212 Change-Id: I5c1f0bf5278549069c78939f0708c4c43a7d4006
* Allow forward locked apps to be in ASECsKenny Root2012-04-251-42/+78
| | | | | | | | | | | | | | | We couldn't put forward-locked apps in ASEC containers before since we didn't have any permissioned filesystems. This adds the ability for forward-locked applications to be in ASEC containers. This means that forward locked applications will be able to be on the SD card now. This change also removes the old type of forward-locking that placed parts of apps in /data/app-private. Now all forward-locked applications will be in ASEC containers. Change-Id: I17ae0b0d65a4a965ef33c0ac2c47e990e55707ad
* Expose statfs() through IMediaContainerService.Jeff Sharkey2012-04-221-0/+16
| | | | | Bug: 6346248 Change-Id: I03ae02578f546fc9f19652cbdece56e2e0ab6a1c
* Allow non-required package verifiersKenny Root2011-09-231-0/+1
| | | | | | | | | | * Verifiers can be specified in the AndroidManifest.xml * Those verifiers can respond to the new Intent action * PackageManager API for those verifiers: verifyPendingInstall Change-Id: I4892bce2e6984871e6e93c60a1ca0dae145f5df5
* Fix external size calculationsKenny Root2011-08-151-3/+3
| | | | | | | | Unfortunately fixed internal size calculations for HC, but never the external size calculations. Bug: 5113898 Change-Id: Idfe8af0ba74a20aa767eb9abac431ee1c74dcf8e
* Better errors from copyResourceKenny Root2011-08-101-53/+53
| | | | | | | | | | | | | | Copy resource would fail without a good error code when the file couldn't be found during copy. Also destroy the target container ID during move operations since it might exist. If the copy failed due to it existing, it would get destroyed anyway. This way the user has a chance to have a good outcome the first time. Bug: 3375299 Bug: 5113898 Change-Id: I00559833f0801bc50e7cc031b462495e37a6b4ab
* Better error codes for missing filesKenny Root2011-08-031-71/+123
| | | | | | | | | | | | Make sure that files that don't exist aren't returning bogus 'out of space' error codes. Add some Javadoc so I can remember what each thing does in an IDE. Add copyright header to NativeLibraryHelper Bug: 3375299 Change-Id: Iac46019160921daca65b21d38897e5165063316e
* Move extract native libraries to JNI codeKenny Root2011-07-261-28/+1
| | | | | | | | | | | | | The built-in ZipFile class was quite a long time to find an unpack libraries. Move everything to using the libutils ZipFileRO class that goes quite a bit faster. Initial measurements are 6 times faster than the Java code. Also, read files off the disk and compare their CRC against the APK's CRC to see if we need to write the new file to disk. This also cuts down the bootup time by up to a second per APK that has native files. Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
* Revise free space checks for package installsKenny Root2011-03-141-146/+163
| | | | Change-Id: Ie72bbab77aa89a50ec096edc1f471eab74829e67
* Erase OBB files when removing packagesKenny Root2011-01-181-0/+1
| | | | | | | | OBB files on USB storage or SD card should be removed when an application is removed. Bug: 3356804 Change-Id: Ifbbf043368b125fcd47fd74e5cd2e5167a8deb00
* Put externalSize measurements in PackageStatsKenny Root2011-01-161-2/+7
| | | | | | | | | When measuring a package's usage, put the external size in the PackageStats as well. This will allow programs using a lot of space on the external card to be held accountable. Bug: 3308791 Change-Id: If2df07bdbf6ffb31577074fad8f4a87ca4e89086
* Add measurement API to DefaultContainerServiceKenny Root2010-12-042-0/+34
| | | | | | | | | | System applications that don't have "media_rw" access need some way to measure the size of directories on the SD card and other internal media. Add this API to DefaultContainerService so they can simply bind to the service and make an RPC. Bug: 3203974 Change-Id: I4e1bcd7a1b702b156c011ecc04f6915022cb258a
* Add API to check for emulated external storageKenny Root2010-10-121-1/+1
| | | | | | | | | | When the storage is emulated, we don't want to install ASEC containers to it. This adds the API to check when the external storage is emulated and uses it to check whether or not to install packages to the external storage in an ASEC container. Bug: 3024387 Change-Id: Ia0318aca9e4938a4897deaada5603a4c7c1d0f48
* Hash keys with MD5; track IBinders not IInterfaceKenny Root2010-09-301-1/+1
| | | | | | | | | | | | Using a plaintext password doesn't work unless it's a certain length, so just hash the plaintext password with MD5 to make it the right length for the twofish encryption. Tracking the IInterface doesn't make much sense since it's different each time, so track the IBinder instead. That way we can unlinkToDeath the binder when the last thing it's holding onto goes away. Change-Id: Id828d25b4d74f27e9d8b4bfb3909c964469cc473
* Update OBB API to include callbacksKenny Root2010-09-281-1/+6
| | | | | | | | | | | | Add a callback for users of the StorageManager API to be able to receive notifications when the requested operation completes for mountObb and unmountObb. Add NDK API to get to ObbInfo like the Java API has. Also update the docs for the API and remove the "STOPSHIP" comments. Change-Id: I23a4409c7f8b74d3169614beba920b4d667990a4
* Allow native shared libraries in ASEC containersKenny Root2010-08-271-6/+75
| | | | | | | | | | | This change moves the native library handling earlier in the package installation process so that it may be inserted into ASEC containers before they are finalized in the DefaultContainerService. Note that native libraries on SD card requires that vold mount ASEC containers without the "noexec" flag on the mount point. Change-Id: Ib34b1886bf6f94b99bb7b3781db6e9b5a58807ba
* Move OBB file reading to DefaultContainerServiceKenny Root2010-08-111-0/+6
| | | | | | | | | The system_server shouldn't touch files on the SD card. This change moves the things that touch the SD card out to the DefaultContainerService so that it will get killed if the SD card goes away instead of the system_server. Change-Id: I0aefa085be4b194768527195532ee6dddc801cfc
* Do not deference before null checkKenny Root2010-08-021-2/+1
| | | | | | | | | The return of parsePackageLite wasn't checked until after it was deferenced. Move the deference below the null check and remove redundant set. Bug: 2852726 Change-Id: I3eaaea5050948145eed44b64507dc846993d98eb
* Fix error code when media is filled up.Suchi Amalapurapu2010-04-221-1/+1
| | | | Change-Id: Id8dae2e7c967e3f103aecd2f31abb7e292af8f1d
* Dont fall back to installing on sdcard when internal storage is filled upSuchi Amalapurapu2010-04-141-3/+0
| | | | | | | | | | | when the install location is set to internal only. Similary if install location is set to external only(via adb), dont fall back to installing on internal storage if sdcard is filled up. If nothing is specified ie install location is set to let system decide, we just check on internal storage. Fix tests Change-Id: I7400ccc131782d9c45284bd9ebd0dee43a3b412b
* Fix 2579461Suchi Amalapurapu2010-04-071-18/+12
| | | | | | | | Move install location values to secure settings. Diable attribute for UI. Set default value to auto. Add command line interface to set install location via pm. Change-Id: I80e97b3d24845adad7102f40dcbe238f00efa406
* Add new install flag to install on internal flash onlySuchi Amalapurapu2010-03-171-62/+89
| | | | | | | Change default install location policy for new flag. New error code for media unavailable. Change-Id: I5a5d0828b067692b2b94a15a2bcc7534f796c1a2
* Do storage checks before initiating a move.Suchi Amalapurapu2010-03-161-19/+58
| | | | | | | | | | | | 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
* Add correct copyright headers to multiple filesKenny Root2010-03-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format for the list of changes shows the origin commit reference followed by the file name. 33931-p9 awt/org/apache/harmony/awt/gl/font/AndroidGlyphVector.java 33931-p9 awt/org/apache/harmony/awt/gl/image/PngDecoderJava.java 133776-p9 core/java/android/app/IntentService.java 127013-p9 core/java/android/appwidget/AppWidgetHost.java 27863-p9 core/java/android/bluetooth/BluetoothAudioGateway.java 60765-p9 core/java/android/content/SyncResult.java 43920-p9 core/java/android/content/pm/ActivityInfo.java 43920-p9 core/java/android/content/pm/ApplicationInfo.java 43920-p9 core/java/android/content/pm/InstrumentationInfo.java 43920-p9 core/java/android/content/pm/PackageInfo.java 44103-p9 core/java/android/content/pm/PackageItemInfo.java 68960-p9 core/java/android/content/pm/PackageStats.java 43920-p9 core/java/android/content/pm/ResolveInfo.java 43920-p9 core/java/android/content/pm/ServiceInfo.java 60641-p9 core/java/android/content/res/Configuration.java 60734-p9 core/java/android/content/res/TypedArray.java 137672-p9 core/java/android/inputmethodservice/ExtractButton.java 123112-p9 core/java/android/inputmethodservice/ExtractEditText.java 119291-p9 core/java/android/inputmethodservice/IInputMethodSessionWrapper.java 112946-p9 core/java/android/inputmethodservice/IInputMethodWrapper.java 115078-p9 core/java/android/os/BatteryStats.java 124790-p9 core/java/android/text/style/UpdateAppearance.java 45083-p9 core/java/android/view/RawInputEvent.java 101491-p9 core/java/android/view/inputmethod/EditorInfo.java 114701-p9 core/java/android/view/inputmethod/ExtractedText.java 123112-p9 core/java/android/view/inputmethod/ExtractedTextRequest.java 119291-p9 core/java/com/android/internal/os/HandlerCaller.java 129279-p9 core/java/com/android/internal/os/PkgUsageStats.java 114701-p9 core/java/com/android/internal/view/IInputConnectionWrapper.java 114701-p9 core/java/com/android/internal/view/InputConnectionWrapper.java 84364-p9 opengl/java/android/opengl/EGLLogWrapper.java 11355-p9 opengl/tools/glgen/src/CFunc.java 11355-p9 opengl/tools/glgen/src/CType.java 11355-p9 opengl/tools/glgen/src/CodeEmitter.java 11355-p9 opengl/tools/glgen/src/GenerateGL.java 11355-p9 opengl/tools/glgen/src/JFunc.java 11355-p9 opengl/tools/glgen/src/JType.java 11355-p9 opengl/tools/glgen/src/JniCodeEmitter.java 11355-p9 opengl/tools/glgen/src/ParameterChecker.java 57236-p9 services/java/com/android/server/status/AnimatedImageView.java 66754-p9 services/java/com/android/server/status/CloseDragHandle.java 57188-p9 services/java/com/android/server/status/DateView.java 46928-p9 services/java/com/android/server/status/ExpandedView.java 70590-p9 services/java/com/android/server/status/FixedSizeDrawable.java 45968-p9 services/java/com/android/server/status/IconData.java 57470-p9 services/java/com/android/server/status/IconMerger.java 82719-p9 services/java/com/android/server/status/LatestItemView.java 45968-p9 services/java/com/android/server/status/NotificationData.java 66754-p9 services/java/com/android/server/status/NotificationLinearLayout.java 57458-p9 services/java/com/android/server/status/NotificationViewList.java 45968-p9 services/java/com/android/server/status/StatusBarException.java 45968-p9 services/java/com/android/server/status/StatusBarIcon.java 46130-p9 services/java/com/android/server/status/StatusBarNotification.java 45968-p9 services/java/com/android/server/status/StatusBarView.java 46199-p9 services/java/com/android/server/status/Ticker.java 62286-p9 services/java/com/android/server/status/TickerView.java 57188-p9 services/java/com/android/server/status/TrackingView.java 86041-p9 telephony/java/android/telephony/PhoneStateListener.java 87020-p9 telephony/java/com/android/internal/telephony/TelephonyIntents.java 136269-p9 telephony/java/com/android/internal/telephony/gsm/SpnOverride.java 34409-p9 tests/FrameworkTest/src/com/android/frameworktest/FrameworkTestApplication.java 55717-p9 tests/FrameworkTest/src/com/android/frameworktest/performance/InvalidateCycle.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/AutoCompleteTextViewActivityLandscape.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/AutoCompleteTextViewActivityPortrait.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/BottomEditTextActivityPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/BottomEditTextActivityResize.java 127341-p9 tests/ImfTest/src/com/android/imftest/samples/ButtonActivity.java 129347-p9 tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java 129372-p9 tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityNoScrollPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollPanScan.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/ManyEditTextActivityScrollResize.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/OneEditTextActivityNotSelected.java 128994-p9 tests/ImfTest/src/com/android/imftest/samples/OneEditTextActivitySelected.java 25959-p9 tests/framework-tests/src/android/test/FrameworkTests.java 46162-p9 tests/framework-tests/src/com/android/internal/http/multipart/MultipartTest.java 77101-p9 tools/layoutlib/bridge/tests/com/android/layoutlib/bridge/NinePatchTest.java 9788976b1465ce982b5ae7c741345edd0ecd9322 core/java/android/accounts/AuthenticatorDescription.java 53332883543868fb83e111a07306368b7772b340 core/java/android/app/UiModeManager.java 93e7e22ec91dbc641d10ca6d70423e1357a95bba core/java/android/app/FullBackupAgent.java 328c0e7986aa6bb7752ec6de3da9c999920bb55f core/java/android/content/CursorEntityIterator.java 307da1a46b4c9b711bafe8fbaaa6b98e8868c18e core/java/android/content/SyncQueue.java 307da1a46b4c9b711bafe8fbaaa6b98e8868c18e core/java/android/content/SyncOperation.java eb034652c2037a47ebfd99779e8383bb8bb528af core/java/android/content/pm/LabeledIntent.java 49237345d83e62fdb9eb8d50b13ad086636a04fa core/java/android/content/pm/FeatureInfo.java a2b6c3775ed6b8924232d6a01bae4a19740a15f8 core/java/android/content/pm/PackageInfoLite.java 3ecd5f437580e49d80beecd29489d5fb1f7a7db0 core/java/android/content/pm/RegisteredServicesCacheListener.java 5ebbb4a6b3e16f711735ae0615b9a9ea64faad38 core/java/android/content/pm/XmlSerializerAndParser.java c4516a7b62de525e3d6d5e76851bdfaf12c11f05 core/java/android/database/sqlite/SQLiteTransactionListener.java 9bbc21a773cbdfbef2876a75c32bda5839647751 core/java/com/android/internal/backup/LocalTransport.java 21f1bd17b2dfe361acbb28453b3f3b1a110932fa core/java/com/android/internal/content/PackageMonitor.java 4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 core/java/com/android/internal/view/BaseSurfaceHolder.java 4c62fc0e1e5ea9c69a12a7d1cf8b3ec8b2d114a3 core/java/com/android/internal/view/BaseIWindow.java e540833fdff4d58e37c9ba859388e24e2945ed45 core/java/com/android/internal/os/SamplingProfilerIntegration.java 192ab903887bbb8e7c7b6da5c581573850e30f46 core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java 1619367ab823150fa8856d419abe02ceb75886f1 media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java 27f8002e591b5c579f75b2580183b5d1c4219cd4 opengl/tools/glgen/stubs/gles11/glGetString.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java 560814f6b11abe83ff0c4ed18cac015c276b3181 opengl/tools/glgen/stubs/gles11/glShaderSource.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/GenerateGLES.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/Jsr239CodeEmitter.java 1c4907ee77392afb768c2f088e0dedbe4239f6fb opengl/tools/glgen/src/GLESCodeEmitter.java 69e21f5f6e0d04539cd92848ea009dd615d88c2c opengl/tests/gldual/src/com/android/gldual/TriangleRenderer.java c028be4f3b8c7476b46859f66c3f33d528adf181 packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerMeasurement.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java 7c6efa13f129dbae5319f0981a430d4662f43354 tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestRunner.java df8a3f31d871db25e952972c2eb346a71186e9e3 tests/BrowserTestPlugin/src/com/android/testplugin/TestPlugin.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/ServiceManagerPermissionTests.java cfaef699e1dfb3a75d5b51f3b15816f13670fd51 tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java Copyright header moved to top in following file: core/tests/coretests/src/android/widget/ListViewTest.java Change-Id: I3c3198be5a0ba36e18679ed834170432bf0b8418
* Dont include code size for apps on sdcard.Suchi Amalapurapu2010-03-101-3/+3
| | | | | | | | | 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
* Add conditions to check for updated system applications. Restrict themSuchi Amalapurapu2010-03-091-86/+67
| | | | | | | | | | | | | | | | | 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
* Null check for scheme.Suchi Amalapurapu2010-03-031-33/+60
| | | | | | If scheme is unspecified let package parse continue. We will return errors if parsing fails anyway. If scheme is not null, restrict it to being a file uri.
* Rework the way PackageManager binds to default container service.Suchi Amalapurapu2010-03-031-50/+29
| | | | | | | | | | | | | 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
* Some framework fixes for apps on sdSuchi Amalapurapu2010-02-241-3/+5
| | | | | | | | | | | | 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.
* Move package from internal to external and vice versa.Suchi Amalapurapu2010-02-191-2/+6
|
* Move mount service wrapper calls to PackageHelperSuchi Amalapurapu2010-02-161-121/+22
| | | | Fix bug related to forward locked apps.
* Include install location preference when installing packages.Suchi Amalapurapu2010-02-121-2/+145
| | | | | | | | | | | | | | | | | | | | | 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.
* New external storage APIs.Dianne Hackborn2010-02-091-2/+39
| | | | | | | | | | | This implements the spec for external storage organization, and properly reflects how the media scanner organizes the files it finds. Also includes package manager support for removing app private files from external storage when the application is uninstalled. For the new APIs and paths, the main place to look is Environment and Context.
* Framework: Clean up / Refactor Mount APIsSan Mehat2010-02-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | - 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>
* Apps on sdcard: Add new broadcastsSuchi Amalapurapu2010-02-021-3/+10
| | | | | | | | | | | | | Add new broadcasts ACTION_MEDIA_RESOURCES_AVAILABLE and ACTION_MEDIA_RESOURCES_UNAVAILABLE that get broadcast by PackageManagerService when sdcard gets mounted/unmounted by MountService so that packages on sdcard get recognized by various system services as being installed/available or removed/unavailable by the system. The broadcasts are sent before the actual package cleanup which includes mounting/unmounting the packages and we force a gc right after so that any lingering file references to resources on sdcard get released.
* DefaultContainerService: Refactor MountService calls (new api)San Mehat2010-02-021-39/+34
| | | | Signed-off-by: San Mehat <san@google.com>
* AppsOnSd feature - Add default containerSuchi Amalapurapu2010-01-271-0/+305
Add new remote interface to do temporary copies. The new remote stub handling is done on mHandler thread and doesn't need locking for now. Add new InstallArgs class and subclasses to isolate cases for installation. Move resource deletion for failed installs/upgrades to later on in installation cycle. Fix code path for forward locked apps when using scanPackageLI TODO's Fix installation paths to completely use InstallArgs based design later on. Get rid of using flags in various install/uninstall code paths. Ideally InstallArgs should be created using these flags and used in the rest of the code. Function renames. Revisit mount api's.