The relationship between Facebook and Google continues to improve, as the two Web titans recently collaborated to solve an issue with Google’s Android Gingerbread operating system that was preventing the social network from updating its applications for the platform.

TechCrunch reported that Facebook Director of Mobile Engineering Mike Shaver detailed the process during a whiteboard session on Android at Facebook headquarters in Menlo Park, Calif.

Shaver said during the session that Android’s virtual machine, Dalvik, which runs Android apps that are installed, had a limit of 3 million methods, which Facebook exceeded, meaning that the social network could not add any more features to its app.

The solution, according to Shaver, was a patch of about six lines of code, and TechCrunch reported that Shaver added during the session:

We were able to send the patch over to Google to get their opinion. They were very helpful. We’re a significant app to them, and they’re a significant platform for us.

We could look under the hood and see why we were hitting this limit — (it is) not common to be able to do this in the mobile operating system.

We went from Defcon 1 and sirens, where we could no longer develop Facebook for half the Android world, to people staying up to fix it, to being able to extend the platform a bit and work with Google on it.

UPDATED: Facebook Engineer David Reiss added more details in a note on the Facebook Engineering page:

Late last year, we completed a major rebuild of our Android app, which involved moving a lot of our code from JavaScript to Java, as well as using newer abstractions that encouraged large numbers of small methods (generally considered a good programming practice). Unfortunately, this caused the number of Java methods in our app to drastically increase.

For much more of the technical nitty-gritty, including the issues Facebook ran into with the Samsung Mobile USA Galaxy S II — “the most popular Gingerbread phone of all time” — please see Reiss’ note on the Facebook Engineering page.

Readers: Do you think Facebook and Google will continue to work closely with each other?