- We want to give a time for apps to prepare for being frozen
- The app going to the background a moment ago will skip this process
Change-Id: Ib9f453beb6a96865e424651055318dec695887bc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
if (!spi->main_pid || spi->type != PROC_TYPE_GUI)
continue;
+ /*
+ * It checks all applications from proc_app_list
+ * So, current background process can be checked again.
+ * It is because lru value of this application was already changed,
+ * it should be skipped
+ */
+
+ if (spi == pai)
+ continue;
+
pid = spi->main_pid;
snprintf(buf, sizeof(buf), PROC_OOM_SCORE_ADJ_PATH, pid);
fp = fopen(buf, "r+");