부분적인 wake lock은 시스템 시간 초과가 발생하거나 사용자가 전원 버튼을 눌러 기기의 화면이 꺼진 후에 개발자가 CPU를 계속 실행할 수 있게 하는 PowerManager API의 메커니즘입니다. 앱이 PARTIAL_WAKE_LOCK 플래그를 사용하여 acquire()를 호출하거나 wake lock을 획득하는 다른 API를 사용하여 부분적인 wake lock을 획득합니다.
부분 wake lock을 과도하게 사용하면 기기가 저전력 상태로 전환되지 않기 때문에 기기의 배터리가 소모됩니다. 부분적인 wake lock은 필요할 때만 사용하고 더 이상 필요하지 않을 때 즉시 해제해야 합니다.
앱에서 부분적인 장기간 wake lock을 과도하게 사용하는 경우 이 페이지의 안내에 따라 문제를 진단하고 해결할 수 있습니다.
보내주시는 의견은 문서를 개선하는 데 중요한 역할을 합니다. 다음 링크를 사용하여 의견을 보내주세요.
Android vitals를 사용하면 앱에서 부분적인 장기간 wake lock을 과도하게 사용하는 경우를 파악할 수 있습니다.
Android vitals
Android vitals를 사용하면 앱에서 부분 wake lock을 과도하게 사용하는 경우 Play Console을 통해 알림을 보내 앱 성능을 개선할 수 있습니다.
Android vitals는 모든 부분적인 wake lock을 합산한 값이 24시간 동안 3시간 이상 실행되는 경우 부분적인 wake lock 사용을 과도함으로 보고합니다.
Android vitals는 앱이 백그라운드에 있고포그라운드 서비스가 없는 경우 wake lock이 유지되는 경우에만 시간을 추적합니다.
Android vitals는 부분적인 wake lock의 명확한 사용자 이점이 있고 부분적인 wake lock 없이는 이 결과를 얻을 수 있는 더 나은 방법이 없는 시나리오에서 부분적인 wake lock 사용에 몇 가지 예외를 적용합니다. 이 경우 Android vitals에서 부분적인 wake lock 시간을 3시간 제한에 반영하지 않을 수 있습니다. 예를 들어 앱에서 사용자를 위해 오디오를 재생하는 경우 기기를 깨어 있게 유지하는 것이 분명한 이점이 있으며 기기를 깨어 있게 유지하지 않으면 오디오를 재생할 방법이 없습니다. 이 경우 부분적인 wake lock 시간은 Android vitals에 반영되지 않습니다.
28일 동안 모든 기기에서 앱 세션의 5% 이상에서 과도한 부분 웨이크락이 발생하면 측정항목이 베타 버전에서 출시되면 Play에서 앱의 공개 상태에 영향을 미칠 수 있습니다.
앱에 불필요한 부분적인 wake lock이 있다는 것을 알았다면 다음 단계는 문제를 해결하는 것입니다.
문제 해결
wake lock은 기기 배터리를 소모할 수 있으므로 대안이 있는 경우 wake lock을 사용해서는 안 됩니다. 기기를 깨어 있게 하는 적절한 API 선택 문서를 참고하면 앱에 가장 적합한 솔루션을 찾을 수 있습니다.
wake lock을 사용해야 하는 경우 wake lock 권장사항을 준수하여 wake lock이 기기 효율성을 저해하지 않도록 하세요. 특히 획득한 모든 기기가 해제되었는지 확인하고 최대한 빨리 잠금을 해제하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 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,["# Excessive partial wake locks (beta)\n\nPartial wake locks are a mechanism in the [`PowerManager`](/reference/android/os/PowerManager) API that lets\ndevelopers keep the CPU running after a device's display turns off (whether due\nto system timeout or the user pressing the power button). Your app acquires a\npartial wake lock by calling [`acquire()`](/reference/android/os/PowerManager.WakeLock#acquire()) with the [`PARTIAL_WAKE_LOCK`](/reference/android/os/PowerManager#PARTIAL_WAKE_LOCK)\nflag, or by using [other APIs that acquire wake locks](/develop/background-work/background-tasks/awake/wakelock/identify-wls).\nExcessive use of partial wake locks drains the device's battery because it\nprevents the device from entering lower power states. Partial wake locks should\nbe used only when necessary and released as soon as no longer needed.\n\nIf your app uses partial wake locks excessively, you can use the guidance in\nthis page to diagnose and fix the problem.\n\nYour feedback is a crucial part of improving our documentation. Please give us\nyour feedback using the following link:\n\n\n[Give feedback](https://docs.google.com/forms/d/e/1FAIpQLScYkStao0zVsmPay22DGqYEMJSf2Rk3SE3LnPc1lcmLjN1AiQ/viewform?usp=dialog)\n\nDetect the problem\n------------------\n\nAndroid vitals can help you find out when your app's use of partial wake locks\nis excessive.\n\n### Android vitals\n\nAndroid vitals can help improve your app's performance by [alerting you via the\nPlay Console](https://support.google.com/googleplay/android-developer/answer/9844486?) when your app's use of partial wake locks is\nexcessive.\n| **Note:** Tracking of excessive partial wake locks is **currently in beta**. The threshold numbers, relevant app states, and exceptions for behavior that has end-user benefit, are all subject to change. The beta metric does not currently make your app less discoverable on Google Play. Once the metric is out of beta, excessive partial wake lock use may impact app discoverability on Play.\n\nAndroid vitals reports partial wake lock use as **excessive** when **all of the\npartial wake locks**, added together, run for 3 or more hours in 24-hour\nperiod.\n\nAndroid vitals tracks time only if the wake lock is held when the app **is in\nthe background** and **does not have a foreground service**.\n\nAndroid vitals gives some exemptions to partial wake lock usage in scenarios\nwhere there is a clear user benefit of the partial wake lock, and there's no\nbetter way to achieve that result without the partial wake lock. In those cases,\nAndroid vitals might not count the partial wake lock time against the 3-hour\nlimit. For example, if an app is playing audio for the user, there's a clear\nbenefit to keeping the device awake and there's no way to play the audio without\nkeeping the device awake. In that case, the partial wake lock time is not\ncounted against the Android vitals.\n\nIf excessive partial wake locks occur in more than 5% of app sessions across all\ndevices in a 28-day period, it can affect your app's visibility on Play once the\nmetric is out of beta.\n\nOnce you're aware that your app has excessive partial wake locks,\nyour next step is to address the issue.\n\nFix the problem\n---------------\n\nBecause wake locks can drain the device battery, you shouldn't use wake\nlocks if there's an alternative. The\n[Choose the right API to keep the device awake](/develop/background-work/background-tasks/awake)\ndocumentation can help you find the best solution for your app.\n\nIf you do need to use a wake lock, [follow wake lock best practices](/develop/background-work/background-tasks/awake/wakelock/best-practices)\nto make sure your wake locks don't hurt device efficiency. In particular,\nmake sure every device you acquire is released, and release the lock as quickly\nas possible.\n\nAfter fixing the problem in code, you can verify your fixes by using [local\nwake lock debugging tools](/develop/background-work/background-tasks/awake/wakelock/debug-locally).\n\nSee also\n--------\n\n- [Stuck partial wake locks](/topic/performance/vitals/excessive-wakelock)\n- [Wake lock documentation](/develop/background-work/background-tasks/awake/wakelock)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Frozen frames](/topic/performance/vitals/render#frozen-frames)\n- [Run benchmarks in Continuous Integration](/topic/performance/benchmarking/benchmarking-in-ci)\n- [Create and measure Baseline Profiles without Macrobenchmark](/topic/performance/baselineprofiles/manually-create-measure)"]]