Skip to content

Commit

Permalink
Fixed restarting service registry and cleaning event listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
igrek51 committed Oct 19, 2016
1 parent 699c54c commit 630a9dc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/igrek/songbook/logger/Logs.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class Logs {

private static final String LOG_TAG = "ylog";
private static final boolean SHOW_EXCEPTIONS_TRACE = true;
private static final LogLevel SHOW_TRACE_DETAILS_LEVEL = LogLevel.TRACE;
private static final LogLevel SHOW_TRACE_DETAILS_LEVEL = LogLevel.DEBUG;

private static List<String> echoes;
private static int errors = 0;
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/java/igrek/songbook/logic/app/BaseApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import android.view.WindowManager;

import igrek.songbook.logger.Logs;
import igrek.songbook.logic.controller.AppController;

public abstract class BaseApp {

Expand All @@ -26,6 +27,9 @@ public abstract class BaseApp {
public BaseApp(AppCompatActivity aActivity) {
this.activity = aActivity;

// WYCZYSZCZENIE REJESTRU USŁUG I LISTENERÓW EVENTÓW
new AppController();

//łapanie niezłapanych wyjątków
defaultUEH = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public class AppController {

private static AppController instance = null;

/**
* Reset instacji rejestru usług i wyczyszczenie listenerów eventów
*/
public AppController() {
servicesRegistry = new ServicesRegistry();
eventDispatcher = new EventDispatcher();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class FileTreeManager {

private String currentPath;
private String currentPath = null;
private String currentFileName = null;

private List<FileItem> items;
Expand All @@ -23,6 +23,7 @@ public FileTreeManager(String startPath) {

Filesystem filesystem = AppController.getService(Filesystem.class);

currentPath = null;
setCurrentPathIfNotSet(filesystem, startPath);
if (currentPath == null) {
Logs.warn("not existing starting directory: " + startPath + ", getting default");
Expand Down
Binary file removed release/SongBook-1.2.32.apk
Binary file not shown.
Binary file added release/SongBook-1.2.43.apk
Binary file not shown.
File renamed without changes.

0 comments on commit 630a9dc

Please sign in to comment.