The prior art is also an Apple patent. The judge found that there was no "inventive step" between the prior patent and the new one. That doesn't mean Apple didn't "do its own thing", just that its incremental improvement was not worthy of a new patent.