当前位置: 首页 > news >正文

丰台做网站的公司wordpress 图片菜单

丰台做网站的公司,wordpress 图片菜单,自我介绍网站html,对网站开发语言的统计1、讲在最前面 系统rom定制开发中#xff0c;其中在低电量时#xff0c;系统会自动关机#xff0c;这个和不同的平台和底层驱动和硬件都有关系#xff0c;需要结合这些来实际调整这个值#xff0c;我们可以通过分析源码中电池服务的代码#xff0c;然后进行修改如何实现…1、讲在最前面 系统rom定制开发中其中在低电量时系统会自动关机这个和不同的平台和底层驱动和硬件都有关系需要结合这些来实际调整这个值我们可以通过分析源码中电池服务的代码然后进行修改如何实现这个功能。 2、系统中framework修改低电量关机值的核心类 frameworks\base\services\core\java\com\android\server\BatteryService.javaprivate final class HealthHalCallback extends IHealthInfoCallback.Stubimplements HealthServiceWrapper.Callback {Override public void healthInfoChanged(android.hardware.health.V2_0.HealthInfo props) {BatteryService.this.update(props);}private void update(android.hardware.health.V2_0.HealthInfo info) {traceBegin(HealthInfoUpdate);Trace.traceCounter(Trace.TRACE_TAG_POWER, BatteryChargeCounter,info.legacy.batteryChargeCounter);Trace.traceCounter(Trace.TRACE_TAG_POWER, BatteryCurrent,info.legacy.batteryCurrent);synchronized (mLock) {mRealBatteryLevel info.legacy.batteryLevel;if (!mUpdatesStopped) {mHealthInfo info.legacy;// Process the new values.processValuesLocked(false);mLock.notifyAll(); // for any waiters on new info} else {copy(mLastHealthInfo, info.legacy);}}traceEnd();}private void processValuesLocked(boolean force) {boolean logOutlier false;long dischargeDuration 0;mBatteryLevelCritical mHealthInfo.batteryStatus ! BatteryManager.BATTERY_STATUS_UNKNOWN mHealthInfo.batteryLevel mCriticalBatteryLevel;if (mHealthInfo.chargerAcOnline) {mPlugType BatteryManager.BATTERY_PLUGGED_AC;} else if (mHealthInfo.chargerUsbOnline) {mPlugType BatteryManager.BATTERY_PLUGGED_USB;} else if (mHealthInfo.chargerWirelessOnline) {mPlugType BatteryManager.BATTERY_PLUGGED_WIRELESS;} else {mPlugType BATTERY_PLUGGED_NONE;}if (DEBUG) {Slog.d(TAG, Processing new values: info mHealthInfo , mBatteryLevelCritical mBatteryLevelCritical , mPlugType mPlugType);}// Let the battery stats keep track of the current level.try {mBatteryStats.setBatteryState(mHealthInfo.batteryStatus, mHealthInfo.batteryHealth,mPlugType, mHealthInfo.batteryLevel, mHealthInfo.batteryTemperature,mHealthInfo.batteryVoltage, mHealthInfo.batteryChargeCounter,mHealthInfo.batteryFullCharge);} catch (RemoteException e) {// Should never happen.}... }private void shutdownIfNoPowerLocked() {// shut down gracefully if our battery is critically low and we are not powered.// wait until the system has booted before attempting to display the shutdown dialog.if (shouldShutdownLocked()) {/*SPRD : add power debug log start*/Slog.d(TAG, Low battery shutdown, batteryLevel : mHealthInfo.batteryLevel);/*SPRD : add power debug log end*/mHandler.post(new Runnable() {Overridepublic void run() {if (mActivityManagerInternal.isSystemReady()) {Intent intent new Intent(Intent.ACTION_REQUEST_SHUTDOWN);intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);intent.putExtra(Intent.EXTRA_REASON,PowerManager.SHUTDOWN_LOW_BATTERY);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);mContext.startActivityAsUser(intent, UserHandle.CURRENT);}}});}}private boolean shouldShutdownLocked() {if (mHealthInfo.batteryLevel 0) {return false;}// Battery-less devices should not shutdown.if (!mHealthInfo.batteryPresent) {return false;}// add for bug#1021541boolean checkPlugState (mUpdatesStopped mHealthInfo.batteryLevel mSetBatteryLevel mSetBatteryLevel ! mRealBatteryLevel);if (DEBUG) Slog.d(TAG, shutdownIfNoPowerLocked: mUpdatesStopped: mUpdatesStopped mHealthInfo.batteryLevel: mHealthInfo.batteryLevel mSetBatteryLevel: mSetBatteryLevel mRealBatteryLevel: mRealBatteryLevel);return !checkPlugState || mHealthInfo.batteryStatus ! BatteryManager.BATTERY_STATUS_CHARGING;}private boolean shouldShutdownLocked() { //add startif (mHealthInfo.batteryLevel 2) {return true;}//add endif (mHealthInfo.batteryLevel 0) {return false;}// Battery-less devices should not shutdown.if (!mHealthInfo.batteryPresent) {return false;}// add for bug#1021541boolean checkPlugState (mUpdatesStopped mHealthInfo.batteryLevel mSetBatteryLevel mSetBatteryLevel ! mRealBatteryLevel);if (DEBUG) Slog.d(TAG, shutdownIfNoPowerLocked: mUpdatesStopped: mUpdatesStopped mHealthInfo.batteryLevel: mHealthInfo.batteryLevel mSetBatteryLevel: mSetBatteryLevel mRealBatteryLevel: mRealBatteryLevel);return !checkPlugState || mHealthInfo.batteryStatus ! BatteryManager.BATTERY_STATUS_CHARGING;}经过源码分析如果满足shouldShutdownLocked(),如果满足关机执行 Intent.ACTION_REQUEST_SHUTDOWN 添加 if (mHealthInfo.batteryLevel 2) {return true;}
http://www.pierceye.com/news/602851/

