android:Thread.interrupt()

本文介绍如何在Java线程中使用isInterrupted方法来判断并控制线程退出,包括在while循环中的应用和捕获InterruptedException的退出方式。

使用前提:

  1. thread中要进行while操作时。

  2. 需要控制thread退出。


使用方法:

  1. this.isInterrupted() 判断退出。接收到 mMyThread1.interrupt();则退出。

    private class MyThread1 extends Thread {
        @Override
        public void run() {
                while (!this.isInterrupted()) {
                    // do our things
                }
        }
    }
    
  2. catch InterruptedException 退出, 同样接收到 mMyThread1.interrupt();则退出

    private class MyThread2 extends Thread {
        @Override
        public void run() {
            while (true) {
                // do our things
                try {
                    Thread.sleep(1000);
                }catch (InterruptedException e) {
                    e.printStackTrace();
                    break;
                }
            }
        }
    }
    

转载自:http://blog.youkuaiyun.com/wuyuxing24/article/details/45342049

09-22 10:52:32.825 1000 1732 15380 E subsystem_ramdump: write successful for ramdump fd for /data/vendor/bsplog/wlan/ssr_dump/2025-09-22-10:52:27/ramdump_wpss_2025-09-22_10-52-27.elf 09-22 10:52:32.825 1000 2494 3538 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.825 1000 1732 15380 E subsystem_ramdump: read /proc/last_mcrash :adrastea/wpss.mdt: cmnos_thread.c:4003:Asserted in wal_power_debug.c:wal_power_debug_trigger_crash_c 09-22 10:52:32.826 1000 2494 5294 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.826 10182 14289 15285 D JavaheapMonitor: Java heap used=2M max=256M, proc: com.google.android.syncadapters.calendar 09-22 10:52:32.826 10182 14289 15285 V JavaheapMonitor: Check java heap usage finished! Next check delay: 300000 09-22 10:52:32.826 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.827 1000 2494 5717 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.827 6102 8908 8908 E SysUtils: cancelNotificationById: 1,showRedDot:-1 09-22 10:52:32.827 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.828 6102 8908 8908 E SysUtils: cancelNotificationById: 9,showRedDot:-1 09-22 10:52:32.828 1000 2494 4130 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.828 10182 14289 14289 W BpBinder: PerfMonitor binderTransact: time=412ms interface=android.app.job.IJobCallback code=4 09-22 10:52:32.829 1000 2494 5690 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.829 1000 2494 4399 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.829 1000 2494 3181 E AlarmManager: not align this alarm: Alarm{fb905b6 type 2 origWhen 428776 whenElapsed 428776 android}, reason=0 09-22 10:52:32.830 1000 2494 5432 W system_server: PerfMonitor async binderTransact : time=293ms interface=android.security.rkp.IRemoteProvisioning code=1 09-22 10:52:32.830 1000 2494 3181 I WifiScanningService: Received a request to enable scanning, UID = 1000 09-22 10:52:32.830 1000 2494 3181 I WifiScanningService: scanner impls already exists 09-22 10:52:32.830 1000 2494 3181 E WifiScanningService: wifi driver loaded received while already loaded 09-22 10:52:32.830 1000 2494 5432 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.830 1000 2494 4399 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.830 10203 13984 15211 D JavaheapMonitor: Java heap used=4M max=256M, proc: com.google.android.apps.tachyon 09-22 10:52:32.831 10203 13984 15211 V JavaheapMonitor: Check java heap usage finished! Next check delay: 300000 09-22 10:52:32.831 6102 8908 8908 E SysUtils: cancelNotificationById: 2,showRedDot:-1 09-22 10:52:32.832 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.832 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.832 10163 11576 11645 E Finsky : [61] Error when retrieving FCM instance id 09-22 10:52:32.832 1000 2494 2844 D BatteryStatsManagerStub: noteWifiScanStartedLocked 1010 09-22 10:52:32.832 1000 2494 2844 E PowerInsightPolicy: sPowerInsightService null! 09-22 10:52:32.832 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.833 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.833 1000 2494 5245 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.833 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.834 1000 2494 4399 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.834 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.835 1000 2494 4130 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.835 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.836 1000 2494 5317 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.836 6102 8908 8908 E SysUtils: cancelNotificationById: 12,showRedDot:-1 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: Work [ id=68f77028-5abb-48a1-a63b-b75a088c3834, tags={ com.google.android.libraries.notifications.platform.entrypoints.job.GnpWorker,GNP_SDK_JOB } ] was cancelled 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: androidx.work.impl.WorkerStoppedException 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at androidx.work.impl.Processor.interrupt(Processor.java:6) 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at androidx.work.impl.utils.StopWorkRunnable.run(StopWorkRunnable.kt:101) 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:3) 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156) 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651) 09-22 10:52:32.836 10182 14289 14364 I WM-WorkerWrapper: at java.lang.Thread.run(Thread.java:1119) 09-22 10:52:32.836 root 1280 15479 I resolv : GetAddrInfoHandler::run: {0 786432 0 983040 10161 0} 09-22 10:52:32.837 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.837 1000 2494 4130 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.838 1000 2494 5245 I SmartPower: com.indus.appstore/10238(14241): idle->background(3915ms) R(service create com.indus.appstore/com.google.firebase.sessions.SessionLifecycleService) adj=905. 09-22 10:52:32.838 1000 2494 5245 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.838 6102 8908 8908 E SysUtils: cancelNotificationById: 11,showRedDot:-1 09-22 10:52:32.838 10182 14289 14364 D WM-WorkerWrapper: Status for 68f77028-5abb-48a1-a63b-b75a088c3834 is RUNNING; not doing any work and rescheduling for later execution 09-22 10:52:32.839 1000 2494 5245 D CompatChangeReporter: Compat change id reported: 319471980; UID 10238; state: ENABLED 09-22 10:52:32.839 10286 11721 11761 D WM-GreedyScheduler: Cancelling work ID 247f0c8c-2d5a-493c-81e1-da8554a0dc37 09-22 10:52:32.839 1000 2494 5245 D ActivityManager: Logging bindService for com.indus.appstore, stopped=false, firstLaunch=false 09-22 10:52:32.839 1000 2494 5710 I ActivityManager: unbindService com.android.server.am.ActiveServices@778b2f3 conn=android.os.BinderProxy@d3c798a callingPid=14241 09-22 10:52:32.839 1000 2494 5710 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.840 1000 2494 4130 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.840 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.842 6102 8908 8908 E SysUtils: cancelNotificationById: 3,showRedDot:-1 09-22 10:52:32.842 6102 8908 8908 E SysUtils: cancelSettingsSuperscript: 09-22 10:52:32.842 10161 4593 13954 W hsbr : [{0}] Failed to resolve name. status={1} 09-22 10:52:32.845 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.845 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.845 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.845 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.846 1000 2494 4399 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.846 1000 12988 12988 D MiuiWifiEntryPreference: updateConnectAnimation* state: DISCONNECTED, animationHelperState: 0, hashCode: 98302149 09-22 10:52:32.847 1000 12988 12988 D SettingsFeatures: isFoldDevice: false 09-22 10:52:32.847 10161 4593 13954 W hsbr : [{0}] Failed to resolve name. status={1} 09-22 10:52:32.847 1000 2494 5432 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.848 1000 2494 4399 I WifiService: getCurrentNetwork uid=1000 09-22 10:52:32.849 1000 2494 2603 D UidStateManager: uid state changed, uid=10240 09-22 10:52:32.849 1000 2494 5280 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.850 1000 2494 5679 I ActivityManager: unbindService com.android.server.am.ActiveServices@778b2f3 conn=android.os.BinderProxy@97a2f58 callingPid=14289 09-22 10:52:32.851 1000 2494 5690 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.851 1000 2494 5679 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.851 1000 2494 2603 D UidStateManager: uid state changed, uid=10238 09-22 10:52:32.851 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.852 1000 2494 3160 I MiuiNetworkPolicy: updateUidState uid = 10240, uidState = 10 09-22 10:52:32.853 10286 11721 11761 W JobInfo : Requested important-while-foreground flag for job18 is ignored and takes no effect 09-22 10:52:32.853 10286 11721 11761 D WM-SystemJobScheduler: Scheduling work ID 247f0c8c-2d5a-493c-81e1-da8554a0dc37Job ID 18 09-22 10:52:32.854 1000 2494 3160 I MiuiNetworkPolicy: updateUidState uid = 10238, uidState = 10 09-22 10:52:32.854 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.855 1000 12988 12988 D MiuiNearbyApPreference: isSlavePage:false 09-22 10:52:32.855 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.855 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.855 10203 13984 14375 W JobInfo : Requested important-while-foreground flag for job35 is ignored and takes no effect 09-22 10:52:32.856 1000 2494 5679 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.856 10182 14289 14289 D WM-Processor: Processor 68f77028-5abb-48a1-a63b-b75a088c3834 executed; reschedule = true 09-22 10:52:32.857 1000 2494 5280 I WifiService: getVerboseLoggingLevel uid=1000 09-22 10:52:32.858 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.859 1000 2494 2799 D BroadcastQueue: Logging broadcast for com.xiaomi.hypercomm, stopped=false, firstLaunch=false 09-22 10:52:32.859 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.859 1000 2494 2799 D BroadcastQueue: Logging broadcast for org.codeaurora.ims, stopped=false, firstLaunch=false 09-22 10:52:32.860 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.860 1000 2494 2799 D BroadcastQueue: Logging broadcast for com.android.phone, stopped=false, firstLaunch=false 09-22 10:52:32.859 radio 3669 3669 I HyperComm_BroadcastReceiver: receive action: android.intent.action.BATTERY_CHANGED 09-22 10:52:32.860 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.860 radio 3669 3669 D HyperComm_BroadcastReceiver: handleBatteryLevelChanged, batteryLevel = 25 09-22 10:52:32.860 10263 3661 3661 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0 09-22 10:52:32.861 10263 3661 3661 D QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 1 09-22 10:52:32.862 1000 2494 2799 D BroadcastQueue: Logging broadcast for com.android.phone, stopped=false, firstLaunch=false 09-22 10:52:32.862 1000 2494 2799 D BroadcastQueue: Logging broadcast for com.qualcomm.qti.telephonyservice, stopped=false, firstLaunch=false 09-22 10:52:32.864 10179 3625 3625 D DeviceStatisticsService: onReceive: action= android.intent.action.BATTERY_CHANGED 09-22 10:52:32.865 1000 2494 5317 I ActivityManager: unbindService com.android.server.am.ActiveServices@778b2f3 conn=android.os.BinderProxy@def84ea callingPid=14011 09-22 10:52:32.865 1000 2494 5317 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.865 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.865 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.866 1000 2494 5317 I HidlServiceManagement: Trying to get transport of vendor.qti.hardware.servicetracker@1.0::IServicetracker/default without hwservicemanager 09-22 10:52:32.866 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.866 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.866 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.866 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode 09-22 10:52:32.866 1000 12988 12988 V AutofillManager: notifyViewVisibilityChanged(): ignoring on augmented only mode
09-23
12-16 15:53:13.561657 1327 7721 D AudioALSAHardwareResourceManager: +startOutputDevice(), new_devices = 0x2, mOutputDevices = 0x0, mStartOutputDevicesCount = 0 SampleRate = 48000 12-16 15:53:13.561691 1327 7721 D AudioALSAHardwareResourceManager: OpenSpeakerPath(), defined MTK_GENERIC_HAL 12-16 15:53:13.561762 1327 7721 D AudioSmartPaController: +dspOnBoardSpeakerOn(), SampleRate: 48000, MD_type: 0, isI2sInEchoRefEn: 0 12-16 15:53:13.561816 1327 7721 D AudioALSAHardwareResourceManager: notifyOutputDeviceStatusChange(), device = 2, status = 0, sampleRate = 48000, mOpenSpeakerPathCount = 1 12-16 15:53:13.561857 1327 7721 D AudioALSAStreamManager: speakerStatusChangeCb(), status = 0, sampleRate = 48000 12-16 15:53:13.561898 1327 7721 D AudioALSAVoiceWakeUpController: setSpeakerSampleRate(), sampleRate = 48000 12-16 15:53:13.561928 1327 7721 D AudioALSAVoiceWakeUpController: updateSpeakerPlaybackStatus(), isSpeakerPlaying = 1 12-16 15:53:13.561953 1327 7721 D AudioALSAVoiceWakeUpController: +setBargeInEnable(), enable = 1 12-16 15:53:13.561989 1327 7721 D AudioALSAVoiceWakeUpController: setBargeInEnable(), format = 0, channels = 2, rate = 48000, period_size = 480, period_count = 4 12-16 15:53:13.562121 1327 7721 D AudioALSAVoiceWakeUpController: setBargeInEnable(), Interconn VOW_BARGE_IN_ECHO_DSP_SMARTPA 12-16 15:53:13.562288 1327 7721 D AudioALSADeviceConfigManager: ApplyDeviceTurnonSequenceByName() DeviceName = VOW_BARGE_IN_ECHO_DSP_SMARTPA descriptor->DeviceStatusCounte = 0, Ctlsize=8 12-16 15:53:13.564575 1327 7721 D AudioALSADeviceParser: compare pcm success = 34, stringpair = Hostless_SRC_Bargein 12-16 15:53:13.568337 1327 7721 D AudioALSAVoiceWakeUpController: -setBargeInEnable(),mPcmHostlessUl = 0xb400007668c77b70, pcmHostlessUlRet = 0, mPcmHostlessDl = 0xb400007668c7b950, pcmHostlessDlRet = 0 12-16 15:53:13.568386 1327 7721 D AudioALSADeviceParser: compare pcm success = 12, stringpair = Capture_2 12-16 15:53:13.570735 1327 7721 D AudioALSAVoiceWakeUpController: setBargeInEnable(), mBargeInPcm = 0xb400007668c76cd0, pcmUlRet = 0 12-16 15:53:13.580806 1327 7721 D AudioALSAVoiceWakeUpController: setBargeInEnable(), VOW_BARGEIN_ON set, irq = 15, ret = 0 12-16 15:53:13.582197 1327 7721 D AudioALSAVoiceWakeUpController: -setBargeInEnable(), mBargeInPcm = 0xb400007668c76cd0, mBargeInEnable = 1 12-16 15:53:13.582287 1327 7721 D AudioALSAPlaybackHandlerNormal: -open() 12-16 15:53:13.582433 1327 7721 D AudioALSAPlaybackHandlerNormal: setScreenState(), flag = 0x2, mode = 1, sample_rate(source/target) = 48000/48000, buffer_size(source/target) = 8192/16384, device_support_hifi = 0 12-16 15:53:13.582492 1327 7721 D AudioALSAPlaybackHandlerNormal: setScreenState(), flag = 2, rate = 1024, mInterrupt = 0.021333, mode = 1, sample_rate(target) = 48000, buffer_size = 8192, channel = 2, format = 4, reduceInterruptSize = 1024 12-16 15:53:13.584362 1327 7721 E AudioALSAPlaybackHandlerBase: -getHardwareBufferInfo(), pcm_get_htimestamp fail, ret = -1, pcm_get_error = flag = 0x2 12-16 15:53:13.584958 1404 1997 I AF::Track: processMuteEvent_l(160): processed mute state for port ID 219 from 0 to 16 12-16 15:53:13.585118 1404 1997 D AudioMixer: setParameter(TRACK(160), MAIN_BUFFER, 0xb4000070e071f220) 12-16 15:53:13.585130 1404 1997 D AudioMixer: setParameter(TRACK(160), MAIN_BUFFER_TYPE, 1) 12-16 15:53:13.585500 1949 2553 I AS.PlaybackActivityMon: dispatchPlayback size:20 to client size:4 12-16 15:53:13.588076 2784 26835 I MobileInputLog: onDataActivity: subId=2 direction=2 12-16 15:53:13.589617 2784 2784 V TrBaseVerboseMobileViewLogger: Binder[subId=2, viewId=708be1a] received new data activity icon: resId=2131234331 12-16 15:53:13.589877 11828 11828 D AI_ELLA_: onPlaybackConfigChanged in main thread 12-16 15:53:13.594941 1404 1997 D AudioFlinger_Threads: mixer(0xb4000072f2b8e7b0) throttle begin: ret(8192) deltaMs(2) requires sleep 8 ms 12-16 15:53:13.608661 1404 1997 D AudioFlinger_Threads: mixer(0xb4000072f2b8e7b0) throttle end: throttle time(8) 12-16 15:53:13.633408 1337 1883 I hwcomposer: [DRMDEV] sid:0x10000 job:73899 ovlp:0 pf_idx:72955 hrt_idx:19394 mode:2 12-16 15:53:13.654064 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.3779502,-3.3330002,-8.97105), calc result mOrientation = -1 12-16 15:53:13.773507 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.4019501,-3.3349502,-8.985001), calc result mOrientation = -1 12-16 15:53:13.773685 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.4160502,-3.357,-8.937), calc result mOrientation = -1 12-16 15:53:13.783580 1661 25608 D CCodecBufferChannel: [c2.android.vorbis.decoder#152] input EOS 12-16 15:53:13.785637 1661 25608 D CCodecBufferChannel: [c2.android.vorbis.decoder#152] buffers after EOS ignored (0 us) 12-16 15:53:13.786621 1661 25606 D AudioTrack: stop(219): 0xb4000078e9813040, prior state:STATE_ACTIVE 12-16 15:53:13.788053 1404 1512 D TranFlinger: checkIsFuncEnabled isSupport: 1 funcKey:FUNCTION_FADEOUTIN 12-16 15:53:13.789335 1404 1512 D TranFlinger: checkIsFuncSupportPkg isSupport: 0 funcKey:FUNCTION_FADEOUTIN pkg:/system/bin/mediaserver 12-16 15:53:13.790017 1661 25606 D AudioTrackShared: this(0xb400007769813b90), mCblk(0x799a046000), front(10348), mIsOut 1, interrupt() FUTEX_WAKE 12-16 15:53:13.791107 1661 25606 D AudioTrack: stop(219): 0xb4000078e9813040 stop done 12-16 15:53:13.881673 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.4019501,-3.3330002,-8.982), calc result mOrientation = -1 12-16 15:53:13.981005 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.4019501,-3.4000502,-8.96595), calc result mOrientation = -1 12-16 15:53:13.981256 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.3779502,-3.3349502,-8.962951), calc result mOrientation = -1 12-16 15:53:14.081410 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.388,-3.3379502,-8.985001), calc result mOrientation = -1 12-16 15:53:14.090291 1949 3435 D TranNetworkManagementServiceMultiLinkImpl: linkTurb destorySocketByUid uid :10083 12-16 15:53:14.134317 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.38995,-3.3349502,-8.953951), calc result mOrientation = -1 12-16 15:53:14.134505 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.36805,-3.3229501,-8.99205), calc result mOrientation = -1 12-16 15:53:14.250147 1404 1997 D MtkAudioResamplerDyn: MtkAudioResamplerDyn InBuffer::reset!! 12-16 15:53:14.253150 4005 4005 W OrientationEventListener: Original (X,Y,Z) = (2.35395,-3.321,-8.961), calc result mOrientation = -1 12-16 15:53:14.273798 1327 10847 D AudioALSAStreamOut: +setParameters(): flag 2, MixerThreadSleep= 12-16 15:53:14.274127 1327 10847 W AudioALSAStreamOut: setParameters(), still have param.size() = 1, remain param = "MixerThreadSleep=" 12-16 15:53:14.286283 1398 1398 D Vibrator: Vibrator off 12-16 15:53:14.287317 1398 1398 D Vibrator: tran find single lra 12-16 15:53:14.294373 1398 1398 D Vibrator: Vibrator using LED trigger 12-16 15:53:14.297384 1327 10847 D AudioALSAStreamOut: +setParameters(): flag 2, MixerThreadSleep= 12-16 15:53:14.297684 1327 10847 W AudioALSAStreamOut: setParameters(), still have param.size() = 1, remain param = "MixerThreadSleep=" 12-16 15:53:14.299789 1661 25599 D NuPlayer: reached audio EOS 12-16 15:53:14.300626 1661 25606 D AudioTrack: pause(219): 0xb4000078e9813040, prior state:STATE_STOPPED 12-16 15:53:14.301450 1404 1512 D TranFlinger: checkIsFuncEnabled isSupport: 1 funcKey:FUNCTION_ADDPERFORMANCE 12-16 15:53:14.303097 1661 25606 D AudioSystem: +setParameters(): remove_clientTid=25606 12-16 15:53:14.304599 1404 1512 I AudioFlinger: setParameters: filtered keyvalue remove_clientTid=25606 12-16 15:53:14.305106 1404 1512 I AudioFlinger: +mAudioHwDevs(primary)->setParameters(): remove_clientTid=25606 12-16 15:53:14.306087 1327 10847 D AudioALSAHardware: +setParameters(): remove_clientTid=25606 12-16 15:53:14.306366 1327 10847 D AudioALSAHardware: -setParameters(): remove_clientTid=25606 12-16 15:53:14.306613 1404 1512 I AudioFlinger: -mAudioHwDevs(primary)->setParameters(): remove_clientTid=25606 12-16 15:53:14.306664 1404 1512 I AudioFlinger: +mAudioHwDevs(bluetooth)->setParameters(): remove_clientTid=25606 12-16 15:53:14.307244 1404 1512 I AudioFlinger: -mAudioHwDevs(bluetooth)->setParameters(): remove_clientTid=25606 12-16 15:53:14.307596 1404 1512 I AudioFlinger: +mAudioHwDevs(usb)->setParameters(): remove_clientTid=25606 12-16 15:53:14.308595 1404 1512 I AudioFlinger: -mAudioHwDevs(usb)->setParameters(): remove_clientTid=25606 12-16 15:53:14.308950 1404 1512 I AudioFlinger: +mAudioHwDevs(r_submix)->setParameters(): remove_clientTid=25606 12-16 15:53:14.309828 1404 1512 I AudioFlinger: -mAudioHwDevs(r_submix)->setParameters(): remove_clientTid=25606 12-16 15:53:14.310126 1404 1512 E TranFlinger: setPareters is is 0 12-16 15:53:14.312405 1949 2314 I MediaFocusControl: abandonAudioFocus() from uid/pid 10152/2784 clientId=android.media.AudioManager@72ef850 12-16 15:53:14.313155 1949 4624 I AS.PlaybackActivityMon: dispatchPlayback size:20 to client size:4 12-16 15:53:14.317322 2784 25597 V MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false 12-16 15:53:14.317379 2784 25597 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null 12-16 15:53:14.317403 2784 25597 D MediaPlayer: _release native called 12-16 15:53:14.317952 1949 2314 I AS.PlaybackActivityMon: dispatchPlayback size:19 to client size:4 12-16 15:53:14.318525 1404 1997 D TranFlinger_Threads: removeTrackCount: remove lock trackId 160 12-16 15:53:14.318564 1404 1997 D TranFlinger_Threads: removeTrackCount: mNonMusicActiveTrack remove: 1 12-16 15:53:14.318578 1404 1997 D TranFlinger_Threads: removeTrackCount: unlock 12-16 15:53:14.318785 1404 1652 D AudioPolicyManagerCustomImpl: hifiAudio_stopOutputSamplerate() -output = 13, porId = 219, samplerate = 44100 HifiState = 1, stream 5, session 1169 分析这段日志是什么意思
最新发布
12-19
01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:102): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.234861 24960 24960 W crash_dump64: failed to attach to thread 579: Permission denied 01-01 13:29:26.235092 24960 24960 E crash_dump64: failed to interrupt 579 to detach: No such process 01-01 13:29:26.235105 24960 24960 W crash_dump64: failed to ptrace interrupt thread 579: No such process 01-01 13:29:26.235138 24960 24960 W crash_dump64: failed to attach to thread 582: Permission denied 01-01 13:29:26.235172 24960 24960 E crash_dump64: failed to interrupt 582 to detach: No such process 01-01 13:29:26.235181 24960 24960 W crash_dump64: failed to ptrace interrupt thread 582: No such process 01-01 13:29:26.235195 24960 24960 W crash_dump64: failed to attach to thread 583: Permission denied 01-01 13:29:26.235222 24960 24960 E crash_dump64: failed to interrupt 583 to detach: No such process 01-01 13:29:26.235230 24960 24960 W crash_dump64: failed to ptrace interrupt thread 583: No such process 01-01 13:29:26.235258 24960 24960 W crash_dump64: failed to attach to thread 585: Permission denied 01-01 13:29:26.235288 24960 24960 E crash_dump64: failed to interrupt 585 to detach: No such process 01-01 13:29:26.235295 24960 24960 W crash_dump64: failed to ptrace interrupt thread 585: No such process 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:103): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:104): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:105): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:106): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:107): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.231000 24960 24960 W crash_dump64: type=1400 audit(0.0:108): avc: denied { ptrace } for scontext=u:r:crash_dump:s0 tcontext=u:r:vold:s0 tclass=process permissive=0 01-01 13:29:26.235368 24960 24960 W crash_dump64: failed to ptrace interrupt thread 19494: No such process 01-01 13:29:26.235402 24960 24960 W crash_dump64: failed to attach to thread 21472: Permission denied 01-01 13:29:26.235433 24960 24960 E crash_dump64: failed to interrupt 21472 to detach: No such process 01-01 13:29:26.235440 24960 24960 W crash_dump64: failed to ptrace interrupt thread 21472: No such process 01-01 13:29:26.235480 24960 24960 F crash_dump64: crash_dump.cpp:671] failed to attach to thread 24955: Permission denied 01-01 13:29:26.235919 916 916 I tombstoned: received crash request for pid 24955 01-01 13:29:26.235992 916 916 E tombstoned: unexpected dump type: kDebuggerdAnyIntercept 01-01 13:29:26.236030 916 916 E tombstoned: failed to get crash output for type kDebuggerdAnyIntercept 01-01 13:29:26.236128 24960 24960 E libc : failed to read response to DumpRequest packet: No message of desired type 01-01 13:29:26.236143 24960 24960 E crash_dump64: failed to connected to tombstoned to report failure 01-01 13:29:26.241788 1923 4484 W OplusStorageManagerFeature: vold died; reconnecting 帮我分析一下这段日志
11-06
05-22 12:02:49.607 1257 1781 F TimeCheck: TimeCheck timeout for IAudioFlinger::createEffect scheduled 12:02:40.698 on thread 22110 05-22 12:02:49.607 1257 1781 F TimeCheck: Timeout ms 5000.000000 elapsed steady ms 5000.956055 elapsed system ms 5000.964844 05-22 12:02:49.607 1257 1781 F TimeCheck: HAL pids [ 1230 ] 05-22 12:02:49.607 1257 1781 F TimeCheck: now 12:02:49.607 05-22 12:02:49.607 1257 1781 F TimeCheck: secondChanceCount 3 05-22 12:02:49.607 1257 1781 F TimeCheck: analysis [ ] 05-22 12:02:49.607 1257 1781 F TimeCheck: timeout [ { IAudioFlinger::createEffect scheduled 12:02:40.698 deadline :43.698 tid 22110 } ] 05-22 12:02:49.607 1257 1781 F TimeCheck: pending [ ] 05-22 12:02:49.607 1257 1781 F TimeCheck: retired [ { IAudioPolicyService::isStreamActive scheduled 12:02:44.795 deadline :47.795 tid 24614 } { EffectHalHidl::getDescriptor scheduled 12:02:45.631 deadline tid 22110 } { EffectHalHidl::command scheduled 12:02:45.709 deadline tid 22110 } { EffectHalHidl::command scheduled 12:02:45.710 deadline tid 22110 } ] 05-22 12:02:49.607 1257 1781 F TimeCheck: timeout(22110) callstack [ 05-22 12:02:49.607 1257 1781 F TimeCheck: #00 pc 00000000000b5038 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8) (BuildId: da95cc11758f7f81ac5932e17c5ad227) 05-22 12:02:49.607 1257 1781 F TimeCheck: #01 pc 00000000000670ac /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: da95cc11758f7f81ac5932e17c5ad227) 05-22 12:02:49.607 1257 1781 F TimeCheck: #02 pc 000000000005f614 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+292) (BuildId: dbfa127e8e9a0f311d3c183c0e638d59) 05-22 12:02:49.607 1257 1781 F TimeCheck: #03 pc 00000000000601f8 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) (BuildId: dbfa127e8e9a0f311d3c183c0e638d59) 05-22 12:02:49.607 1257 1781 F TimeCheck: #04 pc 0000000000060e2c /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+732) (BuildId: dbfa127e8e9a0f311d3c183c0e638d59) 05-22 12:02:49.607 1257 1781 F TimeCheck: #05 pc 000000000006b198 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24) (BuildId: dbfa127e8e9a0f311d3c183c0e638d59) 05-22 12:02:49.607 1257 1781 F TimeCheck: #06 pc 00000000000144dc /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284) (BuildId: 6b47b266d73de886906895a4245c664e) 05-22 12:02:49.607 1257 1781 F TimeCheck: #07 pc 00000000000c9fd0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: da95cc11758f7f81ac5932e17c5ad227) 05-22 12:02:49.607 1257 1781 F TimeCheck: #08 pc 000000000005dd90 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: da95cc11758f7f81ac5932e17c5ad227) 05-22 12:02:49.607 1257 1781 F TimeCheck: ]
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值