Changing make hierarchy of mini.

bug: 8503391

Change-Id: I22f2048cec7f232010e00109ef82bed271602cb1
diff --git a/target/product/core.mk b/target/product/core.mk
index f5c0147..dcba51f 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -19,66 +19,18 @@
 # devices (including non-phones and non-tablets), modify
 # core_minimal.mk instead.
 
-PRODUCT_PROPERTY_OVERRIDES := \
-    ro.config.notification_sound=OnTheHunt.ogg \
-    ro.config.alarm_alert=Alarm_Classic.ogg
-
 PRODUCT_PACKAGES += \
     BasicDreams \
     Browser \
     Contacts \
-    ContactsProvider \
-    DefaultContainerService \
     DocumentsUI \
     ExternalStorageProvider \
-    Home \
     KeyChain \
     PicoTts \
     SharedStorageBackup \
-    TelephonyProvider \
-    UserDictionaryProvider \
-    VpnDialogs \
-    atrace \
-    libandroidfw \
-    libaudiopreprocessing \
-    libaudioutils \
-    libbcc \
-    libfilterpack_imageproc \
-    libgabi++ \
-    libkeystore \
-    libmdnssd \
-    libnfc_ndef \
-    libportable \
-    libpowermanager \
-    libspeexresampler \
-    libstagefright_chromium_http \
-    libstagefright_soft_aacdec \
-    libstagefright_soft_aacenc \
-    libstagefright_soft_amrdec \
-    libstagefright_soft_amrnbenc \
-    libstagefright_soft_amrwbenc \
-    libstagefright_soft_flacenc \
-    libstagefright_soft_g711dec \
-    libstagefright_soft_gsmdec \
-    libstagefright_soft_h264dec \
-    libstagefright_soft_h264enc \
-    libstagefright_soft_mp3dec \
-    libstagefright_soft_mpeg4dec \
-    libstagefright_soft_mpeg4enc \
-    libstagefright_soft_rawdec \
-    libstagefright_soft_vorbisdec \
-    libstagefright_soft_vpxdec \
-    libstagefright_soft_vpxenc \
-    libvariablespeed \
-    libwebrtc_audio_preprocessing \
-    mdnsd \
-    mms-common \
-    requestsync \
-    screenrecord \
-    telephony-common \
-    voip-common
+    VpnDialogs
 
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_base.mk)
 
 # Override the PRODUCT_BOOT_JARS set in core_minimal.mk
 PRODUCT_BOOT_JARS := core:conscrypt:okhttp:core-junit:bouncycastle:ext:framework:framework2:telephony-common:voip-common:mms-common:android.policy:services:apache-xml:webviewchromium
diff --git a/target/product/core_base.mk b/target/product/core_base.mk
new file mode 100644
index 0000000..ecc59c7
--- /dev/null
+++ b/target/product/core_base.mk
@@ -0,0 +1,69 @@
+#
+# Copyright (C) 2013 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.
+#
+# Note that components added here will be also shared in PDK. Components
+# that should not be in PDK should be added in lower level like core.mk.
+
+PRODUCT_PROPERTY_OVERRIDES := \
+    ro.config.notification_sound=OnTheHunt.ogg \
+    ro.config.alarm_alert=Alarm_Classic.ogg
+
+PRODUCT_PACKAGES += \
+    ContactsProvider \
+    DefaultContainerService \
+    Home \
+    TelephonyProvider \
+    UserDictionaryProvider \
+    atrace \
+    libandroidfw \
+    libaudiopreprocessing \
+    libaudioutils \
+    libbcc \
+    libfilterpack_imageproc \
+    libgabi++ \
+    libkeystore \
+    libmdnssd \
+    libnfc_ndef \
+    libportable \
+    libpowermanager \
+    libspeexresampler \
+    libstagefright_chromium_http \
+    libstagefright_soft_aacdec \
+    libstagefright_soft_aacenc \
+    libstagefright_soft_amrdec \
+    libstagefright_soft_amrnbenc \
+    libstagefright_soft_amrwbenc \
+    libstagefright_soft_flacenc \
+    libstagefright_soft_g711dec \
+    libstagefright_soft_gsmdec \
+    libstagefright_soft_h264dec \
+    libstagefright_soft_h264enc \
+    libstagefright_soft_mp3dec \
+    libstagefright_soft_mpeg4dec \
+    libstagefright_soft_mpeg4enc \
+    libstagefright_soft_rawdec \
+    libstagefright_soft_vorbisdec \
+    libstagefright_soft_vpxdec \
+    libstagefright_soft_vpxenc \
+    libvariablespeed \
+    libwebrtc_audio_preprocessing \
+    mdnsd \
+    mms-common \
+    requestsync \
+    screenrecord \
+    telephony-common \
+    voip-common
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_minimal.mk)
diff --git a/target/product/mini.mk b/target/product/mini.mk
deleted file mode 100644
index ef21789..0000000
--- a/target/product/mini.mk
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright (C) 2012 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.
-
-# Common configurations for mini_XXX lunch targets
-# This is mainly for creating small system image during early development stage.
-
-PRODUCT_BRAND := mini
-PRODUCT_DEVICE := mini
-PRODUCT_NAME := mini
-
-# add all configurations
-PRODUCT_AAPT_CONFIG := normal ldpi mdpi hdpi xhdpi xxhdpi
-PRODUCT_AAPT_PREF_CONFIG := hdpi
-
-# en_US only
-PRODUCT_LOCALES := en_US
-
-# dummy definitions to use += in later parts
-PRODUCT_PROPERTY_OVERRIDES :=
-PRODUCT_COPY_FILES :=
-
-
-# for CtsVerifier
-PRODUCT_PACKAGES += \
-    com.android.future.usb.accessory
-
-# It does not mean that all features are supproted, but only for meeting
-# configuration requirements for some CTS
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
-    frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
-    frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
-    frameworks/native/data/etc/android.hardware.sensor.barometer.xml:system/etc/permissions/android.hardware.sensor.barometer.xml \
-    frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \
-    frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
-
-#----------------- originally from core.mk ----------------
-
-PRODUCT_PROPERTY_OVERRIDES += \
-    ro.config.notification_sound=OnTheHunt.ogg \
-    ro.config.alarm_alert=Alarm_Classic.ogg
-
-# Please keep this list sorted alphabetically
-PRODUCT_PACKAGES += \
-    ApplicationsProvider \
-    ContactsProvider \
-    DefaultContainerService \
-    DownloadProvider \
-    DownloadProviderUi \
-    MediaProvider \
-    PackageInstaller \
-    SettingsProvider \
-    Shell \
-    TelephonyProvider \
-    UserDictionaryProvider \
-    apache-xml \
-    audio \
-    bouncycastle \
-    bu \
-    cacerts \
-    com.android.location.provider \
-    com.android.location.provider.xml \
-    conscrypt \
-    core \
-    core-junit \
-    dalvikvm \
-    dexdeps \
-    dexdump \
-    dexlist \
-    dexopt \
-    dmtracedump \
-    drmserver \
-    dx \
-    ext \
-    framework-res \
-    hprof-conv \
-    installd \
-    ip \
-    ip-up-vpn \
-    ip6tables \
-    iptables \
-    keystore \
-    keystore.default \
-    libandroidfw \
-    libOpenMAXAL \
-    libOpenSLES \
-    libaudiopreprocessing \
-    libaudioutils \
-    libbcc \
-    libcrypto \
-    libdownmix \
-    libdvm \
-    libdrmframework \
-    libdrmframework_jni \
-    libexpat \
-    libfilterfw \
-    libfilterpack_imageproc \
-    libgabi++ \
-    libicui18n \
-    libicuuc \
-    libjavacore \
-    libkeystore \
-    libmdnssd \
-    libnativehelper \
-    libnfc_ndef \
-    libportable \
-    libpowermanager \
-    libspeexresampler \
-    libsqlite_jni \
-    libssl \
-    libstagefright \
-    libstagefright_chromium_http \
-    libstagefright_soft_aacdec \
-    libstagefright_soft_aacenc \
-    libstagefright_soft_amrdec \
-    libstagefright_soft_amrnbenc \
-    libstagefright_soft_amrwbenc \
-    libstagefright_soft_flacenc \
-    libstagefright_soft_g711dec \
-    libstagefright_soft_gsmdec \
-    libstagefright_soft_h264dec \
-    libstagefright_soft_h264enc \
-    libstagefright_soft_mp3dec \
-    libstagefright_soft_mpeg4dec \
-    libstagefright_soft_mpeg4enc \
-    libstagefright_soft_vorbisdec \
-    libstagefright_soft_vpxdec \
-    libstagefright_soft_rawdec \
-    libvariablespeed \
-    libwebrtc_audio_preprocessing \
-    libwilhelm \
-    libz \
-    mdnsd \
-    network \
-    okhttp \
-    pand \
-    requestsync \
-    screencap \
-    sdptool \
-    sensorservice \
-    lint \
-    telephony-common \
-    voip-common \
-    mms-common
-
-PRODUCT_COPY_FILES += \
-    system/core/rootdir/init.usb.rc:root/init.usb.rc \
-
-#----------------- originally from generic_no_telephony.mk ----------------
-
-PRODUCT_PACKAGES += \
-    Bluetooth \
-    FusedLocation \
-    InputDevices \
-    LatinIME \
-    Phone \
-    Provision \
-    hostapd \
-    wpa_supplicant.conf
-
-PRODUCT_PACKAGES += \
-    librs_jni \
-    libvideoeditor_jni \
-    libvideoeditor_core \
-    libvideoeditor_osal \
-    libvideoeditor_videofilters \
-    libvideoeditorplayer \
-
-PRODUCT_PACKAGES += \
-    audio.primary.default \
-    audio_policy.default \
-    local_time.default \
-    power.default
-
-PRODUCT_PACKAGES += \
-    local_time.default
-
-PRODUCT_COPY_FILES += \
-    frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf
-
-PRODUCT_PROPERTY_OVERRIDES += \
-    ro.carrier=unknown
-
-#----------------- originally from full_base.mk ----------------
-
-PRODUCT_PACKAGES += \
-    drmserver \
-    libdrmframework \
-    libdrmframework_jni \
-    WAPPushManager
-
-
-# Additional settings used in all AOSP builds
-PRODUCT_PROPERTY_OVERRIDES += \
-    ro.com.android.dateformat=MM-dd-yyyy \
-    ro.config.ringtone=Ring_Synth_04.ogg \
-    ro.config.notification_sound=pixiedust.ogg
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk)
-$(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
-$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
-$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage5.mk)
-
-#----------------- For PDK ------------------------------
-PRODUCT_PACKAGES += \
-    TestingCamera \
-    Home \
-    Keyguard \
-    PrintSpooler \
-    SystemUI \
-    Settings \
-    libsurfaceflinger_ddmconnection
-
-# This is not necessary for mini, but is for mini-emulator as it should
-# be included in platform.zip
-PRODUCT_PACKAGES += camera.goldfish.jpeg
-