Android 4.0 suspend/resume (kernel part)

之前的一段时间,本人错误的任务休眠是在WindowManagerService中在消息的形成和消息的分发过程中进行截获的。但是经过实验之后,发现自己走上了一条错误的道路,幸好不是不归路。

言归正传,对于Android的休眠唤醒,本身有一套整体的电源管理方案。总体上讲,就是early_suspend和late_resume。从名称来看我们大体上会对休眠唤醒有个感性的认识就是。这两个过程是顺序相反。因此,此处简单的介绍下early_suspend主要是指对内核中注册为early suspend的驱动。

request_suspend_state: sleep (0->3) at 257000110209 (2012-03-01 00:04:15.512681246 UTC)
//./kernel/kernel/power/main.c:202: request_suspend_state(state);这是在内核源文件中的位置信息

I/power ( 1379): *** set_screen_state 0 //此句是在power.c文件的main函数中的信息

D/SurfaceFlinger( 1195): About to give-up screen, flinger = 0xf978

V/TransportControlView( 1379): Create TCV com.android.internal.widget.TransportControlView@41341fd8

D/dalvikvm( 1379): GC_CONCURRENT freed 350K, 13% free 8663K/9927K, paused 5ms+70ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 144K, 13% free 8709K/9927K, paused 323ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 235K, 12% free 8817K/9927K, paused 239ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 105K, 10% free 8965K/9927K, paused 189ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 104K, 11% free 8907K/9927K, paused 213ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 2K, 10% free 9010K/9927K, paused 51ms

I/dalvikvm-heap( 1379): Grow heap (frag case) to 9.144MB for 124216-byte allocation

D/dalvikvm( 1379): GC_FOR_ALLOC freed <1K, 10% free 9131K/10055K, paused 47ms

I/leopard_debug( 1379): read property from sys.vmcpolicy.camera.disabled is : true

V/LockScreen( 1379): Camera disabled by Device Policy

D/dalvikvm( 1379): GC_FOR_ALLOC freed 123K, 10% free 9089K/10055K, paused 45ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 8K, 9% free 9187K/10055K, paused 40ms

D/dalvikvm( 1379): GC_FOR_ALLOC freed 111K, 10% free 9131K/10119K, paused 40ms

D/TabletStatusBar( 1503): refreshing icons: 0 notifications, mIconLayout=com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout@41117180

D/TabletStatusBar( 1503): closing notifications panel

D/TabletStatusBar( 1503): closing input methods panel

D/TabletStatusBar( 1503): closing compat panel

D/TabletStatusBar( 1503): closing recents panel

D/TabletStatusBar( 1503): closing notifications panel

D/TabletStatusBar( 1503): closing recents panel

D/TabletStatusBar( 1503): closing input methods panel

D/TabletStatusBar( 1503): closing compat panel

D/ALSAModule( 1198): open called for devices 00000000 in mode 0...

E/AudioHardwareALSA( 1198): ALSALib [vimicro/utils/alsa-lib/src/pcm/pcm.c:2210:(snd_pcm_open_noupdate) Unknown PCM AndroidPlayback]

I/ALSAModule( 1198): Initialized ALSA PLAYBACK device default

I/TabletStatusBar( 1503): DISABLE_CLOCK: yes

D/TabletStatusBar( 1503): hiding the MENU button

D/TabletStatusBar( 1503): hiding shadows (lights on)

D/TabletStatusBar( 1503): closing recents panel

PM: Syncing filesystems ... done.//suspend.c文件夹下enter_state函数中

Freezing user space processes ... (elapsed 0.02 seconds) done.

Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

你可能感兴趣的:(android 4.0)