腾讯 AICR : 智能化代码评审技术探索与应用实践(下)

I DisplayPowerController[0]: Brightness [0.090349324] reason changing to: 'automatic', previous reason: 'screen_off'. 行 1219043: 11-10 16:26:20.366 1000 1667 1746 I DisplayPowerController[0]: Brightness [-1.0] reason changing to: 'screen_off', previous reason: 'automatic'. 行 1219044: 11-10 16:26:20.366 1000 1667 1746 I DisplayPowerController[0]: BrightnessEvent: brt=-1.0 (0.0%), nits= 2.0, lux=-1.0, reason=screen_off, strat=ScreenOffBrightnessStrategy, state=OFF, stateReason=DEFAULT_POLICY, policy=OFF, flags=, initBrt=0.09054119, rcmdBrt=NaN, preBrt=NaN, preLux=0.0, wasShortTermModelActive=false, autoBrightness=true (default), unclampedBrt=-1.0, hbmMax=0.49975574, hbmMode=off, thrmMax=1.0, rbcStrength=50, powerFactor=1.0, physDisp=内置屏幕(local:4627039422300187648), logicalId=0, slowChange=false, rampSpeed=0.0 行 1219214: 11-10 16:26:20.421 1002 3345 4100 I BtGatt.ScanManager: msg.what = MSG_SCREEN_OFF, msg.arg1 = None 行 1219216: 11-10 16:26:20.421 1002 3345 4100 D BtGatt.ScanManager: Scan mode update during screen off from SCAN_MODE_AMBIENT_DISCOVERY to SCAN_MODE_SCREEN_OFF_BALANCED 行 1219219: 11-10 16:26:20.422 1002 3345 4100 D BtGatt.ScanManager: Scan mode update during screen off from SCAN_MODE_AMBIENT_DISCOVERY to SCAN_MODE_SCREEN_OFF_BALANCED 行 1219674: 11-10 16:26:20.607 1000 2337 2463 D MiuiBubbleController: onReceive broadcast info:[intent.getSender() = android, action = android.intent.action.SCREEN_OFF] 行 1219728: 11-10 16:26:20.631 1000 3668 3668 I msguard : screen receiver:android.intent.action.SCREEN_OFF 行 1219811: 11-10 16:26:20.661 10152 2753 2753 I Launcher: mBroadcastReceiver onReceive: Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 } 行 1219902: 11-10 16:26:20.686 1002 3345 3345 D BtGatt.GattService: onReceive: android.intent.action.SCREEN_OFF 行 1219931: 11-10 16:26:20.706 1000 5217 5472 I TrafficManageService: onReceive: android.intent.action.SCREEN_OFF 行 1219933: 11-10 16:26:20.707 1002 3345 3884 D BluetoothAdapterService: onReceivedBroadcast android.intent.action.SCREEN_OFF 行 1219964: 11-10 16:26:20.719 1000 5217 5593 I BaseChargeProtect_Night: receiver ACTION_SCREEN_OFF 行 1219968: 11-10 16:26:20.723 1000 20978 20978 I ScreenReceiver: onReceive() called with: context = com.xiaomi.continuity.LiteContinuityApplication@b359d92, intent = Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 } 行 1219973: 11-10 16:26:20.726 1002 9759 9759 D MiuiFastConnectService_Plugin: onReceive(): action = android.intent.action.SCREEN_OFF 行 1219975: 11-10 16:26:20.727 1000 1667 1667 D HyperNotificationManagerService: BroadcastReceiver ACTION_SCREEN_OFF 行 1219996: 11-10 16:26:20.748 1000 20978 20978 I SystemMonitor: onReceive action:android.intent.action.SCREEN_OFF 行 1220023: 11-10 16:26:20.756 1002 9759 9759 D BluetoothHeadsetService: headset receviver android.intent.action.SCREEN_OFF 行 1220037: 11-10 16:26:20.761 1000 5217 5217 I VideoToolBoxService: onReceive: android.intent.action.SCREEN_OFF 行 1220075: 11-10 16:26:20.777 1000 1667 1667 D MiuiFboService: received the broadcast and intent.action : android.intent.action.SCREEN_OFF,intent.getStringExtra:null 行 1220076: 11-10 16:26:20.777 1000 1667 1667 I MiuiFboService: execute ACTION_SCREEN_OFF 行 1220084: 11-10 16:26:20.778 1000 20978 21071 W lyra-disc: DiscoveryPowerPolicy::IsAllowDiscovery:224 not allow, medium_type=2, work_when_screen_off=0, is_screen_on=0 行 1220180: 11-10 16:26:20.806 1000 20978 21071 W lyra-disc: DiscoveryPowerPolicy::IsAllowDiscovery:224 not allow, medium_type=20000, work_when_screen_off=0, is_screen_on=0 行 1220201: 11-10 16:26:20.812 1000 5217 5217 I PowerSaveService: onReceive: android.intent.action.SCREEN_OFF 行 1220282: 11-10 16:26:20.840 1000 2337 2337 I MiuiChargeController: dismissChargeAnimation: dismiss_for_screen_off 行 1220285: 11-10 16:26:20.840 1000 2337 2337 I NfcPhoneCaseController: dismissNfcAnimation reason: screen_off, showing: false 行 1220335: 11-10 16:26:20.855 1002 9759 9759 D MiuiBluetoothNotification: get receiver android.intent.action.SCREEN_OFF 行 1220346: 11-10 16:26:20.858 1000 2337 2337 I VolumePanelViewController_true: dismissH mShowing:false, reason:screen_off, isAnimating: false, needShowDialog=true, KeyAnimatingStream=-1, disableVolumeDialog=false 行 1220368: 11-10 16:26:20.866 1000 1667 1720 I SmartPower: com.google.android.gms.unstable/10148(4872): idle->background(2200ms) R(broadcast start Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 }) adj=800. 行 1220410: 11-10 16:26:20.907 1000 1667 1720 I SmartPower: com.google.android.inputmethod.latin/10181(7739): idle->background(17881ms) R(broadcast start Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 }) adj=100. 行 1220413: 11-10 16:26:20.909 1000 1667 1720 I SmartPower: com.xiaomi.aicr:cognitionService/10145(6885): idle->background(22833ms) R(broadcast start Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 }) adj=200. 行 1220419: 11-10 16:26:20.915 10181 7739 10537 I DeviceStatusMonitor: DeviceStatusMonitor.handleBroadcast():123 onReceive() : Action = android.intent.action.SCREEN_OFF 行 1220440: 11-10 16:26:20.934 1000 1667 1720 I SmartPower: com.miui.analytics/10172(28332): idle->background(30232ms) R(broadcast start Intent { act=android.intent.action.SCREEN_OFF flg=0x50200010 }) adj=100. 行 1220466: 11-10 16:26:20.954 10148 2451 5197 W NearbyDiscovery: FastPairHandler: skip handleStateEvent: eventType=SCREEN_OFF [CONTEXT service_id=265 ]是什么意思
11-15
### 系统日志信息解释 #### DisplayPowerController `DisplayPowerController` 通常是 Android 系统中用于控制显示屏电源管理的组件。在系统日志里,涉及 `DisplayPowerController` 的信息往往显示屏的电源状态改变相关,像屏幕开启、关闭、亮度调节等操作。例如,当屏幕开启时,`DisplayPowerController` 可能会记录日志来表明已开始为显示屏供电;而屏幕关闭时,则会记录停止供电的操作。这些日志有助于开发者调试显示屏电源管理方面的问题,比如屏幕无法正常开启或关闭、亮度调节异常等情况。 #### BtGatt.ScanManager `BtGatt.ScanManager` 是蓝牙低功耗(BLE)扫描管理的核心组件。它负责管理 BLE 设备的扫描操作,包含扫描的启动、停止、配置扫描参数等。从引用[2]“M0466EF 08 - 18 15:09:07.059 23766 23813 D BtGatt.ScanManager: Starting BLE batch scan”能够看出,`BtGatt.ScanManager` 正在启动 BLE 批量扫描。批量扫描意味着系统会在一段时间内收集扫描结果,之后一次性处理,这样可以降低功耗。而“configuring batch scan storage, appIf 6”则表明正在为批量扫描配置存储相关信息,`appIf` 可能代表应用接口,用于区分不同应用发起的扫描请求。 ### 'W NearbyDiscovery: FastPairHandler: skip handleStateEvent: eventType=SCREEN_OFF [CONTEXT service_id=265 ]' 含义 - `W` 代表日志级别为警告(Warning),说明系统遇到了需要关注但并非严重错误的情况。 - `NearbyDiscovery` 是系统中的一个服务,主要负责附近设备的发现功能,像蓝牙设备的快速配对等。 - `FastPairHandler` 是 `NearbyDiscovery` 服务里专门处理快速配对事件的处理器。 - `skip handleStateEvent` 表示跳过了对某个状态事件的处理。 - `eventType=SCREEN_OFF` 明确该状态事件是屏幕关闭事件。 - `[CONTEXT service_id=265 ]` 给出了该事件发生的上下文信息,`service_id=265` 可能是一个唯一标识,用于区分不同的服务实例或者配置。 综合起来,这条日志信息表明在 `NearbyDiscovery` 服务中,`FastPairHandler` 跳过了对屏幕关闭事件的处理,可能是因为在屏幕关闭的情况下,某些快速配对相关的操作不需要执行,或者当前的配置不允许处理该事件。 ### 代码示例 以下是一个简单的伪代码示例,展示 `FastPairHandler` 可能如何处理状态事件: ```java public class FastPairHandler { public void handleStateEvent(StateEvent event) { if (event.getType() == EventType.SCREEN_OFF) { // 根据配置或条件判断是否跳过处理 if (shouldSkipScreenOffEvent()) { Log.w("NearbyDiscovery", "FastPairHandler: skip handleStateEvent: eventType=SCREEN_OFF [CONTEXT service_id=265 ]"); return; } // 处理屏幕关闭事件的逻辑 processScreenOffEvent(); } } private boolean shouldSkipScreenOffEvent() { // 这里可以添加具体的判断逻辑,比如检查配置、当前状态等 return true; } private void processScreenOffEvent() { // 处理屏幕关闭事件的具体逻辑 } } enum EventType { SCREEN_OFF, // 其他事件类型 } class StateEvent { private EventType type; public StateEvent(EventType type) { this.type = type; } public EventType getType() { return type; } } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值