[Android] clear memory bitmap cache when emptying database
Sébastien Toque
git at videolan.org
Sat Apr 6 00:17:31 CEST 2013
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Fri Apr 5 23:10:03 2013 +0200| [c5c586fe467bce3bc33c060b5a76e671a56389eb] | committer: Sébastien Toque
clear memory bitmap cache when emptying database
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c5c586fe467bce3bc33c060b5a76e671a56389eb
---
vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
index 3fa0a58..7838896 100644
--- a/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/PreferencesActivity.java
@@ -22,6 +22,7 @@ package org.videolan.vlc.gui;
import org.videolan.vlc.AudioService;
import org.videolan.vlc.AudioServiceController;
+import org.videolan.vlc.BitmapCache;
import org.videolan.vlc.MediaDatabase;
import org.videolan.vlc.LibVLC;
import org.videolan.vlc.LibVlcException;
@@ -143,6 +144,7 @@ public class PreferencesActivity extends PreferenceActivity implements OnSharedP
@Override
public boolean onPreferenceClick(Preference preference) {
MediaDatabase.getInstance(getBaseContext()).emptyDatabase();
+ BitmapCache.getInstance().clear();
Toast.makeText(getBaseContext(), R.string.media_db_cleared, Toast.LENGTH_SHORT).show();
return true;
}
More information about the Android
mailing list