Loading services/core/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ java_library_static { "aconfig_new_storage_flags_lib", "powerstats_flags_lib", "locksettings_flags_lib", "MmdProperties", "mmd_flags_lib", ], javac_shard_size: 50, Loading services/core/java/com/android/server/StorageManagerService.java +15 −14 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ import android.provider.Downloads; import android.provider.MediaStore; import android.provider.Settings; import android.service.storage.ExternalStorageService; import android.sysprop.MmdProperties; import android.text.TextUtils; import android.text.format.DateUtils; import android.util.ArrayMap; Loading Loading @@ -934,6 +935,9 @@ class StorageManagerService extends IStorageManager.Stub // Start scheduling nominally-daily fstrim operations MountServiceIdler.scheduleIdlePass(mContext); if (mmdEnabled() && MmdProperties.mmd_zram_enabled().orElse(false)) { ZramMaintenance.startZramMaintenance(mContext); } else { // Toggle zram-enable system property in response to settings mContext.getContentResolver().registerContentObserver( Settings.Global.getUriFor(Settings.Global.ZRAM_ENABLED), Loading @@ -946,9 +950,6 @@ class StorageManagerService extends IStorageManager.Stub }); refreshZramSettings(); if (mmdEnabled()) { ZramMaintenance.startZramMaintenance(mContext); } else { // Schedule zram writeback unless zram is disabled by persist.sys.zram_enabled String zramPropValue = SystemProperties.get(ZRAM_ENABLED_PROPERTY); if (!zramPropValue.equals("0") Loading Loading @@ -982,7 +983,7 @@ class StorageManagerService extends IStorageManager.Stub // sole writer. SystemProperties.set(ZRAM_ENABLED_PROPERTY, desiredPropertyValue); // Schedule writeback only if zram is being enabled. if (!mmdEnabled() && desiredPropertyValue.equals("1") if (desiredPropertyValue.equals("1") && mContext.getResources().getBoolean( com.android.internal.R.bool.config_zramWriteback)) { ZramWriteback.scheduleZramWriteback(mContext); Loading Loading
services/core/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -243,6 +243,7 @@ java_library_static { "aconfig_new_storage_flags_lib", "powerstats_flags_lib", "locksettings_flags_lib", "MmdProperties", "mmd_flags_lib", ], javac_shard_size: 50, Loading
services/core/java/com/android/server/StorageManagerService.java +15 −14 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ import android.provider.Downloads; import android.provider.MediaStore; import android.provider.Settings; import android.service.storage.ExternalStorageService; import android.sysprop.MmdProperties; import android.text.TextUtils; import android.text.format.DateUtils; import android.util.ArrayMap; Loading Loading @@ -934,6 +935,9 @@ class StorageManagerService extends IStorageManager.Stub // Start scheduling nominally-daily fstrim operations MountServiceIdler.scheduleIdlePass(mContext); if (mmdEnabled() && MmdProperties.mmd_zram_enabled().orElse(false)) { ZramMaintenance.startZramMaintenance(mContext); } else { // Toggle zram-enable system property in response to settings mContext.getContentResolver().registerContentObserver( Settings.Global.getUriFor(Settings.Global.ZRAM_ENABLED), Loading @@ -946,9 +950,6 @@ class StorageManagerService extends IStorageManager.Stub }); refreshZramSettings(); if (mmdEnabled()) { ZramMaintenance.startZramMaintenance(mContext); } else { // Schedule zram writeback unless zram is disabled by persist.sys.zram_enabled String zramPropValue = SystemProperties.get(ZRAM_ENABLED_PROPERTY); if (!zramPropValue.equals("0") Loading Loading @@ -982,7 +983,7 @@ class StorageManagerService extends IStorageManager.Stub // sole writer. SystemProperties.set(ZRAM_ENABLED_PROPERTY, desiredPropertyValue); // Schedule writeback only if zram is being enabled. if (!mmdEnabled() && desiredPropertyValue.equals("1") if (desiredPropertyValue.equals("1") && mContext.getResources().getBoolean( com.android.internal.R.bool.config_zramWriteback)) { ZramWriteback.scheduleZramWriteback(mContext); Loading