summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-09-21 11:32:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-21 11:32:01 -0700
commiteb4d5b253733a699c16f0a50a8e8642ec49ed9ae (patch)
treeda438bbb6a1c6afa72fb9e26fb1e4cfc9a11af5a
parentb9881e6b94607334673566493c904f6741087938 (diff)
parent4baf641e7d96375eba3f9a3aff5400b9e3d28cd6 (diff)
downloadframeworks_base-eb4d5b253733a699c16f0a50a8e8642ec49ed9ae.zip
frameworks_base-eb4d5b253733a699c16f0a50a8e8642ec49ed9ae.tar.gz
frameworks_base-eb4d5b253733a699c16f0a50a8e8642ec49ed9ae.tar.bz2
Merge "recovery just takes a filename as an argument now (do not merge)" into gingerbread
-rw-r--r--core/java/android/os/RecoverySystem.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index 5fea6fe..e56e257 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -307,8 +307,10 @@ public class RecoverySystem {
* Requires the {@link android.Manifest.permission#REBOOT} permission.
*
* @param context the Context to use
- * @param packageFile the update package to install. Currently
- * must be on the /cache or /data partitions.
+ * @param packageFile the update package to install. Must be on
+ * a partition mountable by recovery. (The set of partitions
+ * known to recovery may vary from device to device. Generally,
+ * /cache and /data are safe.)
*
* @throws IOException if writing the recovery command file
* fails, or if the reboot itself fails.
@@ -316,15 +318,6 @@ public class RecoverySystem {
public static void installPackage(Context context, File packageFile)
throws IOException {
String filename = packageFile.getCanonicalPath();
-
- if (filename.startsWith("/cache/")) {
- filename = "CACHE:" + filename.substring(7);
- } else if (filename.startsWith("/data/")) {
- filename = "DATA:" + filename.substring(6);
- } else {
- throw new IllegalArgumentException(
- "Must start with /cache or /data: " + filename);
- }
Log.w(TAG, "!!! REBOOTING TO INSTALL " + filename + " !!!");
String arg = "--update_package=" + filename;
bootCommand(context, arg);