dfc session Monitor

本文介绍如何通过配置dfc.properties文件启用Dfc资源诊断,并通过log4j.properties设置会话及资源相关事件的日志记录,以便检测未释放的会话并进行故障排查。

You can enable logging on the session related classes, and you can also turn on resource diagnostics to track down unreleased sessions.

 

1. Enable resource logging in dfc.properties

 

add the key, dfc.resources.diagnostics.enabled=true

 

2. Enable logging in log4j.properties for session and resource related events

 

log4j.logger.com.documentum.fc.client.impl=DEBUG,SESS_LEAK_DETECT
log4j.logger.com.documentum.fc.client.DfSessionLeakChecker=ERROR,SESS_LEAK_DETECT

 

log4j.appender.SESS_LEAK_DETECT=org.apache.log4j.RollingFileAppender
log4j.appender.SESS_LEAK_DETECT.File=C\:/Documentum/logs/sessLeakDetector.log
log4j.appender.SESS_LEAK_DETECT.MaxFileSize=100MB
log4j.appender.SESS_LEAK_DETECT.MaxBackupIndex=5
log4j.appender.SESS_LEAK_DETECT.layout=org.apache.log4j.PatternLayout
log4j.appender.SESS_LEAK_DETECT.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c - %m%n

01-06 00:32:27.033377 3527 7193 D IntermittentInputFilter: filterInputEvent mIntercepting=false, event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=862.23145, y[0]=1672.2402, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309127, downTime=749307708, deviceId=6, source=0x1002, displayId=0, eventId=169028894, getFrameTimeNanos=-1 }, now =749309129, mInterceptingStartTime = 749299229 01-06 00:32:27.033552 3527 7192 V InputDispatcher: dispatchMotion - eventTime=749309127398000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x66000000, action=UP, actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0,edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, downTime=749307708744000 01-06 00:32:27.033685 3527 7192 D InputDispatcherExtImpl: updateInputFlags ffd248c InputMethod 01-06 00:32:27.033692 3527 7192 D InputDispatcherExtImpl: updateInputFlags [Gesture Monitor] OplusExInputReceiver1 01-06 00:32:27.033695 3527 7192 D InputDispatcherExtImpl: updateInputFlags [Gesture Monitor] OplusUAHInputChannel 01-06 00:32:27.033703 3527 7192 I InputDispatcher: dispatchEventToCurrentInputTargets 01-06 00:32:27.033725 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ prepareDispatchCycle - flags=FOREGROUND | SPLIT, globalScaleFactor=1, pointerIds=00000000000000000000000000000001 default (ROT_0) (TRANSLATE) 1.0000 0.0000 -0.0000 0.0000 1.0000 -140.0000 0.0000 0.0000 1.0000 01-06 00:32:27.033743 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ startDispatchCycle 01-06 00:32:27.033788 3527 7192 I InputDispatcher: Publishing ffd248c InputMethod status: OK seq=40237751, Pointers = 0: (862.2, 1672.2) action=UP downTime=749307708744000 eventTime= 749309127398000 transformForDebugInput (ROT_0) (TRANSLATE); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -140.0000; 0.0000 0.0000 1.0000; 01-06 00:32:27.033638 2257 2646 D VRR [OTI]: scheduleIdle with 3500000000 01-06 00:32:27.033805 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusExInputReceiver1' ~ prepareDispatchCycle - flags=SPLIT, globalScaleFactor=1, pointerIds=00000000000000000000000000000001 default (ROT_0) (IDENTITY) 01-06 00:32:27.033825 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusExInputReceiver1' ~ startDispatchCycle 01-06 00:32:27.033831 3527 7192 W InputDispatcherExtImpl: Do not intercept motion event of monitor connection 01-06 00:32:27.033899 13945 13945 W InputLog: VRI[InputMethod] : debugInputEventStart event=MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=862.23145, y[0]=1532.2402, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309121, downTime=749307708, deviceId=6, source=0x1002, displayId=0, eventId=496212396 } 01-06 00:32:27.033904 3527 7192 I InputDispatcher: Publishing [Gesture Monitor] OplusExInputReceiver1 status: OK seq=40237752, Pointers = 0: (862.2, 1672.2) action=UP downTime=749307708744000 eventTime= 749309127398000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 01-06 00:32:27.033924 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusUAHInputChannel' ~ prepareDispatchCycle - flags=SPLIT, globalScaleFactor=1, pointerIds=00000000000000000000000000000001 default (ROT_0) (IDENTITY) 01-06 00:32:27.033938 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusUAHInputChannel' ~ startDispatchCycle 01-06 00:32:27.033944 3527 7192 W InputDispatcherExtImpl: Do not intercept motion event of monitor connection 01-06 00:32:27.034003 13945 13945 W InputLog: VRI[InputMethod] : enqueueInputEvent, call from:android.view.ViewRootImplExtImpl.debugInputEventEnqueue:753 android.view.ViewRootImpl.enqueueInputEvent:11718 android.view.ViewRootImpl.processRawInputEvent:12220 01-06 00:32:27.034070 3527 7192 I InputDispatcher: Publishing [Gesture Monitor] OplusUAHInputChannel status: OK seq=40237753, Pointers = 0: (862.2, 1672.2) action=UP downTime=749307708744000 eventTime= 749309127398000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 01-06 00:32:27.034089 3527 7192 I InputDispatcher: channel 'PointerEventDispatcher0' ~ prepareDispatchCycle - flags=0x0, globalScaleFactor=1, pointerIds=<none> default (ROT_0) (IDENTITY) 01-06 00:32:27.034104 3527 7192 I InputDispatcher: channel 'PointerEventDispatcher0' ~ startDispatchCycle 01-06 00:32:27.034110 3527 8144 D UAH-UahAdaptHelper: adaptSetNotification identity = OplusUAwareInputHelpersrc = 1000 , type 1 ,p1 = -1 ,p2 = -1 ,p3 = -1 ,p4 = 01-06 00:32:27.034188 3527 7192 W InputDispatcherExtImpl: Do not intercept motion event of monitor connection 01-06 00:32:27.034205 3527 8144 I [UAH_CLIENT]: uahRuleCtl, ruleId:1000, status:1 01-06 00:32:27.034225 13945 13945 W InputLog: View : debugEventHandled detail:Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }, sEvent=DebugEvent [ type=2, action=2, downTime=749307708, eventTime=749309121, stateRecord=[2026-01-06 00:32:27.033|START_EVENT, 2026-01-06 00:32:27.033|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = } ] 01-06 00:32:27.034249 13945 13945 W InputLog: VRI[InputMethod] : debugEventHandled detail:mView handled=true, sEvent=DebugEvent [ type=2, action=2, downTime=749307708, eventTime=749309121, stateRecord=[2026-01-06 00:32:27.033|START_EVENT, 2026-01-06 00:32:27.033|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }|mView handled=true ] 01-06 00:32:27.034295 3527 7192 I InputDispatcher: Publishing PointerEventDispatcher0 status: OK seq=40237754, Pointers = 0: (862.2, 1672.2) action=UP downTime=749307708744000 eventTime= 749309127398000 transformForDebugInput (ROT_0) (IDENTITY); 1.0000 0.0000 -0.0000; 0.0000 1.0000 -0.0000; 0.0000 0.0000 1.0000; 01-06 00:32:27.034304 13945 13945 W InputLog: VRI[InputMethod] : debugInputEventFinished event:MotionEvent { action=ACTION_MOVE, actionButton=0, id[0]=0, x[0]=862.23145, y[0]=1532.2402, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309121, downTime=749307708, deviceId=6, source=0x1002, displayId=0, eventId=496212396 }, sEvent=DebugEvent [ type=2, action=2, downTime=749307708, eventTime=749309121, stateRecord=[2026-01-06 00:32:27.033|START_EVENT, 2026-01-06 00:32:27.033|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0, 2026-01-06 00:32:27.034|ViewPostImeInputStage|0xc, 2026-01-06 00:32:27.034|SyntheticInputStage|0xc, 2026-01-06 00:32:27.034|FINISH_EVENT|0xc], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }|mView handled=true ] 01-06 00:32:27.034383 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ finishDispatchCycle - seq=40237747, handled=true 01-06 00:32:27.034345 13945 13945 W InputLog: VRI[InputMethod] : debugInputEventStart event=MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=862.23145, y[0]=1532.2402, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309127, downTime=749307708, deviceId=6, source=0x1002, displayId=0, eventId=169028894 } 01-06 00:32:27.034431 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ startDispatchCycle 01-06 00:32:27.034434 13945 13945 W InputLog: VRI[InputMethod] : enqueueInputEvent, call from:android.view.ViewRootImplExtImpl.debugInputEventEnqueue:753 android.view.ViewRootImpl.enqueueInputEvent:11718 android.view.ViewRootImpl.processRawInputEvent:12220 01-06 00:32:27.034494 13945 13945 E Input_Track: [Input] Start <<<<<<<<<<<<<< 169028894 01-06 00:32:27.034505 13945 13945 W InputLog: DecorView : dispatchTouchEvent cb=android.inputmethodservice.SoftInputWindow@b0f46, destoryed=false, featureId=-1 01-06 00:32:27.034631 13945 13945 W InputLog: View : debugEventHandled detail:Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }, sEvent=DebugEvent [ type=2, action=1, downTime=749307708, eventTime=749309127, stateRecord=[2026-01-06 00:32:27.034|START_EVENT, 2026-01-06 00:32:27.034|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = } ] 01-06 00:32:27.034615 2134 2163 I URCC_CORE_SERVER: [urccRuleCtrl] urccRuleCtrl:1000 enable:1 01-06 00:32:27.034639 13945 13945 E Input_Track: im.weshine.keyboard.views.RootView handle result true reason handled by onTouchEvent event is 169028894 01-06 00:32:27.034650 13945 13945 D OplusViewDragTouchViewHelper: dispatchTouchView action = 1 01-06 00:32:27.034777 13945 13945 D ViewRootImplExtImpl: the up motion event handled by client, just return 01-06 00:32:27.034776 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusExInputReceiver1' ~ finishDispatchCycle - seq=40237752, handled=true 01-06 00:32:27.034784 13945 13945 W InputLog: VRI[InputMethod] : debugEventHandled detail:mView handled=true, sEvent=DebugEvent [ type=2, action=1, downTime=749307708, eventTime=749309127, stateRecord=[2026-01-06 00:32:27.034|START_EVENT, 2026-01-06 00:32:27.034|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }|mView handled=true ] 01-06 00:32:27.034787 13945 13945 E Input_Track: [Input] Ends >>>>>>>>>>>>>>>> HANDLED 01-06 00:32:27.034786 3527 8144 I [UAH_CLIENT]: UahRelease, handle:595105 01-06 00:32:27.034808 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusExInputReceiver1' ~ startDispatchCycle 01-06 00:32:27.034841 13945 13945 W InputLog: VRI[InputMethod] : debugInputEventFinished event:MotionEvent { action=ACTION_UP, actionButton=0, id[0]=0, x[0]=862.23145, y[0]=1532.2402, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309127, downTime=749307708, deviceId=6, source=0x1002, displayId=0, eventId=169028894 }, sEvent=DebugEvent [ type=2, action=1, downTime=749307708, eventTime=749309127, stateRecord=[2026-01-06 00:32:27.034|START_EVENT, 2026-01-06 00:32:27.034|ENQUEUE_EVENT|true|false, 2026-01-06 00:32:27.034|EarlyPostImeInputStage|0x0, 2026-01-06 00:32:27.034|NativePostImeInputStage|0x0, 2026-01-06 00:32:27.034|ViewPostImeInputStage|0xc, 2026-01-06 00:32:27.034|SyntheticInputStage|0xc, 2026-01-06 00:32:27.034|FINISH_EVENT|0xc], handleDetail=|Touch handled by view onTouchEvent in im.weshine.keyboard.views.RootView{8d91a28 V.E...... ......ID 0,0-1264,2584 alpha=1.0 viewInfo = }|mView handled=true ] 01-06 00:32:27.034894 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ finishDispatchCycle - seq=40237751, handled=true 01-06 00:32:27.034915 3527 7192 I InputDispatcher: channel 'ffd248c InputMethod' ~ startDispatchCycle 01-06 00:32:27.035020 2134 2165 I URCC_CORE_SERVER: [urccRequestReleaseExec] urccRelease: handle: 595105, said:68 01-06 00:32:27.035084 3527 8144 I [UAH_CLIENT]: UahEventAcquire, cmdid:6, pkg:none, identity:OplusUAwareInputHelper 01-06 00:32:27.035912 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusUAHInputChannel' ~ finishDispatchCycle - seq=40237753, handled=true 01-06 00:32:27.035938 3527 7192 I InputDispatcher: channel '[Gesture Monitor] OplusUAHInputChannel' ~ startDispatchCycle 01-06 00:32:27.036144 2134 2165 I URCC_RES_MANAGER: [dumpResourceApplyInfo] urccResUpdate: GSN&^eaejfi#jmdj#iahjjjj*hechbjj*hidadjj*hechbjj*j*j*#jmjj$#^eaejfi#jmhj#aaaa#jmjj$*XKF&^j#jmijhj#j#jmjj$#^j#jmifjj#j.jj#jmjj$*NVN&^eaejfi#jmafj#gjchjj#jmjj$#^eaejfi#jm7gj#gjchjj#jmjj$#^eaejfi#jm9fj#gjchjj#jmjj$#^eaejfi#jm8ej#hjgehjj#jmjj$#^eaejfi#jm8fj#gjchjj#jmjj$#^eaejfi#jm7fj#hjgehjj#jmjj$#^eaejfi#jm9ej#hjgehjj#jmjj$#^eaejfi#jmaej#hjgehjj#jmjj$ 01-06 00:32:27.036532 2134 2165 I URCC_CORE_SERVER: [urccRequestQueueExec] urccRequest: handle: 595106, uz3M9x5&*7vx.zp91r2vp.w58py9#*79yy5s&*LuyprFZn9s5RwupqS5yu5s#*6ps9q1vw&*hgi#*us1v&*ijjjg#*r916&*VEVMG_HDRKV_E#*sr&i#*s5r&*^jmijijjij#ijicdjj$#^jmijijjhj#bffbjj$#^jmijijjgj#cbchjj$#^jmijijjfj#bffbjj$#^jmijijj9j#hhdedjj$#^jmijijj8j#gifbbjj$#^jmijijj7j#ggjhfjj$#^jmijijj6j#haedbjj$#^jmijij8ij#h$#^jmijij8hj#g$#^jmijij8gj#i$#^jmijij8fj#h$#^jmijij8aj#h$#^jmijij89j#g$#^jmijij88j#i$#^jmijij87j#h$#^jmijij4bj#bj*ae*ae$#^jmijij4aj#cj*ae*be$#^jmijiijhj#i$#^jmijiijcj#h$#^jmijiihej#hee$#^jmijiifjj#i$#^jmijiicgj#aajjjjjj$#^jmijgjafj#afjbjj$#^jmijgjaej#hjgehjj$#^jmijgj9fj#afjbjj$#^jmijgj9ej#hjgehjj$#^jmijgj8fj#afjbjj$#^jmijgj8ej#hjgehjj$#^jmijgj7gj#afjbjj$#^jmijgj7fj#hjgehjj$#^jmijgj46j#ichj$#^jmijejjhj#aaaa$#^jmijejjdj#iahjjjj*hechbjj*hidadjj*hechbjj*j*j*$ 01-06 00:32:27.038415 680 982 D AutoFillLog.AutofillInputEventManager: ACTION_UP or ACTION_CANCEL, set longClick true 01-06 00:32:27.038838 2134 2165 I URCC_RES_MANAGER: [dumpResourceApplyInfo] urccResUpdate: GSN&^eaeijd#jmdj#iahjjjj*hechbjj*hidadjj*hechbjj*j*j*#jmjj$#^eaeijd#jmhj#aaaa#jmjj$*XKF&^eaeijd#jmij#ijicdjj#jmjj$#^eaeijd#jmhj#bffbjj#jmjj$#^eaeijd#jm9j#hhdedjj#jmjj$#^eaeijd#jmfj#bffbjj#jmjj$#^eaeijd#jm8fj#h#jmjj$#^eaeijd#jmijcj#h#jmjj$#^eaeijd#jm8j#gifbbjj#jmjj$#^eaeijd#jmgj#cbchjj#jmjj$#^eaeijd#jmicgj#aajjjjjj#jmjj$#^eaeijd#jm6j#haedbjj#jmjj$#^eaeijd#jmihej#hee#jmjj$#^eaeijd#jmijhj#i#jmjj$#^eaeijd#jm87j#h#jmjj$#^eaeijd#jm88j#i#jmjj$#^eaeijd#jm89j#g#jmjj$#^eaeijd#jm8aj#h#jmjj$#^eaeijd#jm8gj#i#jmjj$#^eaeijd#jm4aj#cj*ae*be#jmjj$#^eaeijd#jm8hj#g#jmjj$#^eaeijd#jm8ij#h#jmjj$#^eaeijd#jm7j#ggjhfjj#jmjj$#^eaeijd#jm4bj#bj*ae*ae#jmjj$#^eaeijd#jmifjj#i#jmjj$*NVN&^eaeijd#jm46j#ichj#jmjj$#^eaeijd#jm7gj#afjbjj#jmjj$#^eaeijd#jm7fj#hjgehjj#jmjj$#^eaeijd#jm8ej#hjgehjj#jmjj$#^eaeijd#jm8fj#afjbjj#jmjj$#^eaeijd#jm9ej#hjgehjj#jmjj$#^eaeijd#jm9fj#afjbjj#jmjj$#^eaeijd#jmaej#hjgehjj#jmjj$#^eaeijd#jmafj#afjbjj#jmjj$ 01-06 00:32:27.038860 2134 2165 I URCC_RES_MANAGER: [dumpCpuOnline] urccCoreCtrl: [0x1010b90,2,595106,6] [0x1010ba0,3,595106,6] [0x1010bb0,1,595106,6] [0x1010bc0,2,595106,6] 01-06 00:32:27.039489 3527 7181 D Osense-SceneRecogManager: notifyGesturesPointerEvent...eventId:3, duration:331 01-06 00:32:27.040038 3527 7181 W InputLog: InputLog : readLevel result:1 01-06 00:32:27.040106 3527 7181 W InputLog: VelocityDebug : Pointer v(-0.49978748,-1.7341046) id 1: UP (862.231, 1672.239 eventTime = 749309127 downTime = 749307708 hisSize = 0) 01-06 00:32:27.040183 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.040284 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.040424 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.040464 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.040478 3527 7192 I InputDispatcher: channel 'PointerEventDispatcher0' ~ finishDispatchCycle - seq=40237754, handled=false 01-06 00:32:27.040512 3527 7192 I InputDispatcher: channel 'PointerEventDispatcher0' ~ startDispatchCycle 01-06 00:32:27.044505 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.044973 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.045500 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.045638 3527 3790 D OplusAccessControlManagerService: isHidenPackage: com.kuaishou.nebula is false 01-06 00:32:27.054096 15683 15683 D InputMethodManager: updateSelection 01-06 00:32:27.054159 15683 15683 V InputMethodManager: SELECTION CHANGE: com.android.internal.inputmethod.IInputMethodSession$Stub$Proxy@69a056a 01-06 00:32:27.054201 3527 8586 W PresentationStatsEventLogger: Bad view state for: -1, state: ViewState: [id=1073741824@199455351, state:CHANGED|STARTED_SESSION, currentValue:android.view.autofill.AutofillValue@597e4666] 01-06 00:32:27.066031 13945 13945 E ThemeUtils: View class com.airbnb.lottie.LottieAnimationView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). 01-06 00:32:27.067346 13945 13945 E ThemeUtils: View class com.airbnb.lottie.LottieAnimationView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). 01-06 00:32:27.068285 13945 13945 E ThemeUtils: View class com.airbnb.lottie.LottieAnimationView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). 01-06 00:32:27.070133 3527 7564 V WindowManager: Relayout Window{ffd248c u0 InputMethod}: viewVisibility=0, oldvis=0, req=1264x2780 , apr = 0, vsysui= 01-06 00:32:27.070304 3527 7564 D DisplayModeDirector: setAppRequest displayId : 12 modeId: 0 requestedRefreshRate: 0.0 requestedMinRefreshRateRange: 0.0 requestedMaxRefreshRateRange: 0.0 01-06 00:32:27.070450 15683 15683 D OplusCursorFeedback: getExtraCursorWidth 01-06 00:32:27.070462 15683 15683 D OplusCursorFeedback: getExtraLeftOffset 01-06 00:32:27.071116 3527 7564 D DisplayModeDirector: setAppRequest displayId : 0 modeId: 2 requestedRefreshRate: 0.0 requestedMinRefreshRateRange: 0.0 requestedMaxRefreshRateRange: 60.000004 01-06 00:32:27.071270 13945 13945 I SurfaceControl: setExtendedRangeBrightness sc=Surface(name=InputMethod)/@0xe3155ae,currentBufferRatio=1.0,desiredRatio=1.0 01-06 00:32:27.071487 3527 7564 E TestFixed: handleTopActivityLaunchingInDifferentOrientation-11, checkOpening = true, r = ActivityRecord{193771729 u0 com.kuaishou.nebula/com.yxcorp.gifshow.detail.PhotoDetailActivity t43044}, orientationSrc = ActivityRecord{193771729 u0 com.kuaishou.nebula/com.yxcorp.gifshow.detail.PhotoDetailActivity t43044}, activityOrientation = 1, !rInTransition = true, config.orientation = 1, call by=com.android.server.wm.DisplayContent.updateOrientation:2042 com.android.server.wm.DisplayContent.updateOrientation:1960 com.android.server.wm.WindowManagerService.relayoutWindow:2944 com.android.server.wm.Session.relayout:317 com.android.server.wm.Session.relayoutAsync:336 android.view.IWindowSession$Stub.onTransact:755 com.android.server.wm.Session.onTransact:227 android.os.Binder.execTransactInternal:1444 android.os.Binder.execTransact:1378 <bottom of call stack> <bottom of call stack> <bottom of call stack> 01-06 00:32:27.071506 3527 7564 E TestFixed: handleTopActivityLaunchingInDifferentOrientation, !r.occludesParent = true doRotationAnimation = false r.isReportedDrawn() = true r.isVisible() = true 01-06 00:32:27.071638 3527 7564 D DisplayModeDirector: setAppRequest displayId : 12 modeId: 0 requestedRefreshRate: 0.0 requestedMinRefreshRateRange: 0.0 requestedMaxRefreshRateRange: 0.0 01-06 00:32:27.071960 1941 21632 I oppo_audiox_sw_effects: sweffectFx_algo_Process g_sweffectFx_Process_counter 3449984 frame_count 1920 processedMsk 0x1 [2 4 48000 ] openCloseCrossFadeCfg enable 0, crossFadeCfg enable 0 01-06 00:32:27.072014 3527 7564 D DisplayModeDirector: setAppRequest displayId : 0 modeId: 2 requestedRefreshRate: 0.0 requestedMinRefreshRateRange: 0.0 requestedMaxRefreshRateRange: 60.000004 01-06 00:32:27.072028 1941 21632 I oppo_audiox_sw_effects: sweffectFx_algo_Process session 0x728b109308 newDeviceID 5 deviceID 1 newServType 7 servType 6 newvolumelevel 0 volumeLevel 3 openCloseFadePath 0 fade_path 0 01-06 00:32:27.072836 3527 3775 I SurfaceControl: SurfaceControl hide: sc Surface(name=Input Consumer recents_animation_input_consumer)/@0x6ba2e87 tx=15148349653098 ,layerId= 110 caller = SurfaceControl.java.hide:3597 InputConsumerImpl.java.hide:150 InputMonitor.java.resetInputConsumers:260 InputMonitor.java.updateInputWindows:718 null.-$$Nest$mupdateInputWindows:0 InputMonitor.java.run:180 Handler.java.handleCallback:1027 Handler.java.dispatchMessage:108 Looper.java.loopOnce:298 Looper.java.loop:408 01-06 00:32:27.080734 3527 3775 I SurfaceControl: SurfaceControl hide: sc Surface(name=WallpaperWindowToken{fc2133e showWhenLocked=false})/@0x7d1543a tx=15148352046987 ,layerId= 201523 caller = SurfaceControl.java.hide:3597 SurfaceControl.java.setVisibility:3539 WallpaperWindowToken.java.prepareSurfaces:93 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 DisplayArea.java.prepareSurfaces:846 WindowContainer.java.prepareSurfaces:3215 DisplayArea.java.prepareSurfaces:846 01-06 00:32:27.080879 3527 3775 I SurfaceControl: SurfaceControl hide: sc Surface(name=WallpaperWindowToken{56e6abd showWhenLocked=false})/@0x5fa3a79 tx=15148352046987 ,layerId= 201527 caller = SurfaceControl.java.hide:3597 SurfaceControl.java.setVisibility:3539 WallpaperWindowToken.java.prepareSurfaces:93 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 WindowContainer.java.prepareSurfaces:3215 DisplayArea.java.prepareSurfaces:846 WindowContainer.java.prepareSurfaces:3215 DisplayArea.java.prepareSurfaces:846 01-06 00:32:27.108121 15683 539 W OplusFeedbackInfo: 0xb400006f0c6c5b00 c2.qti.hevc.decoder codec[0xb400006efe0fd000] 720x1280 inputFps=61 outputFps=60 renderFps=60, discardFps=0 01-06 00:32:27.108339 19959 20282 D MediaCommu: receive media message:Fps#61#Width#720#Height#1280 uid:10356 01-06 00:32:27.108826 19959 20282 D StuckAnalyseController: onMessageChange packageName:com.kuaishou.nebula message:Fps#61#Width#720#Height#1280 01-06 00:32:27.111399 3527 7155 D FusionRGBSensor: process type=33171074, cct=5300.000000, mode=0, r=100.0, g=81.2, b=18.5, c=226.6, ir_ratio=0.000000, algo=2, lux=2.8, hall=0 01-06 00:32:27.111587 3527 7155 D FusionLightNextGen: raw_lux -1.0, raw_cct -1.0, r/g/b/c: 100.0/81.2/18.5/226.6, R/G/B: 155.0/136.0/105.0, bri 8.0, lux: 0.000000, cct: 5300.0, ir: 0.000000, conf: 2, cnt: 0 01-06 00:32:27.112228 3527 20376 D EyeProtect: EnviromentRecord CCT:stableValueInOneSide,isStable = false, mIsSupportRhythm = true, mNeedEffectiveImmediately = false, checkSize = 10, queue length = 7 01-06 00:32:27.112263 3527 20376 D EyeProtect: EnviromentRecord LUX:stableValueInOneSide,isStable = false, mIsSupportRhythm = true, mNeedEffectiveImmediately = false, checkSize = 10, queue length = 7 01-06 00:32:27.112274 3527 20376 D EyeProtect: SensorFilter:Enter low light due to lux low mean, ave = 0.0 luxQueue=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 01-06 00:32:27.154210 15683 18608 D [NativeSecurity]: SecurityExtendLuaCallMethod::callMethod 01-06 00:32:27.206731 3527 3784 D QosSceneRecognizer: updateAssProcRecord add: false, isProvider: true, cmpAssParams: CmpAssParams{mCallingUid=10099, mCallingPid=13879, mCalledUid=10115, mCalledPid=3544, mCalledPkgName=com.oplus.linker, mCalledProcessName=com.oplus.linker, mCmpName=5f89abc/com.oplus.linker/.feature.ios.client.connection.core.IPhoneConnectionProvider} 01-06 00:32:27.216740 3203 3203 E OplusTouchDaemon: [prevent][curved_large_handle_V2][3008]: id:0 pos:1 center_down:1 (8766 11408)(0 0 0 0) 01-06 00:32:27.216809 3203 3203 E OplusTouchDaemon: [touchEvent][ts_report_touch_data][643]: first touch point id 0 [8766 11408 0 0 0 0 0] 01-06 00:32:27.216952 3527 7193 D InputReader: BatchSize: 9 Count: 9 01-06 00:32:27.216987 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_TRACKING_ID value=16 when=749309311663000 01-06 00:32:27.217004 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_KEY code=BTN_TOUCH value=DOWN when=749309311663000 01-06 00:32:27.217015 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_KEY code=BTN_TOOL_FINGER value=DOWN when=749309311663000 01-06 00:32:27.217021 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_WIDTH_MAJOR value=10 when=749309311663000 01-06 00:32:27.217027 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_TOUCH_MINOR value=10 when=749309311663000 01-06 00:32:27.217036 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_PRESSURE value=10 when=749309311663000 01-06 00:32:27.217041 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_POSITION_X value=8766 when=749309311663000 01-06 00:32:27.217046 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_ABS code=ABS_MT_POSITION_Y value=11408 when=749309311663000 01-06 00:32:27.217052 3527 7193 D InputReader: Input event: eventHubDevice=4 type=EV_SYN code=SYN_REPORT value=0 when=749309311663000 01-06 00:32:27.217063 3527 7193 D InputReader: syncTouch: pointerCount 0 -> 1, touching ids 0x00000000 -> 0x80000000, hovering ids 0x00000000 -> 0x00000000, canceled ids 0x00000000 01-06 00:32:27.217118 3527 7193 D InputReader: pointerCount went from 0 to 1. last: When: 749309127398000 Read time: 749309128925354 Button state: 0x00000000 Raw pointer data: 0 pointers: ID bits: hovering = 0x00000000, touching = 0x00000000, canceled = 0x00000000 01-06 00:32:27.217183 3527 7193 D InputReader: next: When: 749309311663000 Read time: 749309313109365 Button state: 0x00000000 Raw pointer data: 1 pointers: [0]: id=0, x=8766, y=11408, pressure=10, touchMajor=5, touchMinor=10, toolMajor=10, toolMinor=10, orientation=0, tiltX=0, tiltY=0, distance=0, toolType=FINGER, isHovering=0 ID bits: hovering = 0x00000000, touching = 0x80000000, canceled = 0x00000000 01-06 00:32:27.217188 3527 7193 D InputReader: InputReader dump: 01-06 00:32:27.218558 3527 7193 D InputReader: Event Hub State: 01-06 00:32:27.218615 3527 7193 D InputReader: BuiltInKeyboardId: -2 01-06 00:32:27.218623 3527 7193 D InputReader: Devices: 01-06 00:32:27.218627 3527 7193 D InputReader: 1: uinput_nav 01-06 00:32:27.218632 3527 7193 D InputReader: Classes: KEYBOARD | EXTERNAL 01-06 00:32:27.218637 3527 7193 D InputReader: Path: /dev/input/event8 01-06 00:32:27.218641 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.218647 3527 7193 D InputReader: Descriptor: 3b5e141101b56e3eba67ef9a195d0a8f3d885766 01-06 00:32:27.218652 3527 7193 D InputReader: Location: 01-06 00:32:27.218657 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.218662 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.218671 3527 7193 D InputReader: Identifier: bus=0x0003, vendor=0x0000, product=0x0000, version=0x0001, bluetoothAddress=<not set> 01-06 00:32:27.218676 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.218681 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.218685 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.218689 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.218694 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/virtual 01-06 00:32:27.218698 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.218702 3527 7193 D InputReader: 2: pineapple-mtp-snd-card Button Jack 01-06 00:32:27.218707 3527 7193 D InputReader: Classes: KEYBOARD 01-06 00:32:27.218712 3527 7193 D InputReader: Path: /dev/input/event7 01-06 00:32:27.218715 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.218720 3527 7193 D InputReader: Descriptor: 1c10eb690ae02d0407190781ab0073e0dfc286e0 01-06 00:32:27.218725 3527 7193 D InputReader: Location: ALSA 01-06 00:32:27.218729 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.218734 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.218740 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.218745 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.218749 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.218753 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.218758 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.218762 3527 7193 D InputReader: SysfsDevicePath: <none> 01-06 00:32:27.218769 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.218773 3527 7193 D InputReader: 3: pineapple-mtp-snd-card Headset Jack 01-06 00:32:27.218777 3527 7193 D InputReader: Classes: SWITCH 01-06 00:32:27.218781 3527 7193 D InputReader: Path: /dev/input/event6 01-06 00:32:27.218785 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.218791 3527 7193 D InputReader: Descriptor: 0cbe63350d518076c8f671e80cbc15e6d94f7e4a 01-06 00:32:27.218795 3527 7193 D InputReader: Location: ALSA 01-06 00:32:27.218799 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.218806 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.218812 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.218817 3527 7193 D InputReader: KeyLayoutFile: 01-06 00:32:27.218821 3527 7193 D InputReader: KeyCharacterMapFile: 01-06 00:32:27.218825 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.218829 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.218833 3527 7193 D InputReader: SysfsDevicePath: <none> 01-06 00:32:27.218837 3527 7193 D InputReader: SwState (pressed): <none> 01-06 00:32:27.218841 3527 7193 D InputReader: 6: pmic_pwrkey 01-06 00:32:27.218846 3527 7193 D InputReader: Classes: KEYBOARD 01-06 00:32:27.218856 3527 7193 D InputReader: Path: /dev/input/event2 01-06 00:32:27.218860 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.218866 3527 7193 D InputReader: Descriptor: 39f0cc2fda6f8287fd99ffa0db53ae80f4837e18 01-06 00:32:27.218870 3527 7193 D InputReader: Location: pmic_pwrkey/input0 01-06 00:32:27.218875 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.218879 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.218884 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.218888 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.218893 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.218897 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.218901 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.218908 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300:pwrkey 01-06 00:32:27.218912 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.218919 3527 7193 D InputReader: 7: oplus_fp_input 01-06 00:32:27.218924 3527 7193 D InputReader: Classes: KEYBOARD 01-06 00:32:27.218928 3527 7193 D InputReader: Path: /dev/input/event1 01-06 00:32:27.218932 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.218936 3527 7193 D InputReader: Descriptor: 35e5048bca63d3c8a7c284235de901684e5f665e 01-06 00:32:27.218941 3527 7193 D InputReader: Location: 01-06 00:32:27.218946 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.218951 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.218957 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.218961 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.218968 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.218972 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.218976 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.218981 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/virtual 01-06 00:32:27.218985 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.218992 3527 7193 D InputReader: 8: gpio-keys 01-06 00:32:27.218996 3527 7193 D InputReader: Classes: KEYBOARD 01-06 00:32:27.219000 3527 7193 D InputReader: Path: /dev/input/event0 01-06 00:32:27.219004 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.219009 3527 7193 D InputReader: Descriptor: 485d69228e24f5e46da1598745890b214130dbc4 01-06 00:32:27.219013 3527 7193 D InputReader: Location: gpio-keys/input0 01-06 00:32:27.219017 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.219021 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.219026 3527 7193 D InputReader: Identifier: bus=0x0019, vendor=0x0001, product=0x0001, version=0x0100, bluetoothAddress=<not set> 01-06 00:32:27.219031 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/gpio-keys.kl 01-06 00:32:27.219036 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.219040 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.219044 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.219049 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/platform/soc/soc:gpio_keys 01-06 00:32:27.219053 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.219058 3527 7193 D InputReader: 5: pmic_resin 01-06 00:32:27.219062 3527 7193 D InputReader: Classes: KEYBOARD 01-06 00:32:27.219066 3527 7193 D InputReader: Path: /dev/input/event3 01-06 00:32:27.219070 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.219076 3527 7193 D InputReader: Descriptor: 653e1ca6257fe659881d6f71b799cb02b0d69ace 01-06 00:32:27.219080 3527 7193 D InputReader: Location: pmic_resin/input0 01-06 00:32:27.219084 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.219088 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.219093 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.219100 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.219104 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.219108 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.219112 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.219119 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300:resin 01-06 00:32:27.219124 3527 7193 D InputReader: KeyState (pressed): <none> 01-06 00:32:27.219128 3527 7193 D InputReader: 4: touchpanel 01-06 00:32:27.219133 3527 7193 D InputReader: Classes: KEYBOARD | TOUCH | TOUCH_MT 01-06 00:32:27.219136 3527 7193 D InputReader: Path: /dev/input/event5 01-06 00:32:27.219140 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.219144 3527 7193 D InputReader: Descriptor: 26d13db3fa0f6bd5d05831266fb01ea6c500b88c 01-06 00:32:27.219148 3527 7193 D InputReader: Location: synaptics_tcm/touch_input 01-06 00:32:27.219154 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.219158 3527 7193 D InputReader: UniqueId: 01-06 00:32:27.219163 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0001, version=0x0001, bluetoothAddress=<not set> 01-06 00:32:27.219167 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.219172 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Generic.kcm 01-06 00:32:27.219176 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.219182 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.219187 3527 7193 D InputReader: SysfsDevicePath: /sys/devices/platform/soc/ac0000.qcom,qupv3_1_geni_se/a90000.spi/spi_master/spi0/spi0.0 01-06 00:32:27.219192 3527 7193 D InputReader: KeyState (pressed): BTN_TOOL_FINGER, BTN_TOUCH 01-06 00:32:27.219202 3527 7193 D InputReader: AbsState: ABS_X=0, ABS_Y=0, ABS_PRESSURE=0, ABS_PROFILE=0, 34=0, 35=0, ABS_MT_SLOT=0, ABS_MT_TOUCH_MAJOR=5, ABS_MT_TOUCH_MINOR=10, ABS_MT_WIDTH_MAJOR=10, ABS_MT_POSITION_X=8766, ABS_MT_POSITION_Y=11408, ABS_MT_TOOL_TYPE=0, ABS_MT_TRACKING_ID=16, ABS_MT_PRESSURE=10 01-06 00:32:27.219207 3527 7193 D InputReader: -1: Virtual 01-06 00:32:27.219214 3527 7193 D InputReader: Classes: KEYBOARD | ALPHAKEY | DPAD | VIRTUAL 01-06 00:32:27.219219 3527 7193 D InputReader: Path: <virtual> 01-06 00:32:27.219223 3527 7193 D InputReader: Enabled: true 01-06 00:32:27.219227 3527 7193 D InputReader: Descriptor: a718a782d34bc767f4689c232d64d527998ea7fd 01-06 00:32:27.219231 3527 7193 D InputReader: Location: 01-06 00:32:27.219238 3527 7193 D InputReader: ControllerNumber: 0 01-06 00:32:27.219242 3527 7193 D InputReader: UniqueId: <virtual> 01-06 00:32:27.219247 3527 7193 D InputReader: Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000, bluetoothAddress=<not set> 01-06 00:32:27.219251 3527 7193 D InputReader: KeyLayoutFile: /system/usr/keylayout/Generic.kl 01-06 00:32:27.219255 3527 7193 D InputReader: KeyCharacterMapFile: /system/usr/keychars/Virtual.kcm 01-06 00:32:27.219260 3527 7193 D InputReader: ConfigurationFile: 01-06 00:32:27.219264 3527 7193 D InputReader: VideoDevice: <none> 01-06 00:32:27.219268 3527 7193 D InputReader: SysfsDevicePath: <none> 01-06 00:32:27.219273 3527 7193 D InputReader: Unattached video devices: 01-06 00:32:27.219277 3527 7193 D InputReader: <none> 01-06 00:32:27.219283 3527 7193 D InputReader: 01-06 00:32:27.219289 3527 7193 D InputReader: Input Reader State (Nums of device: 8): 01-06 00:32:27.219294 3527 7193 D InputReader: Device 8: uinput_nav 01-06 00:32:27.219299 3527 7193 D InputReader: EventHub Devices: [ 1 ] 01-06 00:32:27.219303 3527 7193 D InputReader: Generation: 67 01-06 00:32:27.219309 3527 7193 D InputReader: IsExternal: true 01-06 00:32:27.219312 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219317 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219323 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219327 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219332 3527 7193 D InputReader: SysfsRootPath: /sys/devices/virtual 01-06 00:32:27.219336 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.219340 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.219344 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.219349 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.219709 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.219726 3527 7193 D InputReader: Parameters: 01-06 00:32:27.219729 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.219732 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.219734 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.219736 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.219738 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.219742 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.219744 3527 7193 D InputReader: Device 4: pmic_pwrkey 01-06 00:32:27.219745 3527 7193 D InputReader: EventHub Devices: [ 6 ] 01-06 00:32:27.219749 3527 7193 D InputReader: Generation: 70 01-06 00:32:27.219754 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.219757 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219759 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219764 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219767 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219770 3527 7193 D InputReader: SysfsRootPath: /sys/devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300:pwrkey 01-06 00:32:27.219773 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.219777 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.219779 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.219782 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.219784 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.219786 3527 7193 D InputReader: Parameters: 01-06 00:32:27.219788 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.219790 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.219792 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.219794 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.219797 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.219799 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.219801 3527 7193 D InputReader: Device 5: pmic_resin 01-06 00:32:27.219803 3527 7193 D InputReader: EventHub Devices: [ 5 ] 01-06 00:32:27.219805 3527 7193 D InputReader: Generation: 73 01-06 00:32:27.219807 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.219809 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219812 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219814 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219816 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219851 3527 7193 D InputReader: SysfsRootPath: /sys/devices/platform/soc/c42d000.qcom,spmi/spmi-0/0-00/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300/c42d000.qcom,spmi:qcom,pmk8550@0:pon_hlos@1300:resin 01-06 00:32:27.219855 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.219857 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.219860 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.219863 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.219865 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.219867 3527 7193 D InputReader: Parameters: 01-06 00:32:27.219869 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.219872 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.219875 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.219877 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.219879 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.219882 3527 7193 D InputReader: RotateVolumeKey: false 01-06 00:32:27.219884 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.219886 3527 7193 D InputReader: Device 2: gpio-keys 01-06 00:32:27.219888 3527 7193 D InputReader: EventHub Devices: [ 8 ] 01-06 00:32:27.219890 3527 7193 D InputReader: Generation: 72 01-06 00:32:27.219893 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.219895 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219897 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219899 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219901 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219905 3527 7193 D InputReader: SysfsRootPath: /sys/devices/platform/soc/soc:gpio_keys 01-06 00:32:27.219908 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.219911 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.219913 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.219915 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.219917 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.219919 3527 7193 D InputReader: Parameters: 01-06 00:32:27.219922 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.219926 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.219928 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.219930 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.219932 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.219934 3527 7193 D InputReader: RotateVolumeKey: false 01-06 00:32:27.219936 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.219937 3527 7193 D InputReader: Device 3: oplus_fp_input 01-06 00:32:27.219940 3527 7193 D InputReader: EventHub Devices: [ 7 ] 01-06 00:32:27.219942 3527 7193 D InputReader: Generation: 71 01-06 00:32:27.219944 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.219947 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219949 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219951 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219953 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219955 3527 7193 D InputReader: SysfsRootPath: /sys/devices/virtual 01-06 00:32:27.219957 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.219959 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.219961 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.219963 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.219966 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.219968 3527 7193 D InputReader: Parameters: 01-06 00:32:27.219970 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.219972 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.219974 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.219976 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.219978 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.219980 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.219982 3527 7193 D InputReader: Device 7: pineapple-mtp-snd-card Headset Jack 01-06 00:32:27.219984 3527 7193 D InputReader: EventHub Devices: [ 3 2 ] 01-06 00:32:27.219987 3527 7193 D InputReader: Generation: 69 01-06 00:32:27.219989 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.219990 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.219992 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.219994 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.219996 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.219998 3527 7193 D InputReader: SysfsRootPath: <none> 01-06 00:32:27.220000 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.220002 3527 7193 D InputReader: Sources: KEYBOARD 01-06 00:32:27.220004 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.220006 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.220007 3527 7193 D InputReader: Keyboard Input Mapper: 01-06 00:32:27.220009 3527 7193 D InputReader: Parameters: 01-06 00:32:27.220011 3527 7193 D InputReader: OrientationAware: false 01-06 00:32:27.220013 3527 7193 D InputReader: HandlesKeyRepeat: false 01-06 00:32:27.220015 3527 7193 D InputReader: Orientation: Rotation0 01-06 00:32:27.220016 3527 7193 D InputReader: KeyDowns: 0 keys currently down 01-06 00:32:27.220018 3527 7193 D InputReader: MetaState: 0x0 01-06 00:32:27.220020 3527 7193 D InputReader: KeyboardLayoutInfo: <not set> 01-06 00:32:27.220022 3527 7193 D InputReader: Switch Input Mapper: 01-06 00:32:27.220025 3527 7193 D InputReader: SwitchValues: 0 01-06 00:32:27.220027 3527 7193 D InputReader: Device 6: touchpanel 01-06 00:32:27.220029 3527 7193 D InputReader: EventHub Devices: [ 4 ] 01-06 00:32:27.220031 3527 7193 D InputReader: Generation: 784 01-06 00:32:27.220032 3527 7193 D InputReader: IsExternal: false 01-06 00:32:27.220034 3527 7193 D InputReader: IsWaking: false 01-06 00:32:27.220036 3527 7193 D InputReader: AssociatedDisplayPort: <none> 01-06 00:32:27.220038 3527 7193 D InputReader: AssociatedDisplayUniqueIdByPort: <none> 01-06 00:32:27.220041 3527 7193 D InputReader: AssociatedDisplayUniqueIdByDescriptor: <none> 01-06 00:32:27.220043 3527 7193 D InputReader: SysfsRootPath: /sys/devices/platform/soc/ac0000.qcom,qupv3_1_geni_se/a90000.spi/spi_master/spi0/spi0.0 01-06 00:32:27.220045 3527 7193 D InputReader: HasMic: false 01-06 00:32:27.220047 3527 7193 D InputReader: Sources: KEYBOARD | TOUCHSCREEN 01-06 00:32:27.220049 3527 7193 D InputReader: KeyboardType: 1 01-06 00:32:27.220051 3527 7193 D InputReader: ControllerNum: 0 01-06 00:32:27.220055 3527 7193 D InputReader: Motion Ranges: 01-06 00:32:27.220057 3527 7193 D InputReader: X: source=TOUCHSCREEN, min=0.000, max=1263.900, flat=0.000, fuzz=0.000, resolution=0.000 01-06 00:32:27.220060 3527 7193 D InputReader: Y: source=TOUCHSCREEN, min=0.000, max=2779.900, flat=0.000, fuzz=0.000, resolution=0.000 01-06 00:32:27.220062 3527 7193 D InputReader: PRESSURE: source=TOUCHSCREEN, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000 01-06 00:32:27.220064 3527 7193 D InputReader: SIZE: source=TOUCHSCREEN, min=0.000, max=1.000, flat=0.000, fuzz=0.000, resolution=0.000 01-06 00:32:27.220066 3527 7193 D InputReader: TOUCH_MAJOR: source=TOUCHSCREEN, min=0.000, max=3053.866, flat=0.000, fuzz=0.000, resolution=0.000 01-06 00:32:27.220482 3527 7193 D UnwantedInteractionBlocker: UnwantedInteractionBlocker::notifyMotion, NotifyMotionArgs(id=810216606, eventTime=749309311663000, deviceId=6, source=TOUCHSCREEN, action=DOWN, pointerCount=1 pointers={0: id=0 x=876.5 y=1140.8 pressure=1.0 major=0.5 minor=1.0 orientation=0.0}, flags=0x00000000) 01-06 00:32:27.220494 3527 7193 V UnwantedInteractionBlocker: notifyMotion - id=304aec9e eventTime=749309311663000, deviceId=6, source=TOUCHSCREEN, displayId=0, policyFlags=0x0, action=DOWN, actionButton=0x0, flags=0x0, metaState=0x0, buttonState=0x0, edgeFlags=0x0, xPrecision=10.000792, yPrecision=10.000360, xCursorPosition=nan, yCursorPosition=nan, downTime=749309311663000 01-06 00:32:27.220501 3527 7193 V UnwantedInteractionBlocker: Pointer 0: id=0, toolType=FINGER, x=876.530640, y=1140.758911, pressure=1.000000, size=0.029412, touchMajor=0.499971, touchMinor=0.999942, toolMajor=0.499971, toolMinor=0.999942, orientation=0.000000 01-06 00:32:27.220624 3527 7193 D InputProcessor: InputProcessor::notifyMotion, NotifyMotionArgs(id=810216606, eventTime=749309311663000, deviceId=6, source=TOUCHSCREEN, action=DOWN, pointerCount=1 pointers={0: id=0 x=876.5 y=1140.8 pressure=1.0 major=0.5 minor=1.0 orientation=0.0}, flags=0x00000000) 01-06 00:32:27.220771 3527 7193 D IntermittentInputFilter: filterInputEvent mIntercepting=true, event=MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=876.5303, y[0]=1140.7588, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=749309311, downTime=749309311, deviceId=6, source=0x1002, displayId=0, eventId=810216606, getFrameTimeNanos=-1 }, now =749309316, mInterceptingStartTime = 749309129分析为什么DOWN事件做了防抖处理
最新发布
01-13
```markdown 代码概述 日志显示了一次触摸事件的完整输入流程,重点关注 `IntermittentInputFilter` 对 `ACTION_DOWN` 事件进行防抖处理的行为。该机制用于防止因硬件抖动或异常上报导致的误触。 --- 代码解析 ### 关键日志分析: 1. **前一次触摸事件(UP)结束时间** ``` 01-06 00:32:27.033377 ... ACTION_UP ... eventTime=749309127 ``` 上一次触摸释放事件发生在 `eventTime = 749309127` 微秒。 2. **新一次触摸事件(DOWN)到来** ``` 01-06 00:32:27.217004 ... Input event: BTN_TOUCH value=DOWN ... ``` 新的按下事件在 `eventTime = 749309311` 微秒时由驱动上报。 3. **IntermittentInputFilter 判断与拦截状态变更** - 初始状态(UP后): ``` filterInputEvent mIntercepting=false ``` - 新 DOWN 事件到达时: ``` filterInputEvent mIntercepting=true, event=ACTION_DOWN ``` 表示此时开始进入防抖拦截窗口。 4. **时间差计算:两次事件间隔** $$ \Delta t = 749309311 - 749309127 = 184\ \mu s \approx 0.184\ ms $$ 虽然实际感知上极短,但系统检测到连续触摸行为可能存在“快速弹跳”特征,因此触发防抖逻辑。 5. **为何认为需要防抖?** - 尽管表面看是用户正常操作,但以下因素可能触发防抖: - 触摸屏 IC 报告坐标不稳定; - 手指未完全抬起即再次按下(接近“双击”极限速度); - 系统设置的最小合法触摸间隔(如 100ms)尚未满足,判定为潜在噪声。 6. **mInterceptingStartTime 的作用** ``` mInterceptingStartTime = 749309129 ``` 记录了从上一个 UP 事件后启动防抖监控的时间起点。当新的 DOWN 在此之后短时间内出现,即被标记为可疑事件。 --- 知识点(列出该代码中遇到的知识点) 1. **输入事件防抖机制(IntermittentInputFilter)** 通过记录事件时间间隔,在短时间内过滤疑似噪声的触摸事件,防止误触发。 2. **MotionEvent 时间戳比对** 使用 `eventTime` 和 `downTime` 判断相邻事件的时间差,决定是否启用拦截策略。 3. **触摸状态机管理(mIntercepting)** 标志位控制当前是否处于防抖拦截阶段,避免高频无效事件传递至应用层。 ```
### 问题分析 当使用 `requests` 请求网页时,如果返回的内容中包含类似“请开启JavaScript并刷新该页”的提示信息,通常表示目标页面依赖 JavaScript 动态加载内容。由于 `requests` 无法执行 JavaScript,因此只能获取到初始 HTML 响应,而无法看到由 JavaScript 渲染后的完整页面内容。 这种现象常见于反爬虫机制较强的网站,其目的可能是为了防止自动化工具直接抓取数据。面对此类情况,可以采用以下几种解决方案来绕过或模拟 JavaScript 执行的过程: --- ### 解决方法 #### 1. 使用 `requests-html` 支持 JavaScript 渲染 `requests-html` 是一个基于 `requests` 的扩展库,支持 JavaScript 渲染功能,能够模拟浏览器行为加载动态生成的内容。具体实现如下: ```python from requests_html import HTMLSession # 创建会话对象 session = HTMLSession() # 发起请求 url = 'http://www.example.com' response = session.get(url) # 渲染 JavaScript response.html.render() # 获取渲染后的 HTML 内容 rendered_html = response.html.html print(rendered_html) ``` 通过 `render()` 方法,`requests-html` 能够等待页面中的 JavaScript 完全执行后再提取最终的 HTML 内容[^2]。 --- #### 2. 添加请求头(Headers)和 Cookie 模拟浏览器行为 有些网站会检测请求来源是否为浏览器,并要求启用 JavaScript。可以通过在请求头中添加合适的 `User-Agent` 和 `Cookie` 来模拟真实浏览器的行为。示例如下: ```python import requests headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Cookie': '__guid=114041473.1781210994388745200.1533284433697.5437; wzwsconfirm=0da2a6860c10d7c4ed6204aa5e2ef3d0; monitor_count=7; wzwstemplate=NQ==; ccpassport=ab4dfc243d0c06e9bcd43a4d50aa4883; wzwschallenge=-1; wzwsvtime=1533310126' } url = 'http://www.smxs.gov.cn/nsmxs_6.html' response = requests.get(url, headers=headers) response.encoding = 'gbk' # 根据网页编码调整 print(response.text) ``` 需要注意的是,`Cookie` 的值可能具有时效性,需要定期更新以避免失效[^3]。 --- #### 3. 使用 Selenium 模拟浏览器操作 对于完全依赖 JavaScript 加载的页面,推荐使用 `Selenium` 工具,它能够启动真实的浏览器内核(如 Chrome 或 Firefox),从而完全加载页面内容。示例代码如下: ```python from selenium import webdriver # 启动浏览器驱动 driver = webdriver.Chrome() # 访问目标 URL url = 'http://www.example.com' driver.get(url) # 获取完整的页面 HTML html_content = driver.page_source print(html_content) # 关闭浏览器 driver.quit() ``` 虽然 `Selenium` 的性能不如 `requests` 快,但它能够处理复杂的 JavaScript 渲染场景,适合用于高反爬虫强度的网站[^1]。 --- #### 4. 分析 API 接口直接获取数据 许多现代网站通过 JavaScript 动态加载数据,这些数据通常来自后端 API 接口。可以通过浏览器开发者工具(F12)分析网络请求,找到数据接口并直接调用该接口获取 JSON 数据。这种方式效率高且能绕过前端渲染的限制。 --- ### 总结 针对 `requests` 请求网页时返回“请开启JavaScript并刷新该页”提示的问题,主要原因是页面依赖 JavaScript 动态加载内容。解决方法包括: - 使用 `requests-html` 支持 JavaScript 渲染。 - 添加请求头和 Cookie 模拟浏览器行为。 - 使用 `Selenium` 模拟浏览器操作。 - 分析 API 接口直接获取数据。 根据实际需求选择合适的方法,能够在不同场景下有效解决此问题。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值