Apple and HTC settle patent battle