From e6f7ab425dfddfe7a0b6e7a44af3802127642407 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Fri, 8 Dec 2017 11:59:44 +0900 Subject: [PATCH] [Packagemanager] Fix bug on package event handling Fix wrong condition of event registering/unregistering. Change-Id: Ie9be99622c7e6dc1d923d0f27bae7298b478d015 Signed-off-by: Sangyoon Jang (cherry picked from commit 116bc27c699fa7754a21b92186635d63c07ba604) --- .../Tizen.Applications/PackageManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs index 2b10511..ed6e043 100644 --- a/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs +++ b/src/Tizen.Applications.PackageManager/Tizen.Applications/PackageManager.cs @@ -1101,7 +1101,7 @@ namespace Tizen.Applications private static void RegisterPackageManagerEventIfNeeded() { - if (s_packageManagerEventCallback != null) + if (s_installEventHandler != null && s_uninstallEventHandler != null && s_updateEventHandler != null && s_moveEventHandler != null && s_clearDataEventHandler != null) return; var err = Interop.PackageManager.ErrorCode.None; @@ -1157,7 +1157,7 @@ namespace Tizen.Applications private static void UnregisterPackageManagerEventIfNeeded() { - if (Handle.IsInvalid || s_packageManagerEventCallback == null || s_installEventHandler != null || s_uninstallEventHandler != null || s_updateEventHandler != null || s_moveEventHandler != null || s_clearDataEventHandler != null) + if (s_packageManagerEventCallback == null || s_installEventHandler != null || s_uninstallEventHandler != null || s_updateEventHandler != null || s_moveEventHandler != null || s_clearDataEventHandler != null) { return; } -- 2.7.4