Use camera stub when the vendor tree isn't present
Change-Id: Icb6fbd1350d492975cd3fd8803fac4639cdde69b
diff --git a/BoardConfig.mk b/BoardConfig.mk
index c53e286..26dfa2d 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -1,3 +1,37 @@
+# Copyright (C) 2010 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.
+
+#
+# This file sets variables that control the way modules are built
+# thorughout the system. It should not be used to conditionally
+# disable makefiles (the proper mechanism to control what gets
+# included in a build is to use PRODUCT_PACKAGES in a product
+# definition file).
+#
+
+# WARNING: This line must come *before* including the proprietary
+# variant, so that it gets overwritten by the parent (which goes
+# against the traditional rules of inheritance).
+# The proprietary variant sets USE_CAMERA_STUB := false, this way
+# we use the camera stub when the vendor tree isn't present, and
+# the true camera library when the vendor tree is available
+USE_CAMERA_STUB := true
+
+# inherit from the proprietary version
+# needed for BP-flashing updater extensions
+-include vendor/moto/stingray/BoardConfigVendor.mk
+
TARGET_BOARD_PLATFORM := tegra
TARGET_CPU_ABI := armeabi-v7a
@@ -36,7 +70,3 @@
-include vendor/nvidia/proprietary_src/build/definitions.mk
TARGET_RECOVERY_UI_LIB := librecovery_ui_stingray
-
-# needed for BP-flashing updater extensions
--include vendor/moto/stingray/BoardConfigVendor.mk
-