Merge "Replace MALLOC_IMPL with MALLOC_SVELTE."
am: 8c54c686ee

* commit '8c54c686ee1f0b85e0dbad7b8718bf3fc2f9c1d7':
  Replace MALLOC_IMPL with MALLOC_SVELTE.
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 7b83577..8158443 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -52,15 +52,8 @@
 # Binder API version
 TARGET_USES_64_BIT_BINDER := true
 
-# Enable dex-preoptimization to speed up first boot sequence
-ifeq ($(HOST_OS),linux)
-  ifeq ($(TARGET_BUILD_VARIANT),user)
-    ifeq ($(WITH_DEXPREOPT),)
-      WITH_DEXPREOPT := true
-    endif
-  endif
-endif
-DONT_DEXPREOPT_PREBUILTS := true
+# Only preopt the boot image, there is not enough space in the system partition.
+WITH_DEXPREOPT_BOOT_IMG_ONLY := true
 
 # Security
 BUILD_WITH_SECURITY_FRAMEWORK := chaabi_token
diff --git a/device.mk b/device.mk
index 648b5d7..0645d6b 100644
--- a/device.mk
+++ b/device.mk
@@ -267,7 +267,4 @@
 PRODUCT_COPY_FILES += \
     device/asus/fugu/sep_policy.conf:system/etc/security/sep_policy.conf
 
-# Without this filter, we get very close to the limit.
-PRODUCT_DEX_PREOPT_DEFAULT_FLAGS += --compiler-filter=space
-
 #PRODUCT_CHARACTERISTICS := tablet
diff --git a/fstab.fugu b/fstab.fugu
index cee2ecf..618ed2e 100644
--- a/fstab.fugu
+++ b/fstab.fugu
@@ -3,5 +3,5 @@
 /dev/block/by-name/userdata	/data   	ext4	nosuid,nodev,noatime,discard,barrier=1,data=ordered,noauto_da_alloc	wait,check
 /dev/block/by-name/factory	/factory	ext4	nosuid,nodev,noatime,barrier=1,data=ordered				wait
 /dev/block/by-name/misc		/misc		emmc	defaults								defaults
-/dev/block/zram0		none		swap	defaults								zramsize=104857600
+/dev/block/zram0		none		swap	defaults								zramsize=104857600,notrim
 /devices/*/dwc3-host.2/usb*	auto		auto	defaults								voldmanaged=usb:auto,encryptable=userdata
diff --git a/init.fugu.rc b/init.fugu.rc
index 8dd7f30..f8bb0e3 100644
--- a/init.fugu.rc
+++ b/init.fugu.rc
@@ -35,6 +35,10 @@
     symlink /sdcard /mnt/sdcard
     symlink /sdcard /storage/sdcard0
 
+    # ZRAM options
+    write /sys/block/zram0/comp_algorithm lz4
+    write /sys/block/zram0/max_comp_streams 2
+
     # KSM options
     write /sys/kernel/mm/ksm/pages_to_scan 100
     write /sys/kernel/mm/ksm/sleep_millisecs 500
@@ -251,7 +255,7 @@
     oneshot
 
 # bugreport is triggered by holding down volume down, volume up and power
-service bugreport /system/bin/dumpstate -d -p -B \
+service bugreport /system/bin/dumpstate -d -p -B -z \
         -o /data/data/com.android.shell/files/bugreports/bugreport
     class main
     disabled
diff --git a/sepolicy/audioserver.te b/sepolicy/audioserver.te
new file mode 100644
index 0000000..ee2b74c
--- /dev/null
+++ b/sepolicy/audioserver.te
@@ -0,0 +1,2 @@
+# required for voice command remote control
+allow audioserver remote_control_service:service_manager find;
diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te
index e0962c0..27c7a24 100644
--- a/sepolicy/mediaserver.te
+++ b/sepolicy/mediaserver.te
@@ -1,4 +1,2 @@
 # TODO: investigate cause of this
 allow mediaserver graphics_device:dir search;
-
-allow mediaserver remote_control_service:service_manager find;