summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/BootReceiver.java
diff options
context:
space:
mode:
authorDan Egnor <egnor@google.com>2009-11-25 12:38:00 -0800
committerDan Egnor <egnor@google.com>2009-11-25 12:38:00 -0800
commiteb7a7d57ca50f85b054edadab766b51ff22a2dfd (patch)
tree556e05254f66359607699f4dcca123143052e0c4 /services/java/com/android/server/BootReceiver.java
parenta85a0ac1072c7653fdafa791416658154b76ac0d (diff)
Change the DropBoxManager API slightly (this is public, but not yet released) --
take a File instead of a ParcelFileDescriptor (gets opened internally) -- that way the caller doesn't have to worry about closing their PFD and so on. (Pretty much 100% of the time the caller will be uploading a file, anyway.)
Diffstat (limited to 'services/java/com/android/server/BootReceiver.java')
-rw-r--r--services/java/com/android/server/BootReceiver.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java
index 565e50bf1484..84f0068093f6 100644
--- a/services/java/com/android/server/BootReceiver.java
+++ b/services/java/com/android/server/BootReceiver.java
@@ -23,7 +23,6 @@ import android.content.Intent;
import android.os.Build;
import android.os.DropBoxManager;
import android.os.FileUtils;
-import android.os.ParcelFileDescriptor;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Log;
@@ -100,10 +99,6 @@ public class BootReceiver extends BroadcastReceiver {
String setting = "logfile:" + filename;
long lastTime = Settings.Secure.getLong(cr, setting, 0);
if (lastTime == fileTime) return; // Already logged this particular file
-
- ParcelFileDescriptor pfd =
- ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
- db.addFile(tag, pfd, DropBoxManager.IS_TEXT);
- pfd.close();
+ db.addFile(tag, file, DropBoxManager.IS_TEXT);
}
}