omni: move audio files to product and migrate to OMNI_PRODUCT_PROPERTIES

also remove all dalkik config files

Based on https://android.googlesource.com/platform/frameworks/base/+/eaec50becfc8bb606f6d117e996bed56351c2549%5E%21/#F0

Change-Id: I77ab64833abc7d0ff8b35e4a7abb7621713f6de9
diff --git a/build/core/qcom_utils.mk b/build/core/qcom_utils.mk
index 6f02067..4fd782e 100755
--- a/build/core/qcom_utils.mk
+++ b/build/core/qcom_utils.mk
@@ -37,10 +37,10 @@
 
 
 # vars for use by utils
-empty :=
-space := $(empty) $(empty)
-colon := $(empty):$(empty)
-underscore := $(empty)_$(empty)
+#empty :=
+#space := $(empty) $(empty)
+#colon := $(empty):$(empty)
+#underscore := $(empty)_$(empty)
 
 # $(call match-word,w1,w2)
 # checks if w1 == w2
diff --git a/config/common.mk b/config/common.mk
index 8e42f13..a5e2470 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -10,15 +10,15 @@
 endif
 
 ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.com.google.clientidbase=android-google
 else
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
 endif
 
 # general properties
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
     ro.com.android.wifi-watchlist=GoogleGuest \
     ro.setupwizard.enterprise_mode=1 \
@@ -26,21 +26,21 @@
     persist.sys.disable_rescue=true
 
 # Google assistant
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.opa.eligible_device=true
 
 # Tethering - allow without requiring a provisioning app
 # (for devices that check this)
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     net.tethering.noprovisioning=true
 
 # enable ADB authentication if not on eng build
 ifneq ($(TARGET_BUILD_VARIANT),eng)
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES  += ro.adb.secure=1
+OMNI_PRODUCT_PROPERTIES  += ro.adb.secure=1
 endif
 
 # Enforce privapp-permissions whitelist
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.control_privapp_permissions=enforce
 
 PRODUCT_COPY_FILES += \
@@ -79,32 +79,32 @@
     vendor/omni/prebuilt/etc/permissions/omni-power-whitelist.xml:system/etc/permissions/omni-power-whitelist.xml
 
 # custom omni sounds
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.config.ringtone=omni_ringtone1.ogg,omni_ringtone1.ogg \
     ro.config.notification_sound=omni_notification1.ogg \
     ro.config.alarm_alert=omni_alarm1.ogg
 
 PRODUCT_COPY_FILES += \
