summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/DropBoxManagerService.java
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-12-13 13:12:36 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-12-13 13:12:36 -0800
commitdd60ee728d9e44a8c85ed6a99bcfa44beb0afa23 (patch)
tree61ef5b890d810371ea1f6868218132e16c7adf75 /services/java/com/android/server/DropBoxManagerService.java
parent20f9fec02053a4a0146b7ce0a83b067f4eb5b692 (diff)
parent6d13b146e0444f40f45b9fe5812093c5e611b68e (diff)
am 6d13b146: am e78a0009: resolved conflicts for merge of 4b94c451 to stage-korg-master
* commit '6d13b146e0444f40f45b9fe5812093c5e611b68e': Added dropbox broadcast notification
Diffstat (limited to 'services/java/com/android/server/DropBoxManagerService.java')
-rw-r--r--services/java/com/android/server/DropBoxManagerService.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/java/com/android/server/DropBoxManagerService.java b/services/java/com/android/server/DropBoxManagerService.java
index 0a28da7542f0..4305c358919c 100644
--- a/services/java/com/android/server/DropBoxManagerService.java
+++ b/services/java/com/android/server/DropBoxManagerService.java
@@ -218,8 +218,14 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub {
}
} while (read > 0);
- createEntry(temp, tag, flags);
+ long time = createEntry(temp, tag, flags);
temp = null;
+
+ Intent dropboxIntent = new Intent(DropBoxManager.ACTION_DROPBOX_ENTRY_ADDED);
+ dropboxIntent.putExtra(DropBoxManager.EXTRA_TAG, tag);
+ dropboxIntent.putExtra(DropBoxManager.EXTRA_TIME, time);
+ mContext.sendBroadcast(dropboxIntent, android.Manifest.permission.READ_LOGS);
+
} catch (IOException e) {
Slog.e(TAG, "Can't write: " + tag, e);
} finally {
@@ -604,7 +610,7 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub {
}
/** Moves a temporary file to a final log filename and enrolls it. */
- private synchronized void createEntry(File temp, String tag, int flags) throws IOException {
+ private synchronized long createEntry(File temp, String tag, int flags) throws IOException {
long t = System.currentTimeMillis();
// Require each entry to have a unique timestamp; if there are entries
@@ -643,6 +649,7 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub {
} else {
enrollEntry(new EntryFile(temp, mDropBoxDir, tag, t, flags, mBlockSize));
}
+ return t;
}
/**