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.
Việc giới thiệu các hiệu ứng chuyển đổi vỏ đã hợp nhất và mã hoá phương thức chạy ảnh động trong hệ thống, cho phép truy xuất thông tin tập trung về ảnh động dự kiến sẽ thực thi.
Dấu vết chuyển đổi bao gồm dữ liệu về mọi quá trình chuyển đổi xảy ra trong
thành phần hiển thị WindowManager (WM), bắt nguồn từ cả phía máy chủ hệ thống và
thành phần hiển thị. Dấu vết này được bật vĩnh viễn trong Droidfood và tự động được nhúng vào báo cáo lỗi.
Để biết thêm thông tin về việc thu thập dấu vết, hãy xem phần Chuyển đổi vỏ.
Trình xem chuyển đổi của Winscope hiển thị thông tin này cho các dấu vết chuyển đổi chứa cả thông tin phía máy chủ và phía máy khách. Trình xem bao gồm một chế độ xem nhật ký bảng chứa thông tin tổng quan về hiệu ứng chuyển đổi ở bên trái và chế độ xem chi tiết cho từng hiệu ứng chuyển đổi ở bên phải:
Send Time (Thời gian gửi): Dấu thời gian chuyển đổi được gửi từ máy chủ đến shell để xử lý.
Thời gian gửi: Dấu thời gian khi quá trình chuyển đổi được gửi đến trình xử lý để bắt đầu phát.
Thời lượng: Thời gian chuyển đổi từ lúc bắt đầu phát đến khi kết thúc.
Trạng thái: Nếu quá trình chuyển đổi là:
PLAYED:: Đã phát.
ABORTED (HUỶ): Đã huỷ trước khi phát. Bạn có thể huỷ một quá trình chuyển đổi từ phía shell hoặc WM.
MERGED (ĐÃ HỢP NHẤT): Được trình xử lý chuyển đổi hợp nhất vào một số chuyển đổi khác đang phát (trình xử lý quyết định cách xử lý việc này).
Chế độ xem chi tiết
Ngoài thông tin chi tiết trên chế độ xem theo bảng, chế độ xem chi tiết về hiệu ứng chuyển đổi trong mục SELECTED TRANSITION (Hiệu ứng chuyển đổi đã chọn) bao gồm:
handler: Trình xử lý chuyển đổi đã xử lý ảnh động này.
createTimeNs: Dấu thời gian tạo chuyển đổi ở phía máy chủ WM.
finishTimeNs: Dấu thời gian khi phía máy chủ WM được thông báo rằng quá trình chuyển đổi đã chạy xong ở phía shell.
endTransactionId: Giao dịch SurfaceFlinger cuối cùng có trong quá trình chuyển đổi này.
startTransactionId: Giao dịch SurfaceFlinger ban đầu có trong quá trình chuyển đổi này.
Mục tiêu là các phần tử liên quan đến quá trình chuyển đổi (thường là các hoạt động hoặc nhiệm vụ). Đối với mỗi mục tiêu, chúng tôi ghi lại:
layerId: Lớp đang tạo ảnh động (từ hệ phân cấp SurfaceFlinger).
mode: Loại ảnh động được thực hiện trên lớp này.
windowId: Cửa sổ đang tạo ảnh động (từ hệ phân cấp WindowManager).
flags: Nhóm cờ mới đang được áp dụng cho lớp.
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,["# Shell transitions\n\nThe introduction of shell transitions consolidated and codified the method of\nrunning animations within the system, allowing for the retrieval of centralized\ninformation regarding the animations slated for execution.\n\nThe transition trace includes data on every transition that occurs within the\nWindowManager (WM) shell, originating from both the system server and shell\nsides. This trace is permanently enabled in Droidfood and automatically embedded\nin bug reports.\n| **Note:** The transitions are stored in a ring buffer, which is recorded by different processes. As a result, it's possible that portions (usually the initial segments) of a transition might have been removed from the buffer. For example, when sending a transition creation time followed by a start and finish time, the buffer might contain all three segments, only the start and finish times, or even only the finish time. This limitation is consistent with other Perfetto data segments and, similar to Perfetto, the limitation is handled during rendering rather than during data creation or parsing.\n\nFor more information about trace collection, see\n[Shell transitions](/docs/core/graphics/winscope/capture/adb#capture-adb-transitions).\n\nWinscope's Transitions viewer displays this information for transition\ntraces containing both server and client-side information. The viewer consists\nof a table log view containing the high-level information about the transition\non the left and a detailed view for each transition at the right:\n\n**Figure 1.** Shell transition trace analysis.\n\nTable view\n----------\n\nThe table view contains:\n\n- **Id:** Transition ID generated only for debugging.\n- **Type:** Transition type, as defined in [`Transitions.java`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java)\n- **Send Time:** Timestamp the transition was sent over from server to shell to be handled.\n- **Dispatch Time:** Timestamp when the transition is dispatched to the handler to start playing.\n- **Duration:** Time the transition took from starting to play to finished.\n- **Status:** If the transition was:\n - **PLAYED:**: Played.\n - **ABORTED**: Aborted before playing. A transition can be aborted from from shell or WM side.\n - **MERGED**: Merged by the transition handler into some other already playing transition (the handler decides how to handle this).\n\nDetailed view\n-------------\n\nIn addition to the details on the table view, the detailed transition view\nin the **SELECTED TRANSITION** section contains:\n\n- `handler`: The transition handler that handled this animation.\n- `createTimeNs`: Timestamp the transition was created on the WM server side.\n- `finishTimeNs`: Timestamp when the WM server side is notified that the transition has finished running on the shell side.\n- `endTransactionId`: Final SurfaceFlinger transaction included in this transition.\n- `startTransactionId`: Initial SurfaceFlinger transaction included in this transition.\n- `targets`: List of transition participants.\n- `type`: Transition type, as defined in [`Transitions.java`](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java)\n\n### Targets\n\nTargets are the elements involved in the transition (normally activities or\ntasks). For each target we record:\n\n- `layerId`: Layer that is being animated (from SurfaceFlinger hierarchy).\n- `mode`: Type of animation performed on this layer.\n- `windowId`: Window that is being animated (from WindowManager hierarchy).\n- `flags`: New set of flags being applied to the layer."]]