List of usage examples for android.database.sqlite SQLiteDatabase releaseMemory
public static int releaseMemory()
From source file:com.panoskrt.dbadapter.DBAdapter.java
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) public void deleteDB() { File oldDB = new File(dbPath + dbName); SQLiteDatabase.releaseMemory(); SQLiteDatabase.deleteDatabase(oldDB); }
From source file:com.android.leanlauncher.LauncherTransitionable.java
@Override public void onTrimMemory(int level) { super.onTrimMemory(level); if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) { // The widget preview db can result in holding onto over // 3MB of memory for caching which isn't necessary. SQLiteDatabase.releaseMemory(); // This clears all widget bitmaps from the widget tray if (mAppsCustomizeTabHost != null) { mAppsCustomizeTabHost.trimMemory(); }/* w w w. j a v a 2 s . co m*/ } }
From source file:com.android.launcher3.Launcher.java
@Override public void onTrimMemory(int level) { super.onTrimMemory(level); if (level >= ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) { // The widget preview db can result in holding onto over // 3MB of memory for caching which isn't necessary. SQLiteDatabase.releaseMemory(); // This clears all widget bitmaps from the widget tray // TODO(hyunyoungs) }/*from w ww . ja v a 2 s . co m*/ if (mLauncherCallbacks != null) { mLauncherCallbacks.onTrimMemory(level); } }