File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
debug-db/src/main/java/com/amitshekhar/server Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2929import android .content .res .AssetManager ;
3030import android .database .Cursor ;
3131import android .database .sqlite .SQLiteDatabase ;
32- import android .database .sqlite .SQLiteException ;
3332import android .text .TextUtils ;
3433import android .util .Log ;
3534
4645import java .io .InputStream ;
4746import java .io .InputStreamReader ;
4847import java .io .PrintStream ;
49- import java .io .UnsupportedEncodingException ;
5048import java .net .ServerSocket ;
5149import java .net .Socket ;
5250import java .net .SocketException ;
@@ -409,8 +407,10 @@ private Response query(String sql) {
409407
410408 public Response getDBList () {
411409 Response response = new Response ();
412- for (String name : mDatabaseDir .list ()) {
413- response .rows .add (name );
410+ if (mDatabaseDir != null ) {
411+ for (String name : mDatabaseDir .list ()) {
412+ response .rows .add (name );
413+ }
414414 }
415415 response .rows .add (Constants .APP_SHARED_PREFERENCES );
416416 response .isSuccessful = true ;
You can’t perform that action at this time.
0 commit comments