Loading api/current.xml +34 −1 Original line number Diff line number Diff line Loading @@ -117332,6 +117332,39 @@ <parameter name="tag" type="java.lang.String"> </parameter> </method> <field name="ACTION_DROPBOX_ENTRY_ADDED" type="java.lang.String" transient="false" volatile="false" value=""android.intent.action.DROPBOX_ENTRY_ADDED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="EXTRA_TAG" type="java.lang.String" transient="false" volatile="false" value=""tag"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="EXTRA_TIME" type="java.lang.String" transient="false" volatile="false" value=""time"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="IS_EMPTY" type="int" transient="false" Loading Loading @@ -216224,7 +216257,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface> core/java/android/os/DropBoxManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,30 @@ public class DropBoxManager { /** Flag value: Content can be decompressed with {@link java.util.zip.GZIPOutputStream}. */ public static final int IS_GZIPPED = 4; /** * Broadcast Action: This is broadcast when a new entry is added in the dropbox. * You must hold the {@link android.Manifest.permission#READ_LOGS} permission * in order to receive this broadcast. * * <p class="note">This is a protected intent that can only be sent * by the system. */ public static final String ACTION_DROPBOX_ENTRY_ADDED = "android.intent.action.DROPBOX_ENTRY_ADDED"; /** * Extra for {@link android.os.DropBoxManager#ACTION_DROPBOX_ENTRY_ADDED}: * string containing the dropbox tag. */ public static final String EXTRA_TAG = "tag"; /** * Extra for {@link android.os.DropBoxManager#ACTION_DROPBOX_ENTRY_ADDED}: * long integer value containing time (in milliseconds since January 1, 1970 00:00:00 UTC) * when the entry was created. */ public static final String EXTRA_TIME = "time"; /** * A single entry retrieved from the drop box. * This may include a reference to a stream, so you must call Loading services/java/com/android/server/DropBoxManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -211,8 +211,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 { Loading Loading @@ -590,7 +596,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 Loading Loading @@ -629,6 +635,7 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub { } else { enrollEntry(new EntryFile(temp, mDropBoxDir, tag, t, flags, mBlockSize)); } return t; } /** Loading Loading
api/current.xml +34 −1 Original line number Diff line number Diff line Loading @@ -117332,6 +117332,39 @@ <parameter name="tag" type="java.lang.String"> </parameter> </method> <field name="ACTION_DROPBOX_ENTRY_ADDED" type="java.lang.String" transient="false" volatile="false" value=""android.intent.action.DROPBOX_ENTRY_ADDED"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="EXTRA_TAG" type="java.lang.String" transient="false" volatile="false" value=""tag"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="EXTRA_TIME" type="java.lang.String" transient="false" volatile="false" value=""time"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="IS_EMPTY" type="int" transient="false" Loading Loading @@ -216224,7 +216257,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="arg0" type="T"> <parameter name="t" type="T"> </parameter> </method> </interface>
core/java/android/os/DropBoxManager.java +24 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,30 @@ public class DropBoxManager { /** Flag value: Content can be decompressed with {@link java.util.zip.GZIPOutputStream}. */ public static final int IS_GZIPPED = 4; /** * Broadcast Action: This is broadcast when a new entry is added in the dropbox. * You must hold the {@link android.Manifest.permission#READ_LOGS} permission * in order to receive this broadcast. * * <p class="note">This is a protected intent that can only be sent * by the system. */ public static final String ACTION_DROPBOX_ENTRY_ADDED = "android.intent.action.DROPBOX_ENTRY_ADDED"; /** * Extra for {@link android.os.DropBoxManager#ACTION_DROPBOX_ENTRY_ADDED}: * string containing the dropbox tag. */ public static final String EXTRA_TAG = "tag"; /** * Extra for {@link android.os.DropBoxManager#ACTION_DROPBOX_ENTRY_ADDED}: * long integer value containing time (in milliseconds since January 1, 1970 00:00:00 UTC) * when the entry was created. */ public static final String EXTRA_TIME = "time"; /** * A single entry retrieved from the drop box. * This may include a reference to a stream, so you must call Loading
services/java/com/android/server/DropBoxManagerService.java +9 −2 Original line number Diff line number Diff line Loading @@ -211,8 +211,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 { Loading Loading @@ -590,7 +596,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 Loading Loading @@ -629,6 +635,7 @@ public final class DropBoxManagerService extends IDropBoxManagerService.Stub { } else { enrollEntry(new EntryFile(temp, mDropBoxDir, tag, t, flags, mBlockSize)); } return t; } /** Loading