Everything is mirrored on omapzoom.org. Some of the code is also mirrored on github.
Contacts is here for example.
Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android. Some of the projects (such as Kernel) have been removed and it now only points you to clonable git repositories.
To get all the code locally, you can use the repo helper program, or you can just clone individual repositories.
And others:
- Downloading the Source Tree
Everything is mirrored on omapzoom.org. Some of the code is also mirrored on github.
Contacts is here for example.
Since December 2019, you can use the new official public code search tool for AOSP: cs.android.com. There's also the Android official source browser (based on Gitiles) has a web view of many of the different parts that make up android. Some of the projects (such as Kernel) have been removed and it now only points you to clonable git repositories.
To get all the code locally, you can use the repo helper program, or you can just clone individual repositories.
And others:
- Downloading the Source Tree
2020: The official AOSP code search https://cs.android.com/
You can view the source code through http://developer.android.com, when you're reading the API there will be a link to the matching source code on GitHub, you just need to add the Android SDK Reference Search Plugin on Chrome.
I blogged about it here:
http://blog.blundellapps.com/add-source-code-links-to-android-apis/

html - How do I view source code in an Android web browser? - Android Enthusiasts Stack Exchange
open source - Offline code browser for Android - Software Recommendations Stack Exchange
Which is the best open source code editor for an Android OS mobile phone?
Read Android Source Code Online, Support Android 16.0
Videos
You can use Javascript's alert method to return the source code, type this in the address bar:
javascript: alert(document.getElementsByTagName('html')[0].innerHTML);
In Firefox or Chrome on Android it's possible to view source by prefixing the URL in the address bar with "view-source:", i.e. "view-source:http://google.com".
I want to try coding on my phone.
It's in the Git repository:
https://android.googlesource.com/platform/packages/apps/Browser
https://android.googlesource.com/platform/external/webkit/+/android-3.2.4_r1/WebCore/xml/XMLHttpRequest.h
Edit:
The applications are now mirrored on github. You can find the browser here: https://github.com/android/platform_packages_apps_browser.git
Or try GrepCode: You can even throw a stack trace at it and it shows all relevant java files in all platform versions.
1. https://cs.android.com/
Google official.
Advantages: Fast speed, supports the latest code, and can view historical modification records.
Disadvantage: It is not very convenient to read the specified version.
2. http://androidxref.com/
Advantages: Easy to use, can specify branches.
Disadvantage: Only supports up to 9.0
3. http://xrefandroid.com/
Advantages: Same as AndroidXref, but supports up to 15.0
Disadvantage: I think this is the best one, the only downside is that it doesn't support Android Master branch.