From bb3f61296e8a436cc2543a9211e96081e07943ab Mon Sep 17 00:00:00 2001 From: Mike Harris Date: Wed, 4 Oct 2017 22:48:27 -0700 Subject: [PATCH] Add a clearEmulation method. This makes it clear that the Activity is being cleared and removes null as a valid param. This improves readability (and logging slightly). Fix spacing between [Tag] and message. This matches the rest of the log messages. --- .../java/org/dolphinemu/dolphinemu/NativeLibrary.java | 10 ++++++++-- .../dolphinemu/activities/EmulationActivity.java | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java index 614a1076f6..6df525e4bc 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/NativeLibrary.java @@ -391,13 +391,19 @@ public final class NativeLibrary public static void endEmulationActivity() { - Log.verbose("[NativeLibrary]Ending EmulationActivity."); + Log.verbose("[NativeLibrary] Ending EmulationActivity."); sEmulationActivity.exitWithAnimation(); } public static void setEmulationActivity(EmulationActivity emulationActivity) { - Log.verbose("[NativeLibrary]Registering EmulationActivity."); + Log.verbose("[NativeLibrary] Registering EmulationActivity."); sEmulationActivity = emulationActivity; } + + public static void clearEmulationActivity() + { + Log.verbose("[NativeLibrary] Unregistering EmulationActivity."); + sEmulationActivity = null; + } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 06370c0028..773e0a7880 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -332,7 +332,7 @@ public final class EmulationActivity extends AppCompatActivity super.onStop(); Log.debug("[EmulationActivity] EmulationActivity stopping."); - NativeLibrary.setEmulationActivity(null); + NativeLibrary.clearEmulationActivity(); } @Override