public void MatrixScan(MatrixScan matrixScan, Frame didUpdate)
        {
            if (didUpdate.TrackedCodes.Count == 0)
            {
                return;
            }

            IndicatorState indicatorState = CalculateIndicatorState(didUpdate.TrackedCodes);

            if (lastIndicatorState != indicatorState)
            {
                bubbles.Clear();
                if (indicatorState != IndicatorState.HIGHLIGHT_ONLY)
                {
                    foreach (var it in didUpdate.TrackedCodes)
                    {
                        var bubble = bubbleFactory.CreateBubble(indicatorState, it.Value);
                        bubbles.AddOrUpdate(
                            it.Key.LongValue(),
                            bubble,
                            (arg1, arg2) => bubble);

                        viewBasedMatrixScanOverlay.SetOffsetForCode(GetOffsetForCode(it.Value, it.Key.LongValue()), it.Key.LongValue());
                        viewBasedMatrixScanOverlay.Post(() =>
                        {
                            if (bubbles.ContainsKey(it.Key.LongValue()))
                            {
                                viewBasedMatrixScanOverlay.SetViewForCode(GetViewForCode(it.Value, it.Key.LongValue()), it.Key.LongValue());
                            }
                        });
                    }
                }
            }
            lastIndicatorState = indicatorState;

            foreach (var id in didUpdate.AddedIdentifiers)
            {
                if (didUpdate.TrackedCodes.ContainsKey(id))
                {
                    var bubble = bubbleFactory.CreateBubble(indicatorState, didUpdate.TrackedCodes[id]);
                    bubbles.AddOrUpdate(
                        id.LongValue(),
                        bubble,
                        (arg1, arg2) => bubble);
                }
            }

            foreach (var id in didUpdate.RemovedIdentifiers)
            {
                ((IDictionary <long, BaseBubble>)bubbles).Remove(id.LongValue());
            }
        }