Tagged articles
8 articles
Page 1 of 1
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 23, 2022 · Mobile Development

Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms

The article explains Android’s power management architecture, detailing kernel power states, CPU and device idle modes, the multi‑layer framework, WakeLock types and flags, and the early‑suspend/late‑resume mechanisms, while providing commands and examples for monitoring and controlling device sleep behavior.

AndroidDoze ModeIdle State
0 likes · 11 min read
Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms
Sohu Tech Products
Sohu Tech Products
Jan 5, 2022 · Fundamentals

Source Code Analysis – Suspension and Resumption of Kotlin Coroutines

This article dissects the Kotlin coroutine implementation by decompiling a simple coroutine, explaining how the compiler transforms suspend functions into state‑machine classes, how launch creates an AbstractCoroutine, how the dispatcher intercepts and schedules execution, and how the coroutine is suspended and later resumed through Continuation mechanisms.

CoroutinesKotlinSuspend
0 likes · 16 min read
Source Code Analysis – Suspension and Resumption of Kotlin Coroutines
BaiPing Technology
BaiPing Technology
Dec 6, 2021 · Mobile Development

Master Kotlin Coroutines: Simplify Async Code in Android

This article provides a comprehensive introduction to Kotlin Coroutines, covering their history, core concepts like CoroutineContext, Dispatchers, Job, Deferred, and suspend functions, and demonstrates practical Android usage with code examples for launching coroutines, handling concurrency, networking, Room database operations, timeouts, exception handling, and Flow-based timers.

AndroidCoroutinesFlow
0 likes · 21 min read
Master Kotlin Coroutines: Simplify Async Code in Android
Top Architect
Top Architect
Aug 11, 2021 · Fundamentals

Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java

This article explains why the Thread.stop and Thread.suspend methods were deprecated in modern Java, demonstrates the problems they cause with concrete code examples, and presents two safe alternatives—using a shared flag and the interrupt mechanism—to gracefully terminate threads without risking deadlocks or resource leaks.

DeprecatedJavaStop
0 likes · 10 min read
Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java
Sohu Tech Products
Sohu Tech Products
Jun 30, 2021 · Mobile Development

Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android

This article explains how Kotlin coroutines simplify asynchronous programming on Android by using suspension, detailing core concepts, APIs, dispatchers, suspend functions, and the underlying implementation through decompiled bytecode and continuation‑passing style, complemented by practical code examples and execution logs.

AndroidCoroutinesKotlin
0 likes · 34 min read
Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Sep 27, 2020 · Mobile Development

Understanding the Android Kernel Suspend Process and Power Management

The Android kernel suspend process begins when user‑space writes “mem” to /sys/power/state, triggering an autosuspend loop that validates wakeup_count, logs pending wakeups, freezes filesystems and threads, sequentially calls device suspend callbacks, prepares platform‑specific operations, disables CPUs and interrupts, saves core state, and finally enters the low‑power s2ram state.

AndroidSuspendWakeup Count
0 likes · 11 min read
Understanding the Android Kernel Suspend Process and Power Management