The ongoing legal battle between Oracle and Google over Android has potentially revealed just how much Google has made from their mobile operating system: $31 billion in revenue, and $22 billion in profit.

The financial figures relating to Android were revealed by a lawyer for Oracle during court proceedings last week. Google said that the financial figures are "extremely sensitive information" that were meant for "attorney's eyes only", and asked the judge to redact portions of the transcript as "public disclosure could have significant negative effects on Google's business."

The court records were eventually removed, but not before Bloomberg nabbed the confidential information. The transcript did not reveal exactly how Google made $31 billion from Android, although it's widely known the company makes money from ads shown on the platform, as well as from purchases through the Play Store.

Oracle also revealed that Google paid Apple $1 billion in 2014 to be the default search engine on their iOS devices. This deal between the two tech giants has since been revised into a revenue sharing agreement, presumably from ads that are shown on iOS devices.

The lawsuit between the two companies began in 2010 when Oracle alleged that Google used a modified version of Java in Android without paying the appropriate compensation. A jury initially ruled in Google's favor, but that was later overturned through several appeals. Google has since exhausted all available appeals, and the companies are now arguing over damages.