Commit 6ad5f61e authored by Sébastien Toque's avatar Sébastien Toque
Browse files

clear ListActivities when exiting them

parent ff738b53
...@@ -54,6 +54,13 @@ public class BrowserActivity extends ListActivity { ...@@ -54,6 +54,13 @@ public class BrowserActivity extends ListActivity {
openDir(file); openDir(file);
} }
@Override
protected void onDestroy() {
mAdapter.clear();
mScollStates.clear();
super.onDestroy();
}
private void openDir(File file) { private void openDir(File file) {
mAdapter.clear(); mAdapter.clear();
mCurrentDir = file; mCurrentDir = file;
......
...@@ -24,6 +24,7 @@ import android.widget.TextView; ...@@ -24,6 +24,7 @@ import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener; import android.widget.TextView.OnEditorActionListener;
public class SearchActivity extends ListActivity { public class SearchActivity extends ListActivity {
public final static String TAG = "VLC/SearchActivit"; public final static String TAG = "VLC/SearchActivit";
private EditText mSearchText; private EditText mSearchText;
...@@ -57,7 +58,15 @@ public class SearchActivity extends ListActivity { ...@@ -57,7 +58,15 @@ public class SearchActivity extends ListActivity {
} }
mSearchText.requestFocus(); mSearchText.requestFocus();
}
@Override
protected void onDestroy() {
if (mHistoryAdapter != null)
mHistoryAdapter.clear();
mHistory.clear();
mResultAdapter.clear();
super.onDestroy();
} }
private void search(CharSequence key, int type) { private void search(CharSequence key, int type) {
......
...@@ -49,6 +49,8 @@ public class VideoListActivity extends ListActivity { ...@@ -49,6 +49,8 @@ public class VideoListActivity extends ListActivity {
@Override @Override
protected void onDestroy() { protected void onDestroy() {
mMediaLibrary.removeUpdateHandler(mHandler); mMediaLibrary.removeUpdateHandler(mHandler);
mThumbnailerManager.clearJobs();
mVideoAdapter.clear();
super.onDestroy(); super.onDestroy();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment