2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
잠금 화면
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
AOSP에서는 잠금 화면과 이를 잠금 해제하기 위한 어포던스(키가드)의 기본 구현이 기본 디스플레이에만 표시됩니다. Android 9 이하에서는 보조 화면에서 단일 외부 디스플레이의 단일 잠금 창을 지원했습니다. Android 10에서는 잠금 화면이 모든 공개 보조 디스플레이로 확장됩니다. 잠금 화면은 단순하게 유지되며 보조 화면 잠금 해제를 지원하지 않습니다.

그림 1. 보조 디스플레이 잠금 화면
기기 제조업체는 보조 디스플레이에 자체 잠금 화면을 구현할 수 있지만 기본적인 보안 요구사항이 이행되어야 합니다. 기기가 잠기면 정보가 모든 디스플레이에서 안전하게 가려져야 합니다. 기기가 잠겼을 때 어떤 콘텐츠를 표시하거나 숨겨야 하는지에 관한 기본적인 정책이나 제어 기능은 없습니다. 따라서 제한된 액세스를 구현할 수 있는 유일한 안전한 방법은 모든 콘텐츠를 잠금 화면과 잠금 창 뒤에 숨기는 것입니다. 유일한 예외는 R.attr.showWhenLocked
또는 Activity.setShowWhenLocked()
메서드를 사용하여 잠금 화면 상단에 표시되도록 명시적으로 선택한 앱입니다.
그러지 않으면 공개 및 비공개 디스플레이에서 정보가 유출될 가능성이 높습니다.
디스플레이는 다른 상태(ON
/OFF
)에 둘 수 있지만 잠김 상태는 모든 디스플레이에 전역적으로 적용됩니다. 모든 기기 구현과 마찬가지로 기기가 잠기거나 잠금 해제되면 사용자가 이를 쉽게 알 수 있어야 합니다. 보통 전원 버튼을 누르면 휴대기기가 잠깁니다. 전원 버튼을 누르면 모든 내부 및 외부 화면도 잠겨야 합니다.
잠금 창은 SystemUI 소유이므로 비공개 디스플레이에 배치되지 않습니다. 비공개 디스플레이 소유자는 기기가 잠겼을 때 창을 숨기고 콘텐츠를 보호해야 합니다. 기본 시스템 구현은 공개 상태를 변경하여 비공개 디스플레이의 활동만 숨깁니다.
구현
보조 디스플레이의 잠금 창은 KeyguardDisplayManager
의 Presentation 창으로 구현됩니다. Android 10에서는 KeyguardDisplayManager#mPresentations
를 모든 보조 화면의 모든 잠금 창이 보관되는 배열로 변경했습니다. KeyguardDisplayManager
에는 가용한 디스플레이의 변경사항에 응답하고 모든 화면을 보호하기 위한 디스플레이 변경 리스너도 있습니다. 공격자가 기기에 물리적으로 액세스하더라도 사용자 데이터를 추출할 수 없도록 항상 모든 연결된 디스플레이를 즉시 잠그는 것이 중요합니다.
잠금 창은 모든 공개 보조 디스플레이에 표시됩니다(KeyguardDisplayManager#isKeyguardShowable()
참고). 비공개 디스플레이 소유자는 기기가 잠겼을 때 콘텐츠를 보호해야 합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","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(UTC)"],[],[],null,["# Lock screen\n\nAOSP's default implementation of the Lock screen with affordances to unlock\nit (keyguard) appears only on the primary display. In Android 9 (and lower),\nsecondary screens supported a single *locking window* on a single external\ndisplay. In Android 10, the Lock screen is expanded to all public secondary\ndisplays. The Lock screen remains simple and doesn't support unlocking from secondary\nscreens.\n\n**Figure 1.** Lock screen on secondary display\n\nDevice manufacturers can implement their Lock screen for secondary displays,\nprovided the fundamental security requirement is fulfilled. When the device is\nlocked, information should be securely concealed on all displays. There's no\nbuilt-in policy or control over what content should be shown or hidden when device\nis locked. Therefore, the only secure way of implementing restricted access is to\nhide all content behind the Lock screen and locking windows. The only exceptions\nare apps that have explicitly opted in to be displayed on top of the Lock screen\nusing the\n[R.attr.showWhenLocked](https://developer.android.com/reference/android/R.attr.html#showWhenLocked) or\n[Activity.setShowWhenLocked()](https://developer.android.com/reference/android/app/Activity.html#setShowWhenLocked(boolean)) methods.\nOtherwise, there is strong potential to leak information from public and private\ndisplays.\n\nWhile displays can be placed in to different states (`ON`/`OFF`),\nthe locked state is global for all displays. As with any device implementation, it should\nbe obvious to a user when a device is locked (or unlocked). For example, pressing\na power button typically locks a mobile device. A power button should also lock all\ninternal and external screens.\n\nBecause the locking window is owned by SystemUI, it won't be placed on\nprivate displays. Owners of the private displays are responsible for hiding\nthe windows and protecting content when a device is locked. The default system\nimplementation *only* hides activities on private displays by changing\nvisibility.\n\nImplementation\n--------------\n\nThe locking window on secondary displays is implemented as a [Presentation](https://developer.android.com/reference/android/app/Presentation)\nwindow in `KeyguardDisplayManager`. Android 10 changed\n`KeyguardDisplayManager#mPresentations` to an array that holds all\nlocking windows for all secondary screens. `KeyguardDisplayManager` also\nhas a display-change listener to respond to changes to the available displays and\nsecure all screens. It's important to immediately lock all connected displays at\nany given time so that attackers can't extract user data even with physical access\nto the device.\n\nThe locking window is displayed on all public secondary displays (see\n`KeyguardDisplayManager#isKeyguardShowable()`). Owners of private\ndisplays are responsible for securing the content when a device is\nlocked."]]