From 76eef491e1a453174f6372d18cf500d13521fb23 Mon Sep 17 00:00:00 2001 From: Chris Tate <> Date: Wed, 25 Mar 2009 15:12:25 -0700 Subject: [PATCH] Automated import from //branches/cupcake/...@142614,142614 --- core/java/android/app/ActivityThread.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index acf41eeb0f3be..d8161936a44d1 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -3487,9 +3487,11 @@ public final class ActivityThread { callbacks.get(i).onLowMemory(); } - // Ask SQLite to free up as much memory as it can, mostly from it's page caches - int sqliteReleased = SQLiteDatabase.releaseMemory(); - EventLog.writeEvent(SQLITE_MEM_RELEASED_EVENT_LOG_TAG, sqliteReleased); + // Ask SQLite to free up as much memory as it can, mostly from its page caches. + if (Process.myUid() != Process.SYSTEM_UID) { + int sqliteReleased = SQLiteDatabase.releaseMemory(); + EventLog.writeEvent(SQLITE_MEM_RELEASED_EVENT_LOG_TAG, sqliteReleased); + } BinderInternal.forceGc("mem"); }