Android DropBoxManager

来源:互联网 发布:java json 清空 编辑:程序博客网 时间:2024/05/21 12:40
DropBoxManager
在看Handler源码的时候,在同样的包下看到DropBoxManager这样一个类,因为在我的手机里,我记得有这样一个软件叫DropBox,
我看到过,但是没使用过,查了下,才知道这就是一个类似新浪网盘或者金山网盘的工具,或者类似印象笔记的东西,可以同步数据,
现在这样的产品太多了,多的我都用不过来了。
继续了解下,百度百科中的解释:
http://baike.baidu.com/view/2998059.htm
Google的官方文档:http://developer.android.com/intl/zh-CN/reference/android/os/DropBoxManager.html
从2.2开始出现的这个类,竟然现在才知道,无语了。。。,看下官方的解释吧:
Enqueues chunks of data (from various sources -- application crashes, kernel log records, etc.). The queue is size bounded and will drop old data if the enqueued data exceeds the maximum size. You can think of this as a persistent, system-wide, blob-oriented "logcat".
You can obtain an instance of this class by calling getSystemService(String) with DROPBOX_SERVICE.
DropBoxManager entries are not sent anywhere directly, but other system services and debugging tools may scan and upload entries for processing.

看完了我突然发现这个类和我手机中的那个应用不是一个东西。。。

DropBoxManagerService分析
DropBoxManagerService(DBMS)用于生成和管理系统运行时的一些日志文件。这些日志文件大多记录的是系统或某个应用程序出错时的信息。
下面来分析这项服务。其中向SystemServer添加DBMS的代码如下:
ServiceManager.addService(Context.DROPBOX_SERVICE,//服务名为“dropbox”
new DropBoxManagerService(context,
new File("/data/system/dropbox")));


原创粉丝点击