Enable zram writeback job scheduler

This reverts commit 5ed3a3fbcfd5e3f4f50561024463db2f0085929f.

Bug: 140882488
Change-Id: I9deffcbe25474837d5167024297d06601530aae5
Signed-off-by: Minchan Kim <minchan@google.com>
diff --git a/device.mk b/device.mk
index 161e223..214f64c 100644
--- a/device.mk
+++ b/device.mk
@@ -324,6 +324,9 @@
     persist.rcs.supported=1 \
     vendor.rild.libpath=/vendor/lib64/libril-qc-hal-qmi.so \
     ro.hardware.keystore_desede=true \
+    ro.zram.mark_idle_delay_mins=60 \
+    ro.zram.first_wb_delay_mins=180 \
+    ro.zram.periodic_wb_delay_hours=24 \
 
 # Disable snapshot timer
 PRODUCT_PROPERTY_OVERRIDES += \
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index bef2559..1708b4a 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -410,4 +410,6 @@
 
     <!-- True if the firmware supports connected MAC randomization -->
     <bool name="config_wifi_connected_mac_randomization_supported">true</bool>
+    <!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
+    <bool name="config_zramWriteback">true</bool>
 </resources>