Loading .idea/codeStyles/Project.xml 0 → 100644 +116 −0 Original line number Diff line number Diff line <component name="ProjectCodeStyleConfiguration"> <code_scheme name="Project" version="173"> <codeStyleSettings language="XML"> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="4" /> </indentOptions> <arrangement> <rules> <section> <rule> <match> <AND> <NAME>xmlns:android</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>xmlns:.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*:id</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>.*:name</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>name</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>style</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> <order>ANDROID_ATTRIBUTE_ORDER</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>.*</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> </rules> </arrangement> </codeStyleSettings> </code_scheme> </component> No newline at end of file app/src/main/java/foundation/e/drive/utils/ServiceExceptionHandler.java +11 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ package foundation.e.drive.utils; import android.app.Service; import android.os.Environment; import android.util.Log; import java.io.File; import java.io.FileOutputStream; Loading @@ -26,11 +27,11 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ public ServiceExceptionHandler(Service service) { this.service = service; defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); } @Override public void uncaughtException(Thread t, Throwable e) { e.printStackTrace(); if(isExternalStorageAvailable() && !isExternalStorageReadOnly()){ //Get TimeStamp Loading @@ -48,6 +49,14 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ exception.printStackTrace(); } } //source: https://stackoverflow.com/questions/9050962/rethrow-uncaughtexceptionhandler-exception-after-logging-it/9050990#9050990 if(defaultUEH != null){ defaultUEH.uncaughtException(t, e); }else{ Log.d("ServiceExceptionHandler", "/e/ Drive has crashed and there is no ExceptionHandler"); System.exit(1); //Kill /e/ Drive... } } //source: https://www.journaldev.com/9400/android-external-storage-read-write-save-file Loading @@ -58,6 +67,7 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ } return false; } //source: https://www.journaldev.com/9400/android-external-storage-read-write-save-file private static boolean isExternalStorageReadOnly() { String extStorageState = Environment.getExternalStorageState(); Loading Loading
.idea/codeStyles/Project.xml 0 → 100644 +116 −0 Original line number Diff line number Diff line <component name="ProjectCodeStyleConfiguration"> <code_scheme name="Project" version="173"> <codeStyleSettings language="XML"> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="4" /> </indentOptions> <arrangement> <rules> <section> <rule> <match> <AND> <NAME>xmlns:android</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>xmlns:.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*:id</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>.*:name</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>name</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>style</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>^$</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE> </AND> </match> <order>ANDROID_ATTRIBUTE_ORDER</order> </rule> </section> <section> <rule> <match> <AND> <NAME>.*</NAME> <XML_ATTRIBUTE /> <XML_NAMESPACE>.*</XML_NAMESPACE> </AND> </match> <order>BY_NAME</order> </rule> </section> </rules> </arrangement> </codeStyleSettings> </code_scheme> </component> No newline at end of file
app/src/main/java/foundation/e/drive/utils/ServiceExceptionHandler.java +11 −1 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ package foundation.e.drive.utils; import android.app.Service; import android.os.Environment; import android.util.Log; import java.io.File; import java.io.FileOutputStream; Loading @@ -26,11 +27,11 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ public ServiceExceptionHandler(Service service) { this.service = service; defaultUEH = Thread.getDefaultUncaughtExceptionHandler(); } @Override public void uncaughtException(Thread t, Throwable e) { e.printStackTrace(); if(isExternalStorageAvailable() && !isExternalStorageReadOnly()){ //Get TimeStamp Loading @@ -48,6 +49,14 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ exception.printStackTrace(); } } //source: https://stackoverflow.com/questions/9050962/rethrow-uncaughtexceptionhandler-exception-after-logging-it/9050990#9050990 if(defaultUEH != null){ defaultUEH.uncaughtException(t, e); }else{ Log.d("ServiceExceptionHandler", "/e/ Drive has crashed and there is no ExceptionHandler"); System.exit(1); //Kill /e/ Drive... } } //source: https://www.journaldev.com/9400/android-external-storage-read-write-save-file Loading @@ -58,6 +67,7 @@ public class ServiceExceptionHandler implements UncaughtExceptionHandler{ } return false; } //source: https://www.journaldev.com/9400/android-external-storage-read-write-save-file private static boolean isExternalStorageReadOnly() { String extStorageState = Environment.getExternalStorageState(); Loading