From e4bec3dfe7966c76a0d959d6898585b69e40f865 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Thu, 3 Aug 2017 15:44:46 +0900 Subject: [PATCH] [Tizen] call base.OnXXX when getting lifecycle callback call base.OnXXX when getting lifecycle callback. Plus, add Paused / Resumed event to NUIApplication to follow CoreUIApplication. Change-Id: I2c471b6b4d6560bbd24c04cc678305a770bcaaeb Signed-off-by: minho.sun --- src/Tizen.NUI/src/public/NUIApplication.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index af6f261..84c21b5 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -29,9 +29,20 @@ namespace Tizen.NUI public class NUIApplication : CoreApplication { /// + /// Occurs whenever the application is resumed. + /// + public event EventHandler Resumed; + + /// + /// Occurs whenever the application is paused. + /// + public event EventHandler Paused; + + /// /// The instance of ResourceManager. /// private static System.Resources.ResourceManager resourceManager = null; + /// /// The default constructor. /// @@ -58,6 +69,8 @@ namespace Tizen.NUI /// protected override void OnLocaleChanged(LocaleChangedEventArgs e) { + Log.Debug("NUI", "OnLocaleChanged() is called!"); + base.OnLocaleChanged(e); } /// @@ -66,6 +79,7 @@ namespace Tizen.NUI protected override void OnLowBattery(LowBatteryEventArgs e) { Log.Debug("NUI", "OnLowBattery() is called!"); + base.OnLowBattery(e); } /// @@ -74,6 +88,7 @@ namespace Tizen.NUI protected override void OnLowMemory(LowMemoryEventArgs e) { Log.Debug("NUI", "OnLowMemory() is called!"); + base.OnLowMemory(e); } /// @@ -82,6 +97,7 @@ namespace Tizen.NUI protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e) { Log.Debug("NUI", "OnRegionFormatChanged() is called!"); + base.OnRegionFormatChanged(e); } /// @@ -90,6 +106,7 @@ namespace Tizen.NUI protected override void OnTerminate() { Log.Debug("NUI", "OnTerminate() is called!"); + base.OnTerminate(); } /// @@ -97,6 +114,8 @@ namespace Tizen.NUI /// protected virtual void OnPause() { + Log.Debug("NUI", "OnPause() is called!"); + Paused?.Invoke(this, EventArgs.Empty); } /// @@ -104,6 +123,8 @@ namespace Tizen.NUI /// protected virtual void OnResume() { + Log.Debug("NUI", "OnResume() is called!"); + Resumed?.Invoke(this, EventArgs.Empty); } /// @@ -111,6 +132,7 @@ namespace Tizen.NUI /// protected virtual void OnPreCreate() { + Log.Debug("NUI", "OnPreCreate() is called!"); } /// @@ -124,6 +146,7 @@ namespace Tizen.NUI Log.Debug("NUI", "OnAppControlReceived() is called! ApplicationId=" + e.ReceivedAppControl.ApplicationId); Log.Debug("NUI", "CallerApplicationId=" + e.ReceivedAppControl.CallerApplicationId + " IsReplyRequest=" + e.ReceivedAppControl.IsReplyRequest); } + base.OnAppControlReceived(e); } /// @@ -135,6 +158,7 @@ namespace Tizen.NUI DisposeQueue disposeQ = DisposeQueue.Instance; disposeQ.Initialize(); Log.Debug("NUI","OnCreate() is called!"); + base.OnCreate(); } /// -- 2.7.4