Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 设置为清除logcat的权限_Android_Android Manifest - Fatal编程技术网

Android 设置为清除logcat的权限

Android 设置为清除logcat的权限,android,android-manifest,Android,Android Manifest,是否有从设备上清除logcat的权限?以下代码不起作用 ArrayList<String> commandLine = new ArrayList<String>(); commandLine.add("logcat"); commandLine.add("-c"); process = Runtime.getRuntime().exec(commandLine.toArray(new String[2])); ArrayList命令行=新建ArrayList();

是否有从设备上清除logcat的权限?以下代码不起作用

ArrayList<String> commandLine = new ArrayList<String>();

commandLine.add("logcat");
commandLine.add("-c");
process = Runtime.getRuntime().exec(commandLine.toArray(new String[2]));
ArrayList命令行=新建ArrayList();
命令行。添加(“logcat”);
命令行。添加(“-c”);
process=Runtime.getRuntime().exec(commandLine.toArray(新字符串[2]);

是否可以清除logcat?

与日志相关的唯一权限是:

<uses-permission android:name="android.permission.READ_LOGS" />

试着把它表现出来。API说:

允许应用程序读取低级系统日志文件。日志条目可以包含用户的私人信息,这就是此权限“危险”的原因


因此,明确要求读取日志,但不清楚它是否有助于清除日志。

应用程序无法清除设备上的logcat。当您在Eclipse/ADT中选择“clear logcat”选项时,您并没有在设备上清除它


如果这种情况发生了变化,或者我错了,那么我希望有人会纠正我——我很想知道——但这不太可能,因为他们正在向相反的方向移动Android:到目前为止,JellyBean应用程序甚至无法读取其他应用程序的日志,更不用说清除它了。

我有读取权限集,它只授予读取日志和不删除日志的权限。至于我在API中看到的,没有其他日志权限。看来不支持删除?