언어

DocumentRootFlags Enum

Definition

Enumerates values returned by several types.

public enum DocumentRootFlags
type DocumentRootFlags = 
Inheritance
DocumentRootFlags

Fields

Name Value Description
SupportsCreate 1

Flag indicating that at least one directory under this root supports creating content. Roots with this flag will be shown when an application interacts with Intent.ACTION_CREATE_DOCUMENT.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_CREATE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

LocalOnly 2

Flag indicating that this root offers content that is strictly local on the device. That is, no network requests are made for the content.

Android reference for android.provider.DocumentsContract.Root.FLAG_LOCAL_ONLY.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SupportsRecents 4

Flag indicating that this root can be queried to provide recently modified documents.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_RECENTS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SupportsSearch 8

Flag indicating that this root supports search.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_SEARCH.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SupportsIsChild 16

Flag indicating that this root supports testing parent child relationships.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_IS_CHILD.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SupportsEject 32

Flag indicating that this root can be ejected.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_EJECT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Empty 64

Flag indicating that this root is currently empty. This may be used to hide the root when opening documents, but the root will still be shown when creating documents and FLAG_SUPPORTS_CREATE is also set. If the value of this flag changes, such as when a root becomes non-empty, you must send a content changed notification for DocumentsContract.buildRootsUri(String).

Android reference for android.provider.DocumentsContract.Root.FLAG_EMPTY.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

SupportsQueryTrash 1048576

Flag indicating that this root can be queried to provide trashed documents.

Android reference for android.provider.DocumentsContract.Root.FLAG_SUPPORTS_QUERY_TRASH.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

LimitedFunctionalityWhenOffline 2097152

Flag indicating that this root has limited functionality when the device does not have an internet connection. This will affect how the system file picker and file manager presents files to the user when the device does not have internet connection. Operations such as open, copy and move, that require reading file contents, will be disabled on files that do not have content available locally. Specifically, the following conditions have to be met to disable these actions: the device does not have internet connection; Document.COLUMN_CONTENT_SYNC_STATE_FLAGS is non-null and Document.SYNC_STATE_FLAG_AVAILABLE_LOCALLY is not set; FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE is set; Document.FLAG_VIRTUAL_DOCUMENT is not set; Document.COLUMN_MIME_TYPE does not equal Document.MIME_TYPE_DIR Folder opens will be unaffected by the state of this flag to allow users to be able to still navigate around the file system. However, other operations that require reading file contents will be disabled on folders because they may contain files that don't have content available locally. Specifically, the following conditions have to be met to disable these actions:; the device does not have internet connection; FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE is set; Document.COLUMN_MIME_TYPE equals Document.MIME_TYPE_DIR Operations such as rename and delete, that don't require reading file contents, will be unaffected by the state of this flag. In addition, when this flag is set and the device if offline, the file picker and file manager will show a message to the user indicating that there is limited functionality when offline. Note that even if the device has an internet connection, the documents provider implementation may be limited or prevented from accessing it because of various system restrictions and battery saving features. There will be no UI change for this case.

Android reference for android.provider.DocumentsContract.Root.FLAG_LIMITED_FUNCTIONALITY_WHEN_OFFLINE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to