我正在使用PackageManager API。我发现以下常量已被定义:
1) GET_DISABLED_COMPONENTS
2) GET_DISABLED_UNTIL_USED_COMPONENTS
3) COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED
4) COMPONENT_ENABLED_STATE_DISABLED_USER
5) COMPONENT_ENABLED_STATE_DISABLED
6) COMPONENT_ENABLED_STATE_DEFAULT
7) COMPONENT_ENABLED_STATE_ENABLED
8) GET_UNINSTALLED_PACKAGES
在阅读文档时,我发现对于常量5-7,组件必须启用/禁用,无论它在清单文件中如何指定。
对于3,文档中写道:
This application should be considered, until the point where the user actually
wants to use it.
这是什么意思?
对于第四点,文档中写道:
The user has explicitly disabled the application, regardless of what it has
specified in its manifest.
如果这个标志与应用程序有关,那么为什么名称以“COMPONENT”开头?另外,用户如何禁用该应用程序?
对于第8条,文档中说:
Flag parameter to retrieve some information about all applications (even
uninstalled ones) which have data directories. This state could have
resulted if applications have been deleted with flag DONT_DELETE_DATA with
a possibility of being replaced or reinstalled in future.
DONT_DELETE_DATA标志在哪里指定?
总的来说,如果有人能够解释这些常量对开发人员的用例,那将非常有帮助。
谢谢。