While testifying in the Samsung vs Apple case on Tuesday, it was revealed that Google has agreed to help Samsung defend itself against Apple in its current patent-infringement case. According to a report from Re/Code, citing deposition testimony from Google lawyer James Maccoun, Google has also agreed to partially or fully indemnify Samsung for any loses it may suffer on its claims.

Apple is suing Samsung for infringement on five patents for upwards of $2 billion. Samsung, of course, claims that its products do not infringe on any of Apple’s patents, nor are any of Apple’s patents even valid in the first place. Samsung also says that the $2 billion sum is absurd and that any damages should be significantly less than that.

Most of the patents Apple is suing over do relate to software features initially created by Google, which is the reasoning behind Google’s agreement to defend Samsung and compensate it for any damages. Patent law allows lawsuits to be filed over the end products that contain infringing code. Samsung also presents a larger target for Apple in terms of damages as it profits off of products infringing on patents, whereas Google simply gives Android away to free.

Google is also obligated to defend Samsung as part of the “Mobile Application Distribution Agreement” that Samsung signed, agreeing to distribute various Google services on its devices, some of which Apple claims infringe on its patents.

FTC: We use income earning auto affiliate links. More.

Check out 9to5Mac on YouTube for more Apple news: