summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2010-02-22 16:03:53 -0800
committerSuchi Amalapurapu <asuchitra@google.com>2010-02-24 20:30:03 -0800
commitc42e29e0a58d07a95d470780216cdf1d67476bd6 (patch)
treebb2a39fe7ddaf416a3a67a98eb12b661c7070d6d /core/java
parent406b09bbd117446814a05aabc5971fd55c6afa5d (diff)
downloadframeworks_base-c42e29e0a58d07a95d470780216cdf1d67476bd6.zip
frameworks_base-c42e29e0a58d07a95d470780216cdf1d67476bd6.tar.gz
frameworks_base-c42e29e0a58d07a95d470780216cdf1d67476bd6.tar.bz2
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.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/storage/IMountService.aidl7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/os/storage/IMountService.aidl b/core/java/android/os/storage/IMountService.aidl
index 79a6cfe..2b2dcf4 100644
--- a/core/java/android/os/storage/IMountService.aidl
+++ b/core/java/android/os/storage/IMountService.aidl
@@ -61,9 +61,12 @@ interface IMountService
/**
* Safely unmount external storage at given mount point.
- * Returns an int consistent with MountServiceResultCode
+ * The unmount is an asynchronous operation. Applications
+ * should register StorageEventListener for storage related
+ * status changes.
+ *
*/
- int unmountVolume(String mountPoint, boolean force);
+ void unmountVolume(String mountPoint, boolean force);
/**
* Format external storage given a mount point.