If this is your first time using Android Studio, it may ask you to install an SDK. Go ahead and do that.
It may ask if you want to generate the gradle wrapper files, select "Yes". Wait for it to finish indexing, and then you should see car-ui-lib and PaintBooth projects in the project pane on the left. Make sure your project view is set to "Android" mode, as opposed to the regular "Project" mode:
To launch paintbooth, start a car emulator or connect a device, make sure the PaintBooth module and "Virtual Device" is selected in your Android Studio toolbar, then click the green arrow:
If it launches a LeakCanary activity instead of PaintBooth, either exit LeakCanary and launch PaintBooth as normal through the car's launcher, or click on the PaintBooth module > Edit configurations > Change "Launch: Default Activity" to "Specified Activity", and enter com.android.car.ui.paintbooth.MainActivity
.
Once you've set up paintbooth as described above, just open one of the test classes in car-ui-lib > java > com.android.car.ui (androidTest) and click the green arrow next to one of the tests to run it:
The tests can also be run from the command line via atest CarUILibUnitTests
, but that's much slower than running them through Android Studio.
This library is developed in Gerrit and copied as source to Google3 using Copybara (go/copybara).
Source: /packages/apps/Car/libs/car-ui-lib Target: //google3/third_party/java/android_libs/android_car_chassis_lib
Here is the process for updating this library:
./update.sh review <cl>
(with being your Gerrit CL #) and test your changes./update.sh manual
submitTODO: Automate this process using CaaS (in progress)
If you're just updating the current state of car-ui-lib, and not testing a review that has yet to be submitted, the process can be simplified to:
/google/data/ro/teams/copybara/copybara /google/src/head/depot/google3/third_party/java_src/android_libs/car_chassis_lib/copy.bara.sky default