add feature support
- Add optional and experimental feature infra.
- Feature is defined as a string name. All Car.*SERVICE used for Car*Manager
are features. Additional non-API features are defined in CarFeatures but
each API can define its own feature under its own name space.
- There can be subfeature with the format of "main_feature_name/sub_feature_name".
- Feature can be enabed / disabled using Car.[enable|disable]Feature() call but it will only take effect upon reboot.
- Added shell command to test enabling / disabling feature.
- Added experimental feature infra under separate package and static API.
Experimental feature is for development purpose and will not be included in
user build.
- Removed old feature related code which are not used anywhere.
- Kitchen sink test requires enabling the feature to work:
$adb root; adb shell dumpsys car_service enable-feature android.car.experimental.test_demo_experimental_feature_service; adb reboot
Bug: 144504820
Test: shell command, run added apitest: android.car.apitest.CarFeatureTest, run ExperimentalFeature in kitchensink
- Test through command line
$ adb root; adb shell cmd car_service disable-feature com.android.car.user.CarUserNoticeService; adb reboot
// user notice service should not show up
$ adb root; adb shell cmd car_service enable-feature com.android.car.user.CarUserNoticeService; adb reboot
// user notice service should show up
- Test experimental feature with kitchensink
$ adb root; adb shell cmd car_service enable-feature android.car.experimental.test_demo_experimental_feature_service; adb reboot
// Launch kitchensink experimental feature page and check the button works.
$ adb root; adb shell cmd car_service disable-feature android.car.experimental.test_demo_experimental_feature_service; adb reboot
// Launch kitchensink experimental feature page and check the button not working.
Change-Id: I75239193f7efab3a156dfe9f64370f4a5fd673a4
diff --git a/car_product/build/car.mk b/car_product/build/car.mk
index 8246d37..e192401 100644
--- a/car_product/build/car.mk
+++ b/car_product/build/car.mk
@@ -41,6 +41,8 @@
VmsSubscriberClientSample \
DirectRenderingCluster \
GarageModeTestApp \
+ ExperimentalCarService \
+
# SEPolicy for test apps / services
BOARD_SEPOLICY_DIRS += packages/services/Car/car_product/sepolicy/test