Fix for new Config editor on Amazon Devices
This commit is contained in:
parent
e1636754fd
commit
eaf487b54c
|
@ -1,14 +1,19 @@
|
||||||
package com.MartyrPher.smapiandroidinstaller;
|
package com.MartyrPher.smapiandroidinstaller;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Environment;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fragment that shows the Install Button
|
* Fragment that shows the Install Button
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +40,8 @@ public class InstallFragment extends Fragment {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
//Start button, one click install. Can't beat it.
|
//Start button, one click install. Can't beat it.
|
||||||
final Button start_button = view.findViewById(R.id.start_button);
|
final Button start_button = view.findViewById(R.id.start_button);
|
||||||
|
@ -68,6 +75,22 @@ public class InstallFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
//Try to log a crash in onCreate()
|
||||||
|
File logFile = new File(Environment.getExternalStorageDirectory() + "/SMAPI Installer/crash.txt");
|
||||||
|
try {
|
||||||
|
FileOutputStream stream = new FileOutputStream(logFile);
|
||||||
|
stream.write(e.getMessage().getBytes());
|
||||||
|
stream.close();
|
||||||
|
}
|
||||||
|
catch(Exception er)
|
||||||
|
{
|
||||||
|
Log.e("InstallFrag", er.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue