HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Gingerbread MR1
|
2.3.7_r1
下载
查看原文件
收藏
根目录
external
kernel-headers
original
linux
android_power.h
/* linux/android_power.h ** ** Copyright 2005-2006, The Android Open Source Project ** Author: Arve Hjnnevg ** ** This file is dual licensed. It may be redistributed and/or modified ** under the terms of the Apache 2.0 License OR version 2 of the GNU ** General Public License. */ #ifndef _LINUX_ANDROID_POWER_H #define _LINUX_ANDROID_POWER_H #include
typedef struct { struct list_head link; int lock_count; int flags; const char *name; int expires; } android_suspend_lock_t; #define ANDROID_SUSPEND_LOCK_FLAG_COUNTED (1U << 0) #define ANDROID_SUSPEND_LOCK_FLAG_USER_READABLE (1U << 1) #define ANDROID_SUSPEND_LOCK_FLAG_USER_SET (1U << 2) #define ANDROID_SUSPEND_LOCK_FLAG_USER_CLEAR (1U << 3) #define ANDROID_SUSPEND_LOCK_FLAG_USER_INC (1U << 4) #define ANDROID_SUSPEND_LOCK_FLAG_USER_DEC (1U << 5) #define ANDROID_SUSPEND_LOCK_FLAG_USER_VISIBLE_MASK (0x1fU << 1) #define ANDROID_SUSPEND_LOCK_AUTO_EXPIRE (1U << 6) typedef struct android_early_suspend android_early_suspend_t; struct android_early_suspend { struct list_head link; int level; void (*suspend)(android_early_suspend_t *h); void (*resume)(android_early_suspend_t *h); }; typedef enum { ANDROID_CHARGING_STATE_UNKNOWN, ANDROID_CHARGING_STATE_DISCHARGE, ANDROID_CHARGING_STATE_MAINTAIN, // or trickle ANDROID_CHARGING_STATE_SLOW, ANDROID_CHARGING_STATE_NORMAL, ANDROID_CHARGING_STATE_FAST, ANDROID_CHARGING_STATE_OVERHEAT } android_charging_state_t; //android_suspend_lock_t *android_allocate_suspend_lock(const char *debug_name); //void android_free_suspend_lock(android_suspend_lock_t *lock); int android_init_suspend_lock(android_suspend_lock_t *lock); void android_uninit_suspend_lock(android_suspend_lock_t *lock); void android_lock_suspend(android_suspend_lock_t *lock); void android_lock_suspend_auto_expire(android_suspend_lock_t *lock, int timeout); void android_unlock_suspend(android_suspend_lock_t *lock); void android_power_wakeup(int notification); /* notification = 0: normal wakeup, notification = 1: temporary wakeup */ int android_power_is_driver_suspended(void); void android_register_early_suspend(android_early_suspend_t *handler); void android_unregister_early_suspend(android_early_suspend_t *handler); void android_power_set_battery_level(int level); // level 0-100 void android_power_set_charging_state(android_charging_state_t state); #endif
C++程序
|
73行
|
2.38 KB
原始内容
高亮显示
复制内容
×
已收藏
收藏成功,您可以在我收藏的代码页面中查看,其地址为:
https://www.androidos.net.cn/my/collect/code
。
登录后可以享受更多权益
您还没有登录,登录后您可以:
收藏Android系统代码
收藏喜欢的文章
多个平台共享账号
去登录
首次使用?从这里
注册