自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
常見問題
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 10 是否支援每個螢幕的 VSync?
目前還不行。Android 10 中預設螢幕的 VSync 會驅動所有螢幕。
螢幕可以個別開啟或關閉嗎?
在 Android 10 中,裝置電源狀態的實作方式主要是全域的,並由預設顯示器的電源狀態決定。只有虛擬螢幕可以個別開啟或關閉,方法是將介面設為 null
。活動或 WindowManager 會回應此狀態變更。
在 Android 10 中,沒有內建方法可動態設定輸入內容與裝置之間的關聯,但在大多數情況下,可以採用某些因應做法。詳情請參閱「輸入路由」。
如何在螢幕上啟用系統裝飾?
如要進行測試,最簡單的方法是使用「強制使用桌面模式」開發人員選項,這樣就能在所有次要顯示器上啟用系統裝飾和 IME 支援功能。這項功能適用於系統擁有的螢幕,例如實體面板或模擬螢幕,但可能會限制應用程式擁有的虛擬螢幕。
如要提供正式版,請提供預設設定檔。詳情請參閱:
使用 LaunchParamsController
,該函式會攔截所有活動啟動作業,並讓系統元件修改用於啟動作業的參數。這項功能適用於 system_server
。
裝置是否可透過次要螢幕解鎖?
Android 10 中螢幕鎖定畫面的預設實作方式無法互動,也不允許解鎖。只要維持基本安全性規定,原始設備製造商 (OEM) 就可以實作自己的鎖定畫面。
裝置鎖定狀態是全域狀態,適用於所有螢幕。
如何在與目標不同的螢幕上顯示 IME?
IME 只能顯示在 DisplayWindowSettings
中設定的螢幕上。如果未針對要求輸入的螢幕啟用設定,IME 就會顯示在預設螢幕上。
如何一律將按鍵事件傳送至特定顯示裝置?
鍵盤會視為非指定輸入來源,因此輸入內容會傳送至系統中聚焦的最頂層視窗。如需指定按鍵輸入的範例,請參閱 PhoneWindowManager
類別中的返回或主畫面按鈕實作方式。這些鍵只會指定螢幕,並在 Android 10 中顯示。
音訊如何處理?
Android 10 在這方面沒有重大改善。Android 10 已新增對 Auto 的多區域音訊支援功能,但處理個別指定音訊串流的通用解決方案仍在等待中。
同一個應用程式是否可以在多個螢幕上顯示?
如果應用程式支援,您可以建立應用程式活動的多個執行個體。根據預設,每個都會在相同程序下執行。Chrome 就是這類應用程式的範例。使用啟動器範例進行測試非常方便,因為您可以透過該範例啟動指定活動,並要求新的例項。
是否可以為不同的螢幕/使用者建立相同應用程式的多個執行個體?
AOSP 不允許您為同一位使用者建立多個獨立的沙箱和相同應用程式的程序。與這項要求相關的用途需要同時支援多位使用者,而非應用程式層級的區隔。
如果不同使用者想使用同一個應用程式,則應使用各自的個人資料登入。應用程式層級分離功能需要在每個工作階段登入應用程式。否則,其他使用者的資料可能仍會存在。
Android 10 是否支援多位使用者?
否。Android 10 僅支援單一登入使用者。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Frequently asked questions\n\nDoes Android 10 support per-display VSync?\n------------------------------------------\n\nNot yet. The VSync of the default display in Android 10\ndrives all displays.\n\nCan displays be individually turned ON or OFF?\n----------------------------------------------\n\nIn Android 10, the implementation of the device power\nstate is primarily global and determined by the power state of the default display.\nOnly virtual displays can be turned ON or OFF individually, by setting the surface to\n`null`. The activity or WindowManager responds to this state change.\n\nHow do I dynamically configure input-display association?\n---------------------------------------------------------\n\nThere's no built-in way to dynamically configure the association between an\ninput and a device in Android 10, but some workarounds can\nbe applied in most cases. See\n[Input routing](/docs/core/display/multi_display/input-routing) for details.\n\nHow do I enable system decorations on a display?\n------------------------------------------------\n\nFor testing, the most straightforward method is to use the Force Desktop Mode developer\noption, which enables system decorations and IME support on all secondary displays. This\nworks for system-owned displays, such as physical panels or a simulated display, but\nmay be restricted for virtual displays owned by apps.\n\nFor production, provide the default configuration file. For details, see:\n\n- [Configuring\n display windowing settings and system decorations](/docs/core/display/multi_display/recommended-practices#windowing)\n- [System decorations](/docs/core/display/multi_display/system-decorations#decorations)\n\nHow do I configure activities for specific displays?\n----------------------------------------------------\n\nUse `LaunchParamsController`, which intercepts all activity\nlaunches and lets a system component modify the parameters used for launch.\nIt's available within `system_server`.\n\nCan a device be unlocked from a secondary screen?\n-------------------------------------------------\n\nThe default implementation of the lock screen in Android 10\nisn't interactive and doesn't allow for unlocking. An OEM can implement their own lock\nscreen provided the fundamental security requirement is maintained.\n\nThe device lock state is global and it applies to all displays.\n\nHow do I display an IME on a different display than its target?\n---------------------------------------------------------------\n\nAn IME can only appear on a display configured in\n`DisplayWindowSettings`. If the config isn't enabled for a display\nwhere input is requested, the IME appears on the default display.\n\nHow do I always send key events to a specific display?\n------------------------------------------------------\n\nA keyboard is considered to be a non-targeted input source, so the input goes\nto the topmost focused window in the system. For an example of targeted key\ninput see the Back or Home button implementation in the `PhoneWindowManager` class. These\nkeys only target the display whereas they are displayed in Android 10.\n\nHow is audio handled?\n---------------------\n\nAndroid 10 contains no major improvements in this area.\n[Multi-zone audio](/docs/core/display/multi_display/multi-zone-audio)\nsupport for Auto has been added in Android 10, but a generic solution to\nhandle separate targeted audio streams remains pending.\n\nCan the same app be shown on several displays?\n----------------------------------------------\n\nIf the app supports it, then multiple instances of the app's activities can\nbe created. By default, each runs under the same process. Chrome is an example of such an\napp. It's convenient to test this using a\n[Launcher](/docs/core/display/multi_display/system-decorations#launcher) sample, which\nallows for a targeted activity launch and a request for a new instance.\n\nCan multiple instances of the same app be created for different screens/users?\n------------------------------------------------------------------------------\n\nAOSP doesn't let you create multiple separate sandboxes and processes of the\nsame app for the same user. Use cases associated with this request require concurrent\nmulti-user support instead of app-level separation.\n\nIf different users want to use the same app, they should log in with their\nprofiles. App-level separation requires logging in to the app for each session.\nOtherwise, other user's data may still be present.\n\nDoes Android 10 support multiple users?\n---------------------------------------\n\nNo. Android 10 supports a single logged-in user."]]