Convert android.car to Soong.

In order to mirgrate Car java docs to Soong, we have to convert android.car
first. Synced with people from Car team, the original owner for the
flag:(TARGET_USES_CAR_FUTURE_FEATURES) have changed team. It seems that
currently this flag was set to true by default. So removed this flag,
and always use the future sources as Android.bp doesn't support
if-condition.

Submit this CL first before we make any changes on droiddoc in case we
break too much post-submit targets.

Test: no bat_land-userdebug Product in AOSP
Bug: b/70351683
Change-Id: I1135a84b1fd0e684c85a491c3811dd7e62bae721
Merged-In: I1135a84b1fd0e684c85a491c3811dd7e62bae721
diff --git a/car-lib/Android.bp b/car-lib/Android.bp
new file mode 100644
index 0000000..2ed9299
--- /dev/null
+++ b/car-lib/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2018 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+java_library {
+    name: "android.car",
+    srcs: [
+        "src/**/*.java",
+        "src_feature_future/**/*.java",
+        "src/**/I*.aidl",
+    ],
+    aidl: {
+        include_dirs: [
+            "system/bt/binder",
+        ],
+    },
+    product_variables: {
+        pdk: {
+            enabled: false,
+        },
+    },
+    installable: true,
+}
diff --git a/car-lib/Android.mk b/car-lib/Android.mk
index 53be4a7..4873ab9 100644
--- a/car-lib/Android.mk
+++ b/car-lib/Android.mk
@@ -21,40 +21,19 @@
 
 include $(CLEAR_VARS)
 
-LOCAL_MODULE := android.car
-LOCAL_MODULE_TAGS := optional
-
-ifneq ($(TARGET_USES_CAR_FUTURE_FEATURES),true)
-#TODO need a tool to generate proguard rule to drop all items under @FutureFeature
-#LOCAL_PROGUARD_ENABLED := custom
-#LOCAL_PROGUARD_FLAG_FILES := proguard_drop_future.flags
-endif
-
 car_lib_sources := $(call all-java-files-under, src)
-ifeq ($(TARGET_USES_CAR_FUTURE_FEATURES),true)
 car_lib_sources += $(call all-java-files-under, src_feature_future)
-else
-car_lib_sources += $(call all-java-files-under, src_feature_current)
-endif
 car_lib_sources += $(call all-Iaidl-files-under, src)
-LOCAL_AIDL_INCLUDES += system/bt/binder
-
-LOCAL_SRC_FILES := $(car_lib_sources)
-
-ifeq ($(EMMA_INSTRUMENT_FRAMEWORK),true)
-LOCAL_EMMA_INSTRUMENT := true
-endif
-
-include $(BUILD_JAVA_LIBRARY)
 
 ifeq ($(BOARD_IS_AUTOMOTIVE), true)
-$(call dist-for-goals,dist_files,$(LOCAL_BUILT_MODULE):$(LOCAL_MODULE).jar)
+full_classes_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,android.car,,COMMON)/classes.jar
+$(call dist-for-goals,dist_files,$(full_classes_jar):android.car.jar)
 endif
 
 # API Check
 # ---------------------------------------------
-car_module := $(LOCAL_MODULE)
-car_module_src_files := $(LOCAL_SRC_FILES)
+car_module := android.car
+car_module_src_files := $(car_lib_sources)
 car_module_api_dir := $(LOCAL_PATH)/api
 car_module_java_libraries := framework
 car_module_include_systemapi := true
diff --git a/car-lib/src_feature_current/com/android/car/internal/FeatureConfiguration.java b/car-lib/src_feature_current/com/android/car/internal/FeatureConfiguration.java
deleted file mode 100644
index 55da870..0000000
--- a/car-lib/src_feature_current/com/android/car/internal/FeatureConfiguration.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.car.internal;
-
-/**
- * Class to hold static boolean flag for enabling / disabling features.
- *
- * @hide
- */
-public class FeatureConfiguration {
-    /** Disable future feature by default. */
-    public static final boolean DEFAULT = false;
-    /** product configuration in CarInfoManager */
-    public static final boolean ENABLE_PRODUCT_CONFIGURATION_INFO = DEFAULT;
-    public static final boolean ENABLE_VEHICLE_MAP_SERVICE = DEFAULT;
-}