0.9.2 intstaller crash on startup fix
This commit is contained in:
parent
8bca8c2082
commit
8091d0934b
|
@ -85,6 +85,11 @@ public class ConfigEditorFragment extends Fragment {
|
||||||
private void getModFiles()
|
private void getModFiles()
|
||||||
{
|
{
|
||||||
File modFolder = new File(MOD_DIR);
|
File modFolder = new File(MOD_DIR);
|
||||||
|
|
||||||
|
//Make the directory in case it's not there
|
||||||
|
if (!modFolder.exists())
|
||||||
|
modFolder.mkdir();
|
||||||
|
|
||||||
for (File file : modFolder.listFiles())
|
for (File file : modFolder.listFiles())
|
||||||
{
|
{
|
||||||
recursiveFileCheck(file);
|
recursiveFileCheck(file);
|
||||||
|
|
|
@ -49,6 +49,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.view_pager);
|
setContentView(R.layout.view_pager);
|
||||||
|
|
||||||
|
//Request the permissions for storage first.
|
||||||
|
requestPermissions();
|
||||||
|
|
||||||
//Find the ViewPager and TabLayout ids
|
//Find the ViewPager and TabLayout ids
|
||||||
mViewPager = findViewById(R.id.view_pager);
|
mViewPager = findViewById(R.id.view_pager);
|
||||||
mTabLayout = findViewById(R.id.tab_layout);
|
mTabLayout = findViewById(R.id.tab_layout);
|
||||||
|
@ -64,9 +67,6 @@ public class MainActivity extends AppCompatActivity {
|
||||||
//Setup the ViewPager adapter and TabLayout with ViewPager
|
//Setup the ViewPager adapter and TabLayout with ViewPager
|
||||||
mViewPager.setAdapter(mTabAdapter);
|
mViewPager.setAdapter(mTabAdapter);
|
||||||
mTabLayout.setupWithViewPager(mViewPager);
|
mTabLayout.setupWithViewPager(mViewPager);
|
||||||
|
|
||||||
//Request the permissions for storage access
|
|
||||||
requestPermissions();
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue