From 161352a9efaec2bbea50a8fa590a3be4ee9a1405 Mon Sep 17 00:00:00 2001 From: Praharsh Jain Date: Sat, 4 Aug 2018 01:54:12 +0530 Subject: [PATCH] remove unused variables, add explicit scoping --- app/src/main/java/com/praharsh/vudit/FileViewer.java | 3 +-- app/src/main/java/com/praharsh/vudit/TextViewer.java | 6 +++--- app/src/main/java/com/praharsh/vudit/VideoPlayer.java | 4 ++-- .../main/java/com/praharsh/vudit/WebViewBaseActivity.java | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/praharsh/vudit/FileViewer.java b/app/src/main/java/com/praharsh/vudit/FileViewer.java index d6b0666..8d3617b 100644 --- a/app/src/main/java/com/praharsh/vudit/FileViewer.java +++ b/app/src/main/java/com/praharsh/vudit/FileViewer.java @@ -866,7 +866,7 @@ public void onCancel(DialogInterface dialogInterface) { } }); player_dialog.setView(player); - final AlertDialog ad = player_dialog.show(); + player_dialog.show(); } else { showMsg("Invalid music file", 1); } @@ -1550,7 +1550,6 @@ private void listMediaFiles(int type) { String toolbarTitle = ""; String selectionQuery = null; String[] selectionArgs = null; - int i, n; switch (type) { case 1: //images uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; diff --git a/app/src/main/java/com/praharsh/vudit/TextViewer.java b/app/src/main/java/com/praharsh/vudit/TextViewer.java index fd8a035..6364806 100644 --- a/app/src/main/java/com/praharsh/vudit/TextViewer.java +++ b/app/src/main/java/com/praharsh/vudit/TextViewer.java @@ -12,7 +12,7 @@ import static android.net.Uri.encode; public class TextViewer extends WebViewBaseActivity { - String file_text; + private String file_text; @Override protected void onCreate(Bundle savedInstanceState) { @@ -42,8 +42,8 @@ protected void onCreate(Bundle savedInstanceState) { } class WebAppInterface { - Context mContext; - String text; + private Context mContext; + private String text; WebAppInterface(Context c, String file_text) { mContext = c; diff --git a/app/src/main/java/com/praharsh/vudit/VideoPlayer.java b/app/src/main/java/com/praharsh/vudit/VideoPlayer.java index abecaf8..2e0d68b 100644 --- a/app/src/main/java/com/praharsh/vudit/VideoPlayer.java +++ b/app/src/main/java/com/praharsh/vudit/VideoPlayer.java @@ -10,8 +10,8 @@ import android.widget.VideoView; public class VideoPlayer extends Activity { - VideoView vw; - Uri video; + private VideoView vw; + private Uri video; @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/app/src/main/java/com/praharsh/vudit/WebViewBaseActivity.java b/app/src/main/java/com/praharsh/vudit/WebViewBaseActivity.java index ca7e382..77bea21 100644 --- a/app/src/main/java/com/praharsh/vudit/WebViewBaseActivity.java +++ b/app/src/main/java/com/praharsh/vudit/WebViewBaseActivity.java @@ -13,7 +13,7 @@ import android.webkit.WebViewClient; public class WebViewBaseActivity extends AppCompatActivity { - WebView wv; + private WebView wv; @Override protected void onCreate(Bundle savedInstanceState) {