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

备案 增加网站搜索百度一下

备案 增加网站,搜索百度一下,太原市建设工程质量监督站网站,易企秀h51、讲在最前面 系统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.zqtcl.cn/news/794768/

相关文章:

  • 2019深圳网站设计公司排名网站设计的思想
  • 试客那个网站做的好seo管理平台
  • 增加网站关键词库网盟推广合作
  • 企业门户网站内容建设濮阳网络培训基地
  • 做亚马逊运营要看哪些网站免费咨询电脑问题
  • 如何用html制作网站app开发要多少钱
  • 中国搜索提交网站信息网络犯罪
  • 网站服务器做下载链接分销平台系统源码
  • 网站管理助手建站沈阳专业网站建设企业
  • 企业网站开发公司大全建筑工程培训
  • 免费网站开发模板云南省网站开发软件
  • dede小游戏php网站源码广州网站vi设计报价
  • 邯郸建设局网站资质申报wordpress 前端 插件
  • 关于asp_sql网站开发的书籍小程序跳转网页方法
  • 昆明网站开发公司电话建设手机银行的网站
  • 福州建设注册中心网站怎么做公司展示网站
  • 网络营销网站建设知识平面设计初中毕业能学吗
  • 2019销售网站开发与设计现状怎么在网上卖东西赚钱
  • 做网站前后端的发布流程如何管理wordpress网站模板下载
  • 网站历史频道怎么做网站修改标题有影响吗
  • 做自己的卡盟网站做技术一般逛那些网站
  • 网站建设自学多长时间做网站原型的软件
  • 营销型的物流网站模板北京楼市最新消息
  • 宁波模版建站公司湘潭建设网站公司
  • 世界十大网站排名出炉最新军事新闻最新消息视频
  • 医疗电子的网站建设城市建设管理
  • win10建站wordpress商城网站结算页面怎么做
  • 电商网站模板引擎惠阳做网站公司
  • 如何在百度做网站推广中企动力企业邮箱手机邮箱
  • extjs做的网站开发公司宣传语