Contributing to Google AndroidX

Isaac
2 min readJul 11, 2024

--

The title is “Contributing to Google AndoridX”, but it was actually a simple task of deleting empty comments in the ViewModelStore code. However, I want to share the experience of contributing to Google open source.

One day, I was curious about how ViewModel works and was looking into its internal code. While doing so, I noticed an empty comments in the ViewModelStore, which I assumed was not intended. I thought Google would eventually remove these empty comments, but then I remembered seeing the AOSP(Android Open Source Project) and Gerrit pull requests occasionally, and I wondered if I could contribute directly.

So, I went to the Android code search website and found the problematic code in the ViewModelStore class. Initially, I planned to clone the entire project and create a branch to make my changes. However, I realized that the Andorid project was quite large. Then, I discovered an edit button on the Android code search website, which felt like editing code directly on Github. I easily removed the empty comments in the web environment and submitted my suggestions.

There is an ‘Edit Code’ button at the top right.

After a day or two, a Googler approved my pull request. I was thrilled because the reviewer was someone I had seen on the Android Youtube channel. Although I hoped my changes would be merged, Google’s process requires two Googlers to review and approve my the merge request. A few hours later, another Googler approved my code, and my merge request was merged into the main branch of Androidx.

https://android-review.googlesource.com/c/platform/frameworks/support/+/3161436

I learned that anyone can contribute to Android since it’s open source. Through this contribution, I felt proud knowing that my work would be used in billions of Android devices.

--

--