Code cleanup
This commit is contained in:
parent
6a90340b14
commit
c5a73a5c19
@ -13,7 +13,6 @@ import android.support.design.widget.TabLayout;
|
|||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentPagerAdapter;
|
import android.support.v4.app.FragmentPagerAdapter;
|
||||||
import android.support.v4.provider.DocumentFile;
|
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -23,21 +22,10 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ProgressBar;
|
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.Module;
|
||||||
import com.topjohnwu.magisk.module.RepoHelper;
|
import com.topjohnwu.magisk.module.RepoHelper;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
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.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@ -69,8 +57,6 @@ public class ModulesFragment extends Fragment {
|
|||||||
View view = inflater.inflate(R.layout.modules_fragment, container, false);
|
View view = inflater.inflate(R.layout.modules_fragment, container, false);
|
||||||
|
|
||||||
ButterKnife.bind(this, view);
|
ButterKnife.bind(this, view);
|
||||||
String[] extensions = new String[1];
|
|
||||||
extensions[0] = "zip";
|
|
||||||
fabio.setOnClickListener(v -> {
|
fabio.setOnClickListener(v -> {
|
||||||
Intent fileintent = new Intent(Intent.ACTION_GET_CONTENT);
|
Intent fileintent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||||
fileintent.setType("application/zip");
|
fileintent.setType("application/zip");
|
||||||
@ -101,7 +87,7 @@ public class ModulesFragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
String file = "";
|
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())) {
|
if (isExternalStorageDocument(data.getData())) {
|
||||||
final String docId = DocumentsContract.getDocumentId(data.getData());
|
final String docId = DocumentsContract.getDocumentId(data.getData());
|
||||||
final String[] split = docId.split(":");
|
final String[] split = docId.split(":");
|
||||||
@ -115,7 +101,7 @@ public class ModulesFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
String shit = data.getDataString();
|
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() {
|
private void RefreshUI() {
|
||||||
viewPagePosition = tabLayout.getSelectedTabPosition();
|
viewPagePosition = tabLayout.getSelectedTabPosition();
|
||||||
listModules.clear();
|
listModules.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user