-    vendor/omni/prebuilt/sounds/camera_click_48k.ogg:system/media/audio/ui/camera_click.ogg \
-    vendor/omni/prebuilt/sounds/VideoRecord_48k.ogg:system/media/audio/ui/VideoRecord.ogg \
-    vendor/omni/prebuilt/sounds/VideoStop_48k.ogg:system/media/audio/ui/VideoStop.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone1.ogg:system/media/audio/ringtones/omni_ringtone1.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone2.ogg:system/media/audio/ringtones/omni_ringtone2.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone3.ogg:system/media/audio/ringtones/omni_ringtone3.ogg \
-    vendor/omni/prebuilt/sounds/omni_alarm1.ogg:system/media/audio/alarms/omni_alarm1.ogg \
-    vendor/omni/prebuilt/sounds/omni_alarm2.ogg:system/media/audio/alarms/omni_alarm2.ogg \
-    vendor/omni/prebuilt/sounds/omni_notification1.ogg:system/media/audio/notifications/omni_notification1.ogg \
-    vendor/omni/prebuilt/sounds/omni_lowbattery1.ogg:system/media/audio/ui/omni_lowbattery1.ogg \
-    vendor/omni/prebuilt/sounds/omni_lock_phone.ogg:system/media/audio/ui/omni_lock_phone.ogg \
-    vendor/omni/prebuilt/sounds/omni_unlock_phone.ogg:system/media/audio/ui/omni_unlock_phone.ogg \
-    vendor/omni/prebuilt/sounds/omni_charge_start.ogg:system/media/audio/ui/ChargingStarted.ogg
+    vendor/omni/prebuilt/sounds/camera_click_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/camera_click.ogg \
+    vendor/omni/prebuilt/sounds/VideoRecord_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/VideoRecord.ogg \
+    vendor/omni/prebuilt/sounds/VideoStop_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/VideoStop.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone1.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone2.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone2.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone3.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone3.ogg \
+    vendor/omni/prebuilt/sounds/omni_alarm1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/alarms/omni_alarm1.ogg \
+    vendor/omni/prebuilt/sounds/omni_alarm2.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/alarms/omni_alarm2.ogg \
+    vendor/omni/prebuilt/sounds/omni_notification1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/notifications/omni_notification1.ogg \
+    vendor/omni/prebuilt/sounds/omni_lowbattery1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_lowbattery1.ogg \
+    vendor/omni/prebuilt/sounds/omni_lock_phone.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_lock_phone.ogg \
+    vendor/omni/prebuilt/sounds/omni_unlock_phone.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_unlock_phone.ogg \
+    vendor/omni/prebuilt/sounds/omni_charge_start.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/ChargingStarted.ogg
 
 # mkshrc
 PRODUCT_COPY_FILES += \
     vendor/omni/prebuilt/etc/mkshrc:system/etc/mkshrc
 
 # whitelist packages for location providers not in system
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.services.whitelist.packagelist=com.google.android.gms
 
 # Additional packages
