Know thy code ???.* What we wont know after this talk Code review secrets Know my code What we will learn from it ( Hopefully ) How to make better use of framework source How to make new components from the framework Framework
Android – Open Source Android has been available under a free software/open source license since October, 21 2008 Google published the entire source code (including network and telephony stacks) under an Apache License.
Android – Open Source Source available at source.android.com. Source is a bunch of git projects. Google built repo on top of git. Souce is ~3GB , needs ~10GB to build. Currently only builds on Linux and Mac
What code will we be seeing
Framework source in eclipse Source code from major release-specific branches can be downloaded like this: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=snapshot;h=refs/heads/froyo;sf=tgz You can get other versions by changing the branch name (froyo) in the link above (to donut, gingerbread, etc.) Links : https://bitly.com/bundles/rvyas/1
Framework source in eclipse Extract the android folder from <tarball>/core/java/ into android-sdk/platforms/<platform version>/sources/ Make sure the platform-version is the same as the android version of the tarball. Refresh project in eclipse To test press Alt + Shift + T to check if you can view the activity class Source : http://kmansoft.wordpress.com/2011/01/27/android-sources-for-debugging/
Alternate “cloud” source viewer Chrome extension : bit.ly/andsrcchrome Adds an 'ad' command to the Chrome Omnibox
Performance examples publicclassSQLiteDatabaseextendsSQLiteClosable Android implements locking in SQLiteDatabase - No point trying to hit the database from multiple threads - On the positive you don’t need to synchronize your requests.