相关文章:

  • 网站建设合同英文模板下载湖州做网站的公司
  • 网站内容页设计济南网站优化
  • 简洁中文网站模板下载军事新闻头条最新消息
  • 湘潭网站建设 诚信磐石网络开发app软件的步骤
  • 阿里云网站备案网站建设方案书私有云可以建设网站
  • 网站建设如何增加流量做杂志的网站有哪些
  • 可信网站认证有用建设网站什么语言
  • 福州网站建设 大公司wordpress顺序
  • 为什么网站开发要用架构个人主页网站制作教程
  • 东莞教育网站建设做网站工资还没有文员高
  • 郑州网站制作工作室国内网站开发
  • 现在什么网站做外贸的最好wordpress window系统
  • 柬埔寨网赌网站开发新网络营销
  • html5毕业设计作品苏州关键词优化排名推广
  • 网站建设包括的内容相册在线设计平台
  • 花生壳可做网站吗微商城开发用华网天下首选
  • 口岸地区网站建设内容塔里木油田公司档案馆网站建设研究
  • 网站备案属于公司哪一块石家庄最新状况
  • 秦州建设网站免费代刷网站推广
  • 怎么查看一个网站是用什么程序做的我的家乡湛江网站设计
  • 沈阳网页模板建站开发手机app多少钱
  • 全国建设注册中心网站网页设计师培训价格
  • 做网站地图泰安百度公司代理商
  • 网站后台管理员密码汽车网站更新怎么做
  • 广东省网站备案查询怎么建设网站空间和备案
  • 企业网站软件下载红木家具网站模板
  • 如何创建网站步骤湖北网站制作公司的联系方式
  • 佛山建网站费用seo推广效果怎么样
  • 如何选择网站建设公司永州网页定制
  • 淮北市重点工程建设局网站重庆哪家网站