diff --git a/config/phone-xxhdpi-2048-dalvik-heap.mk b/config/phone-xxhdpi-2048-dalvik-heap.mk
deleted file mode 100644
index c79c250..0000000
--- a/config/phone-xxhdpi-2048-dalvik-heap.mk
+++ /dev/null
@@ -1,26 +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.
-#
-
-# Provides overrides to configure the Dalvik heap for a 2G phone
-# 192m of RAM gives enough space for 5 8 megapixel camera bitmaps in RAM.
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    dalvik.vm.heapstartsize=16m \
-    dalvik.vm.heapgrowthlimit=192m \
-    dalvik.vm.heapsize=512m \
-    dalvik.vm.heaptargetutilization=0.75 \
-    dalvik.vm.heapminfree=2m \
-    dalvik.vm.heapmaxfree=8m
diff --git a/config/phone-xxhdpi-2048-hwui-memory.mk b/config/phone-xxhdpi-2048-hwui-memory.mk
deleted file mode 100644
index 22e5343..0000000
--- a/config/phone-xxhdpi-2048-hwui-memory.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2013 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.
-#
-
-# Provides overrides to configure the HWUI memory limits
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    ro.hwui.texture_cache_size=72 \
-    ro.hwui.layer_cache_size=48 \
-    ro.hwui.r_buffer_cache_size=8 \
-    ro.hwui.path_cache_size=32 \
-    ro.hwui.gradient_cache_size=1 \
-    ro.hwui.drop_shadow_cache_size=6 \
-    ro.hwui.texture_cache_flushrate=0.4 \
-    ro.hwui.text_small_cache_width=1024 \
-    ro.hwui.text_small_cache_height=1024 \
-    ro.hwui.text_large_cache_width=2048 \
-    ro.hwui.text_large_cache_height=1024
diff --git a/config/phone-xxhdpi-3072-dalvik-heap.mk b/config/phone-xxhdpi-3072-dalvik-heap.mk
deleted file mode 100644
index 3598f5a..0000000
--- a/config/phone-xxhdpi-3072-dalvik-heap.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# 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.
-#
-
-# Provides overrides to configure the Dalvik heap for a 3G phone
-
-PRODUCT_PROPERTY_OVERRIDES += \
-    dalvik.vm.heapstartsize=8m \
-    dalvik.vm.heapgrowthlimit=288m \
-    dalvik.vm.heapsize=768m \
-    dalvik.vm.heaptargetutilization=0.75 \
-    dalvik.vm.heapminfree=512k \
-    dalvik.vm.heapmaxfree=8m
diff --git a/config/phone-xxhdpi-4096-dalvik-heap.mk b/config/phone-xxhdpi-4096-dalvik-heap.mk
deleted file mode 100644
index c865ddb..0000000
--- a/config/phone-xxhdpi-4096-dalvik-heap.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (C) 2017 The OmniROM 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.
-#
-
-# Provides overrides to configure the Dalvik heap for a 3G phone
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    dalvik.vm.heapstartsize=16m \
-    dalvik.vm.heapgrowthlimit=256m \
-    dalvik.vm.heapsize=512m \
-    dalvik.vm.heaptargetutilization=0.75 \
-    dalvik.vm.heapminfree=4m \
-    dalvik.vm.heapmaxfree=8m
diff --git a/config/phone-xxxhdpi-3072-dalvik-heap.mk b/config/phone-xxxhdpi-3072-dalvik-heap.mk
deleted file mode 100644
index 3d4ed79..0000000
--- a/config/phone-xxxhdpi-3072-dalvik-heap.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (C) 2015 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.
-#
-
-# Provides overrides to configure the Dalvik heap for a 3G phone
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    dalvik.vm.heapstartsize=16m \
-    dalvik.vm.heapgrowthlimit=256m \
-    dalvik.vm.heapsize=512m \
-    dalvik.vm.heaptargetutilization=0.75 \
-    dalvik.vm.heapminfree=2m \
-    dalvik.vm.heapmaxfree=8m
diff --git a/config/phone-xxxhdpi-3072-hwui-memory.mk b/config/phone-xxxhdpi-3072-hwui-memory.mk
deleted file mode 100644
index fbe8df5..0000000
--- a/config/phone-xxxhdpi-3072-hwui-memory.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2015 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.
-#
-
-# Provides overrides to configure the HWUI memory limits
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
-    ro.hwui.texture_cache_size=88 \
-    ro.hwui.layer_cache_size=58 \
-    ro.hwui.path_cache_size=32 \
-    ro.hwui.shape_cache_size=4 \
-    ro.hwui.gradient_cache_size=2 \
-    ro.hwui.drop_shadow_cache_size=8 \
-    ro.hwui.r_buffer_cache_size=8 \
-    ro.hwui.text_small_cache_width=2048 \
-    ro.hwui.text_small_cache_height=2048 \
-    ro.hwui.text_large_cache_width=4096 \
-    ro.hwui.text_large_cache_height=4096
diff --git a/config/version.mk b/config/version.mk
index f7aeda5..c5583fa 100644
--- a/config/version.mk
+++ b/config/version.mk
@@ -19,6 +19,6 @@
 endif
 
 # Apply it to build.prop
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.modversion=OmniROM-$(ROM_VERSION) \
     ro.omni.version=$(ROM_VERSION)
diff --git a/overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index 09170f3..a137e6c 100644
--- a/overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/overlay/common/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -21,7 +21,7 @@
     <string name="def_backup_transport">com.google.android.gms/.backup.BackupTransportService</string>
 
     <!-- user interface sound effects -->
-    <string name="def_low_battery_sound" translatable="false">/system/media/audio/ui/omni_lowbattery1.ogg</string>
-    <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/omni_unlock_phone.ogg</string>
-    <string name="def_lock_sound" translatable="false">/system/media/audio/ui/omni_lock_phone.ogg</string>
+    <string name="def_low_battery_sound" translatable="false">/product/media/audio/ui/omni_lowbattery1.ogg</string>
+    <string name="def_unlock_sound" translatable="false">/product/media/audio/ui/omni_unlock_phone.ogg</string>
+    <string name="def_lock_sound" translatable="false">/product/media/audio/ui/omni_lock_phone.ogg</string>
 </resources>
