internal void Start() { // For logcat arguments and more details check https://developer.android.com/studio/command-line/logcat m_Runtime.Update += OnUpdate; m_MessageProvider = m_Runtime.CreateMessageProvider(adb, Filter, MessagePriority, m_Device.SupportsFilteringByPid ? PackagePid : 0, LogPrintFormat, m_Device != null ? m_Device.Id : null, OnDataReceived); m_MessageProvider.Start(); Connected?.Invoke(Device); }
internal void Stop() { m_CachedLogLines.Clear(); m_BuildInfos.Clear(); m_Runtime.Update -= OnUpdate; if (m_MessageProvider != null && !m_MessageProvider.HasExited) { // NOTE: DONT CALL CLOSE, or ADB process will stay alive all the time m_MessageProvider.Kill(); } m_MessageProvider = null; }