diff --git a/services/ans/src/notification_preferences.cpp b/services/ans/src/notification_preferences.cpp index 86f6e0c46992d8d08aa60365727ddcba7e477b25..79a08c11296b91e8d9f498c46d7b3ef1b3836864 100644 --- a/services/ans/src/notification_preferences.cpp +++ b/services/ans/src/notification_preferences.cpp @@ -831,7 +831,7 @@ ErrCode NotificationPreferences::SetDistributedEnabledByBundle(const sptrGetBundleName()); bundleInfo.SetBundleUid(bundleOption->GetUid()); - bundleInfo.SetEnableNotification(CheckApiCompatibility(bundleOption)); + bool storeDBResult = true; storeDBResult = preferncesDB_->PutDistributedEnabledForBundle(deviceType, bundleInfo, enabled); return storeDBResult ? ERR_OK : ERR_ANS_PREFERENCES_NOTIFICATION_DB_OPERATION_FAILED; @@ -849,7 +849,7 @@ ErrCode NotificationPreferences::IsDistributedEnabledByBundle(const sptrGetBundleName()); bundleInfo.SetBundleUid(bundleOption->GetUid()); - bundleInfo.SetEnableNotification(CheckApiCompatibility(bundleOption)); + bool storeDBResult = true; storeDBResult = preferncesDB_->GetDistributedEnabledForBundle(deviceType, bundleInfo, enabled); return storeDBResult ? ERR_OK : ERR_ANS_PREFERENCES_NOTIFICATION_DB_OPERATION_FAILED;