diff --git a/utils/emulator/common.mk b/utils/emulator/common.mk
index 8d7663c..b262b71 100644
--- a/utils/emulator/common.mk
+++ b/utils/emulator/common.mk
@@ -10,15 +10,15 @@
 endif
 
 ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.com.google.clientidbase=android-google
 else
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.com.google.clientidbase=$(PRODUCT_GMS_CLIENTID_BASE)
 endif
 
 # general properties
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.url.legal=http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html \
     ro.com.android.wifi-watchlist=GoogleGuest \
     ro.setupwizard.enterprise_mode=1 \
@@ -45,24 +45,24 @@
     vendor/omni/prebuilt/etc/permissions/privapp-permissions-omni.xml:system/etc/permissions/privapp-permissions-omni.xml
 
 # custom omni sounds
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+OMNI_PRODUCT_PROPERTIES += \
     ro.config.ringtone=omni_ringtone1.ogg \
     ro.config.notification_sound=omni_notification1.ogg \
     ro.config.alarm_alert=omni_alarm1.ogg
 
 PRODUCT_COPY_FILES += \
-    vendor/omni/prebuilt/sounds/camera_click_48k.ogg:system/media/audio/ui/camera_click.ogg \
-    vendor/omni/prebuilt/sounds/VideoRecord_48k.ogg:system/media/audio/ui/VideoRecord.ogg \
-    vendor/omni/prebuilt/sounds/VideoStop_48k.ogg:system/media/audio/ui/VideoStop.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone1.ogg:system/media/audio/ringtones/omni_ringtone1.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone2.ogg:system/media/audio/ringtones/omni_ringtone2.ogg \
-    vendor/omni/prebuilt/sounds/omni_ringtone3.ogg:system/media/audio/ringtones/omni_ringtone3.ogg \
-    vendor/omni/prebuilt/sounds/omni_alarm1.ogg:system/media/audio/alarms/omni_alarm1.ogg \
-    vendor/omni/prebuilt/sounds/omni_alarm2.ogg:system/media/audio/alarms/omni_alarm2.ogg \
-    vendor/omni/prebuilt/sounds/omni_notification1.ogg:system/media/audio/notifications/omni_notification1.ogg \
-    vendor/omni/prebuilt/sounds/omni_lowbattery1.ogg:system/media/audio/ui/omni_lowbattery1.ogg \
-    vendor/omni/prebuilt/sounds/omni_lock_phone.ogg:system/media/audio/ui/omni_lock_phone.ogg \
-    vendor/omni/prebuilt/sounds/omni_unlock_phone.ogg:system/media/audio/ui/omni_unlock_phone.ogg
+    vendor/omni/prebuilt/sounds/camera_click_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/camera_click.ogg \
+    vendor/omni/prebuilt/sounds/VideoRecord_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/VideoRecord.ogg \
+    vendor/omni/prebuilt/sounds/VideoStop_48k.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/VideoStop.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone1.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone2.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone2.ogg \
+    vendor/omni/prebuilt/sounds/omni_ringtone3.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ringtones/omni_ringtone3.ogg \
+    vendor/omni/prebuilt/sounds/omni_alarm1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/alarms/omni_alarm1.ogg \
+    vendor/omni/prebuilt/sounds/omni_alarm2.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/alarms/omni_alarm2.ogg \
+    vendor/omni/prebuilt/sounds/omni_notification1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/notifications/omni_notification1.ogg \
+    vendor/omni/prebuilt/sounds/omni_lowbattery1.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_lowbattery1.ogg \
+    vendor/omni/prebuilt/sounds/omni_lock_phone.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_lock_phone.ogg \
+    vendor/omni/prebuilt/sounds/omni_unlock_phone.ogg:$(TARGET_COPY_OUT_PRODUCT)/media/audio/ui/omni_unlock_phone.ogg
 
 # Additional packages
 -include vendor/omni/utils/emulator/packages.mk