Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release thay vì aosp-main để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Mô-đun DocumentsUI kiểm soát quyền truy cập vào các tệp cụ thể cho các thành phần xử lý quyền đối với tài liệu (chẳng hạn như đính kèm tệp vào email). Mô-đun này có thể cập nhật, nghĩa là có thể nhận các bản cập nhật về chức năng bên ngoài chu kỳ phát hành Android thông thường.
Việc đưa quyền truy cập và quyền đối với bộ nhớ vào một mô-đun sẽ tăng cường quyền riêng tư và tính bảo mật cho người dùng cuối, đồng thời cho phép các đối tác Android tuỳ chỉnh các tính năng và giao diện của ứng dụng thông qua lớp phủ tài nguyên thời gian chạy (RRO). Định dạng mô-đun đảm bảo rằng tất cả thiết bị đều có cùng trải nghiệm DocumentsUI, cho phép nhà phát triển biết nội dung mà người dùng nhìn thấy đối với các API được liên kết.
Mô-đun DocumentsUI xử lý các thao tác sau.
Chỉ tương tác với khung thông qua các API @SystemApi ổn định (không sử dụng API @hide).
Hiển thị cơ chế cho phép các đối tác Android tuỳ chỉnh tính năng và giao diện.
Bảo vệ quyền MANAGE_DOCUMENTS bằng quyền chữ ký.
Hiển thị biểu tượng trình chạy Tệp
Trong Android 10, mô-đun DocumentsUI sử dụng is_launcher_enabled để xác định xem biểu tượng trình chạy Files có hiển thị trong ngăn ứng dụng hay không. Trong Android 11 trở lên, mô-đun này sử dụng gói component-override để xác định xem biểu tượng trình chạy Tệp có xuất hiện trong ngăn ứng dụng hay không.
Theo mặc định, biểu tượng này được bật. Để tắt tính năng này, hãy thêm tệp XML sau vào /etc/sysconfig.
Mô-đun DocumentsUI triển khai thao tác GET_CONTENT cho phép ứng dụng yêu cầu người dùng cấp quyền truy cập vào dữ liệu khác.
Định dạng mô-đun
Mô-đun DocumentsUI (com.android.documentsui) được phân phối dưới dạng tệp APK và có sẵn cho các thiết bị chạy Android 10 trở lên.
Phần phụ thuộc mô-đun
Mô-đun DocumentsUI này phụ thuộc vào quyền MANAGE_DOCUMENTS được bảo vệ bằng quyền chữ ký; một lớp quyền bổ sung đảm bảo rằng chỉ có một ứng dụng trên thiết bị có quyền MANAGE_DOCUMENTS.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# DocumentsUI\n\n| **Important:** Starting in Android 12, file browsing through DocumentsUI is disabled.\n\nThe DocumentsUI module controls access to specific files for components that\nhandle document permissions (such as attaching a file to an email). This module\nis updatable, meaning it can receive updates to functionality outside of the\nnormal Android release cycle.\n\nMaking storage access and permissions into a module increases privacy and\nsecurity for end users while allowing Android partners to customize the features\nand theming of the app through [runtime resource overlays\n(RROs)](/docs/core/architecture/rros). The module format ensures that all\ndevices ship with the same DocumentsUI experience, enabling developers to know\nwhat users see for associated APIs.\n\nThe DocumentsUI module handles the following actions.\n\n- Interacts with the framework only through stable `@SystemApi` APIs (no\n `@hide` API usage).\n\n- Exposes a mechanism for enabling Android partners to customize features and\n theming.\n\n- Protects the `MANAGE_DOCUMENTS` permission using a signature permission.\n\nDisplay Files launcher icon\n---------------------------\n\nIn Android 10, the DocumentsUI module uses `is_launcher_enabled` to determine if\nthe Files launcher icon should display in the app drawer. In Android\n11 or higher, the module uses the `component-override`\npackage to determine if the Files launcher icon displays in the app drawer.\n\nBy default, the icon is enabled. To disable it, add the following XML to\n`/etc/sysconfig`. \n\n \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n \u003cconfig\u003e\n \u003ccomponent-override package=\"com.android.documentsui\" \u003e\n \u003ccomponent class=\"com.android.documentsui.LauncherActivity\" enabled=\"false\" /\u003e\n \u003c/component-override\u003e\n \u003c/config\u003e\n\nRequest user data\n-----------------\n\nThe DocumentsUI module implements the `GET_CONTENT` action that enables apps to\nrequest access to other data from the user.\n\nModule format\n-------------\n\nThe DocumentsUI module (`com.android.documentsui`) is delivered as an\nAPK file and is available for devices running Android\n10 or higher.\n\nModule dependencies\n-------------------\n\nThis DocumentsUI module depends on the `MANAGE_DOCUMENTS` permission protected\nby the signature permission; an additional permission class ensures that only\none app on the device has the `MANAGE_DOCUMENTS` permission."]]