From c5a73a5c1977c9316642d8a810c8560e249ef6d6 Mon Sep 17 00:00:00 2001 From: d8ahazard Date: Wed, 14 Sep 2016 17:29:35 -0500 Subject: [PATCH] Code cleanup --- .../com/topjohnwu/magisk/ModulesFragment.java | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java index 1ecf536e2..3404bd956 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ModulesFragment.java @@ -13,7 +13,6 @@ import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.provider.DocumentFile; import android.support.v4.view.ViewPager; import android.util.Log; import android.view.LayoutInflater; @@ -23,21 +22,10 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; - -import com.github.angads25.filepicker.controller.DialogSelectionListener; -import com.github.angads25.filepicker.model.DialogConfigs; -import com.github.angads25.filepicker.model.DialogProperties; -import com.github.angads25.filepicker.view.FilePickerDialog; import com.topjohnwu.magisk.module.Module; import com.topjohnwu.magisk.module.RepoHelper; import com.topjohnwu.magisk.utils.Utils; -import com.topjohnwu.magisk.utils.lib; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -69,8 +57,6 @@ public class ModulesFragment extends Fragment { View view = inflater.inflate(R.layout.modules_fragment, container, false); ButterKnife.bind(this, view); - String[] extensions = new String[1]; - extensions[0] = "zip"; fabio.setOnClickListener(v -> { Intent fileintent = new Intent(Intent.ACTION_GET_CONTENT); fileintent.setType("application/zip"); @@ -101,21 +87,21 @@ public class ModulesFragment extends Fragment { @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { String file = ""; - if(resultCode == Activity.RESULT_OK && requestCode == RQS_OPEN_DOCUMENT_TREE){ + if (resultCode == Activity.RESULT_OK && requestCode == RQS_OPEN_DOCUMENT_TREE) { if (isExternalStorageDocument(data.getData())) { final String docId = DocumentsContract.getDocumentId(data.getData()); final String[] split = docId.split(":"); final String type = split[0]; if ("primary".equalsIgnoreCase(type)) { - file = Environment.getExternalStorageDirectory() + "/" + split[1]; + file = Environment.getExternalStorageDirectory() + "/" + split[1]; } // TODO handle non-primary volumes } String shit = data.getDataString(); - Log.d("Magisk","ModulesFragment: Got a result, " + shit + " and " + data.getData().getAuthority() + " and " + file); + Log.d("Magisk", "ModulesFragment: Got a result, " + shit + " and " + data.getData().getAuthority() + " and " + file); } } @@ -129,8 +115,6 @@ public class ModulesFragment extends Fragment { } - - private void RefreshUI() { viewPagePosition = tabLayout.getSelectedTabPosition(); listModules.clear();