第4课第4节_Android灯光系统_源码分析_电池灯
?
?
?
電池的監聽器:
?
?
Android燈光系統的源碼分析與使用
4. 電池燈
a. batteryPropertiesRegistrar.registerListener(new BatteryListener());
b. sendIntentLocked(); ? //這個是比較重要的
c. mLed.updateLightsLocked();
d.
// Register for broadcasts from other components of the system.
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
mContext.registerReceiver(new BatteryReceiver(), filter, null, mHandler);
e.
onReceive
handleBatteryStateChangedLocked
updatePowerStateLocked
參考文章
Android4.4電池管理
http://blog.csdn.net/wlwl0071986/article/details/38778897
轉載于:https://www.cnblogs.com/zhulinhaibao/p/7068508.html
超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生總結
以上是生活随笔為你收集整理的第4课第4节_Android灯光系统_源码分析_电池灯的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 移动端页面
- 下一篇: 线程阻塞和挂起(网络收集)