简体   繁体   English

AndroidManifest.xml文件中的“allowClearUserData”=“false”

[英]“allowClearUserData” = “false” in the AndroidManifest.xml file

android清单文件中的allowClearUserData属性是做什么的?

Per the source code for that field: 根据该字段的源代码

Option to let applications specify that user data can/cannot be cleared. 允许应用程序指定可以/不能清除用户数据的选项。 This flag is turned on by default. 默认情况下,此标志处于启用状态。 This attribute is usable only by applications included in the system image. 此属性仅可由系统映像中包含的应用程序使用。 Third-party apps cannot use it. 第三方应用无法使用它。

<attr name="allowClearUserData" format="boolean" />

The allowClearUserData is an option that let's the application specify if the user's data can/cannot be deleted. allowClearUserData是一个选项,让应用程序指定是否可以/不能删除用户的数据。 By default, this flag is set to true. 默认情况下,此标志设置为true。 However it can be changed to false. 但是它可以更改为false。 The attribute can be set for your app. 可以为您的应用设置该属性。 However any other app cannot use this attribute to clear your app's user data.he attribute allows boolean value, that is either "true" or "false". 但是,任何其他应用程序都无法使用此属性来清除应用程序的用户数据。该属性允许使用布尔值,即“true”或“false”。 If set to true, the application manager has the right to clear the data. 如果设置为true,则应用程序管理员有权清除数据。

Example: 例:

<application>
<application android:allowClearUserData=["true" | "false"] 
</application>

This must be placed within the android manifest file. 这必须放在android清单文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM