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.
This commit is contained in:
parent
9fb0d9a664
commit
bb3f61296e
|
@ -391,13 +391,19 @@ public final class NativeLibrary
|
||||||
|
|
||||||
public static void endEmulationActivity()
|
public static void endEmulationActivity()
|
||||||
{
|
{
|
||||||
Log.verbose("[NativeLibrary]Ending EmulationActivity.");
|
Log.verbose("[NativeLibrary] Ending EmulationActivity.");
|
||||||
sEmulationActivity.exitWithAnimation();
|
sEmulationActivity.exitWithAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setEmulationActivity(EmulationActivity emulationActivity)
|
public static void setEmulationActivity(EmulationActivity emulationActivity)
|
||||||
{
|
{
|
||||||
Log.verbose("[NativeLibrary]Registering EmulationActivity.");
|
Log.verbose("[NativeLibrary] Registering EmulationActivity.");
|
||||||
sEmulationActivity = emulationActivity;
|
sEmulationActivity = emulationActivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void clearEmulationActivity()
|
||||||
|
{
|
||||||
|
Log.verbose("[NativeLibrary] Unregistering EmulationActivity.");
|
||||||
|
sEmulationActivity = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,7 +332,7 @@ public final class EmulationActivity extends AppCompatActivity
|
||||||
super.onStop();
|
super.onStop();
|
||||||
Log.debug("[EmulationActivity] EmulationActivity stopping.");
|
Log.debug("[EmulationActivity] EmulationActivity stopping.");
|
||||||
|
|
||||||
NativeLibrary.setEmulationActivity(null);
|
NativeLibrary.clearEmulationActivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue