fixed null pointer
This commit is contained in:
parent
5656c296af
commit
8349d3d248
1 changed files with 7 additions and 3 deletions
|
@ -48,6 +48,7 @@ import android.app.AlertDialog.Builder;
|
|||
import android.app.ListActivity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
|
@ -119,10 +120,13 @@ public class DownloadIndexActivity extends ListActivity {
|
|||
|
||||
filterText = (EditText) findViewById(R.id.search_box);
|
||||
filterText.addTextChangedListener(textWatcher);
|
||||
final String filter = getIntent().getExtras().getString(FILTER_KEY);
|
||||
final Intent intent = getIntent();
|
||||
if (intent != null && intent.getExtras() != null) {
|
||||
final String filter = intent.getExtras().getString(FILTER_KEY);
|
||||
if (filter != null) {
|
||||
filterText.setText(filter);
|
||||
}
|
||||
}
|
||||
|
||||
if(downloadListIndexThread.getCachedIndexFiles() != null){
|
||||
setListAdapter(new DownloadIndexAdapter(downloadListIndexThread.getCachedIndexFiles()));
|
||||
|
|
Loading…
Reference in a new issue