aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2016-01-29 19:19:51 +0100
committerAndreas Blaesius <skate4life@gmx.de>2016-02-22 23:03:38 +0100
commit25949002d6ad7c94d3863b5a577d520c2c75e810 (patch)
tree6e24397f82585a5c0c1fc492e660305ab6826172
parent0e766ffb17c5d867a87ed04d8cb6c5c603577d53 (diff)
downloaddevice_samsung_espressowifi-25949002d6ad7c94d3863b5a577d520c2c75e810.zip
device_samsung_espressowifi-25949002d6ad7c94d3863b5a577d520c2c75e810.tar.gz
device_samsung_espressowifi-25949002d6ad7c94d3863b5a577d520c2c75e810.tar.bz2
Set up unified build for wifi-only variants
Change-Id: I9fffe523aefac96e2cd0461b9398806b02e4c131
-rw-r--r--Android.mk4
-rw-r--r--AndroidProducts.mk19
-rw-r--r--BoardConfig.mk20
-rw-r--r--BoardConfigCommon.mk14
-rw-r--r--aosp_espresso.mk34
-rw-r--r--audio/audio_policy.conf100
-rw-r--r--cm.mk31
-rw-r--r--device.mk32
-rw-r--r--espresso-common.mk4
-rw-r--r--overlay/aosp-p31xx/frameworks/base/core/res/res/values/config.xml28
-rw-r--r--overlay/aosp/frameworks/base/core/res/res/values/config.xml87
-rw-r--r--vendorsetup.sh1
12 files changed, 334 insertions, 40 deletions
diff --git a/Android.mk b/Android.mk
index 6a291bc..c7b3acd 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,8 +23,6 @@
LOCAL_PATH := $(call my-dir)
-ifneq ($(filter p3100 p3110 p5100 p5110,$(TARGET_DEVICE)),)
-
+ifneq ($(filter espresso espresso3g,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))
-
endif
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..59bba81
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2012 The CyanogenMod 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.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/aosp_espresso.mk \
+ $(LOCAL_DIR)/cm.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..71cb113
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2016 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.
+#
+
+include device/samsung/espresso/BoardConfigCommon.mk
+
+# assert
+TARGET_OTA_ASSERT_DEVICE := espresso,p3110,GT-P3110,p3113,GT-P3113,espressowifi,espressowifixx,p5110,GT-P5110,p5113,GT-P5113,espresso10wifi,espresso10wifixx
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 9ca5c43..4fbd490 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -17,7 +17,7 @@
# Inherit common omap4 board config
-include hardware/ti/omap4/BoardConfigCommon.mk
-TARGET_SPECIFIC_HEADER_PATH += device/samsung/espresso-common/include
+TARGET_SPECIFIC_HEADER_PATH += device/samsung/espresso/include
TARGET_NO_BOOTLOADER := true
TARGET_NO_RADIOIMAGE := true
@@ -89,8 +89,8 @@ BOARD_NO_APSME_ATTR := true
# Bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
-BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/espresso-common/bluetooth
-BOARD_BLUEDROID_VENDOR_CONF := device/samsung/espresso-common/bluetooth/vnd_espresso.txt
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/samsung/espresso/bluetooth
+BOARD_BLUEDROID_VENDOR_CONF := device/samsung/espresso/bluetooth/vnd_espresso.txt
# Charger
BOARD_CHARGER_SHOW_PERCENTAGE := true
@@ -103,7 +103,7 @@ BOARD_USE_LEGACY_SENSORS_FUSION := false
# Selinux
BOARD_SEPOLICY_DIRS += \
- device/samsung/espresso-common/sepolicy
+ device/samsung/espresso/sepolicy
# Recovery
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
@@ -112,8 +112,8 @@ BOARD_USES_MMCUTILS := true
BOARD_HAS_NO_MISC_PARTITION := true
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_SUPPRESS_EMMC_WIPE := true
-TARGET_RECOVERY_FSTAB := device/samsung/espresso-common/rootdir/etc/fstab.tab2
-TARGET_RECOVERY_DEVICE_DIRS += device/samsung/espresso-common
+TARGET_RECOVERY_FSTAB := device/samsung/espresso/rootdir/etc/fstab.tab2
+TARGET_RECOVERY_DEVICE_DIRS += device/samsung/espresso
RECOVERY_FSTAB_VERSION := 2
BOARD_HAS_DOWNLOAD_MODE := true
@@ -121,5 +121,5 @@ BOARD_HAS_DOWNLOAD_MODE := true
BOARD_VENDOR := samsung
BOARD_PROVIDES_LIBRIL := true
BOARD_MODEM_TYPE := xmm6260
-BOARD_RIL_CLASS := ../../../device/samsung/espresso-common/ril
+BOARD_RIL_CLASS := ../../../device/samsung/espresso/ril
COMMON_GLOBAL_CFLAGS += -DDISABLE_ASHMEM_TRACKING
diff --git a/aosp_espresso.mk b/aosp_espresso.mk
new file mode 100644
index 0000000..36ac5e2
--- /dev/null
+++ b/aosp_espresso.mk
@@ -0,0 +1,34 @@
+#
+# Copyright 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.
+#
+
+# Use 44.1 kHz UI sounds
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackage13.mk)
+
+# This is a wifi-only device
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.carrier=wifi-only
+
+# Inherit from the common Open Source product configuration
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+# Inherit device configuration
+$(call inherit-product, device/samsung/espresso/device.mk)
+
+PRODUCT_NAME := aosp_espresso
+PRODUCT_DEVICE := espresso
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := Galaxy Tab 2
+PRODUCT_MANUFACTURER := Samsung
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf
new file mode 100644
index 0000000..303a338
--- /dev/null
+++ b/audio/audio_policy.conf
@@ -0,0 +1,100 @@
+# Global configuration section: lists input and output devices always present on the device
+# as well as the output device selected by default.
+# Devices are designated by a string that corresponds to the enum in audio.h
+
+global_configuration {
+ attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
+ default_output_device AUDIO_DEVICE_OUT_SPEAKER
+ attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
+}
+
+# audio hardware module section: contains descriptors for all audio hw modules present on the
+# device. Each hw module node is named after the corresponding hw module library base name.
+# For instance, "primary" corresponds to audio.primary.<device>.so.
+# The "primary" module is mandatory and must include at least one output with
+# AUDIO_OUTPUT_FLAG_PRIMARY flag.
+# Each module descriptor contains one or more output profile descriptors and zero or more
+# input profile descriptors. Each profile lists all the parameters supported by a given output
+# or input stream category.
+# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
+# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
+
+audio_hw_modules {
+ primary {
+ outputs {
+ primary {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
+ flags AUDIO_OUTPUT_FLAG_PRIMARY
+ }
+ deep_buffer {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE
+ flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
+ }
+ hdmi {
+ sampling_rates 44100|48000
+ channel_masks dynamic
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_AUX_DIGITAL
+ flags AUDIO_OUTPUT_FLAG_DIRECT
+ }
+ }
+ inputs {
+ primary {
+ sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
+ channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
+ }
+ }
+ }
+ a2dp {
+ outputs {
+ a2dp {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_ALL_A2DP
+ }
+ }
+ }
+ usb {
+ outputs {
+ usb_accessory {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_ACCESSORY
+ }
+ usb_device {
+ sampling_rates 44100
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_USB_DEVICE
+ }
+ }
+ }
+ r_submix {
+ outputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_OUT_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
+ }
+ }
+ inputs {
+ submix {
+ sampling_rates 48000
+ channel_masks AUDIO_CHANNEL_IN_STEREO
+ formats AUDIO_FORMAT_PCM_16_BIT
+ devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
+ }
+ }
+ }
+}
diff --git a/cm.mk b/cm.mk
new file mode 100644
index 0000000..efd9a9e
--- /dev/null
+++ b/cm.mk
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2016 The CyanogenMod 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.
+#
+
+# Boot animation
+TARGET_SCREEN_HEIGHT := 480
+TARGET_SCREEN_WIDTH := 600
+
+# Inherit common CM configuration
+$(call inherit-product, vendor/cm/config/common_full_tablet_wifionly.mk)
+
+# CyanogenMod specific overlay
+DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso/overlay/cm-common
+
+# Inherit device configuration
+$(call inherit-product, device/samsung/espresso/aosp_espresso.mk)
+
+# Device identifier. This must come after all inclusions
+PRODUCT_NAME := cm_espresso
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..e0e4337
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2016 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.
+#
+
+# Include common device configuration
+$(call inherit-product, device/samsung/espresso/espresso-common.mk)
+
+# Include wifi-only overlays
+DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso/overlay/aosp
+
+# Audio
+PRODUCT_COPY_FILES += \
+ device/samsung/espresso/audio/audio_policy.conf:system/etc/audio_policy.conf
+
+# IR
+PRODUCT_PACKAGES += \
+ consumerir.piranha
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.consumerir.xml:system/etc/permissions/android.hardware.consumerir.xml
diff --git a/espresso-common.mk b/espresso-common.mk
index 9b58bfa..d0600af 100644
--- a/espresso-common.mk
+++ b/espresso-common.mk
@@ -17,11 +17,11 @@
# Include common omap4 makefile
$(call inherit-product, hardware/ti/omap4/omap4.mk)
-DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso-common/overlay/aosp-common
+DEVICE_PACKAGE_OVERLAYS += device/samsung/espresso/overlay/aosp-common
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
-LOCAL_PATH := device/samsung/espresso-common
+LOCAL_PATH := device/samsung/espresso
# Enable higher-res drawables while keeping mdpi as primary source
PRODUCT_AAPT_CONFIG := large
diff --git a/overlay/aosp-p31xx/frameworks/base/core/res/res/values/config.xml b/overlay/aosp-p31xx/frameworks/base/core/res/res/values/config.xml
deleted file mode 100644
index fc41b6a..0000000
--- a/overlay/aosp-p31xx/frameworks/base/core/res/res/values/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, 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.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. Do not translate. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- If this is true, the screen will fade off. -->
- <bool name="config_animateScreenLights">true</bool>
-
-</resources>
-
diff --git a/overlay/aosp/frameworks/base/core/res/res/values/config.xml b/overlay/aosp/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..4cb1b01
--- /dev/null
+++ b/overlay/aosp/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+
+ <!-- The default iface on which to monitor data use -->
+ <string name="config_datause_iface">eth0</string>
+
+ <!-- Flag indicating whether the current device is "voice capable".
+ If true, this means that the device supports circuit-switched
+ (i.e. voice) phone calls over the telephony network, and is
+ allowed to display the in-call UI while a cellular voice call is
+ active. This can be overridden to false for "data only" devices
+ which can't make voice calls and don't support any in-call UI.
+
+ Note: this flag is subtly different from the
+ PackageManager.FEATURE_TELEPHONY system feature, which is
+ available on *any* device with a telephony radio, even if the
+ device is data-only. -->
+ <bool name="config_voice_capable">false</bool>
+
+ <!-- Flag indicating whether the current device allows sms service.
+ If true, this means that the device supports both sending and
+ receiving sms via the telephony network.
+ This can be overridden to false for "data only" devices
+ which can't send and receive sms message.
+
+ Note: Disable SMS also disable voicemail waiting sms,
+ cell broadcasting sms, and MMS. -->
+
+ <bool name="config_sms_capable">false</bool>
+
+ <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
+ Please don't copy them, copy anything else. -->
+
+ <!-- This string array should be overridden by the device to present a list of network
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[Connection name],[ConnectivityManager connection type],
+ [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
+ <string-array translatable="false" name="networkAttributes">
+ <item>"wifi,1,1,1,-1,true"</item>
+ <item>"bluetooth,7,7,0,-1,true"</item>
+ <item>"wifi_p2p,13,1,0,-1,true"</item>
+ </string-array>
+
+ <!-- This string array should be overridden by the device to present a list of radio
+ attributes. This is used by the connectivity manager to decide which networks can coexist
+ based on the hardware -->
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ <item>"7,1"</item>
+ </string-array>
+
+ <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>1</item>
+ <item>7</item>
+ </integer-array>
+
+</resources>
diff --git a/vendorsetup.sh b/vendorsetup.sh
new file mode 100644
index 0000000..854fbc8
--- /dev/null
+++ b/vendorsetup.sh
@@ -0,0 +1 @@
+add_lunch_combo cm_espresso-userdebug