diff --git a/OAT.xml b/OAT.xml
index 78d6121297f7b5a729a2ab4ad3ee2a1e44b7aa81..40b888b56532e719775f2237f805ea8182088e8f 100644
--- a/OAT.xml
+++ b/OAT.xml
@@ -62,6 +62,10 @@ Note:If the text contains special characters, please escape them according to th
+
+
+
+
diff --git a/frameworks/ans/core/src/ans_manager_proxy.cpp b/frameworks/ans/core/src/ans_manager_proxy.cpp
index 70293f09e2b74945c96c5b1c59578287c9a74f1b..1024478b10d6ebe39fad7ac82eeb01158dd61275 100644
--- a/frameworks/ans/core/src/ans_manager_proxy.cpp
+++ b/frameworks/ans/core/src/ans_manager_proxy.cpp
@@ -35,23 +35,23 @@ AnsManagerProxy::~AnsManagerProxy()
ErrCode AnsManagerProxy::Publish(const std::string &label, const sptr ¬ification)
{
if (notification == nullptr) {
- ANS_LOGW("[Publish] fail: notification is null ptr.");
+ ANS_LOGE("[Publish] fail: notification is null ptr.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[Publish] fail: write interface token failed.");
+ ANS_LOGE("[Publish] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(label)) {
- ANS_LOGW("[Publish] fail: write label failed.");
+ ANS_LOGE("[Publish] fail: write label failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[Publish] fail: write notification parcelable failed");
+ ANS_LOGE("[Publish] fail: write notification parcelable failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -59,12 +59,12 @@ ErrCode AnsManagerProxy::Publish(const std::string &label, const sptr ¬ification, const std::string &deviceId)
{
if (notification == nullptr) {
- ANS_LOGW("[PublishToDevice] fail: notification is null ptr.");
+ ANS_LOGE("[PublishToDevice] fail: notification is null ptr.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[PublishToDevice] fail: write interface token failed.");
+ ANS_LOGE("[PublishToDevice] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[PublishToDevice] fail: write notification parcelable failed.");
+ ANS_LOGE("[PublishToDevice] fail: write notification parcelable failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(deviceId)) {
- ANS_LOGW("[PublishToDevice] fail: write deviceId failed");
+ ANS_LOGE("[PublishToDevice] fail: write deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -98,12 +98,12 @@ ErrCode AnsManagerProxy::PublishToDevice(const sptr ¬ifi
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(PUBLISH_NOTIFICATION_TO_DEVICE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[PublishToDevice] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[PublishToDevice] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[PublishToDevice] fail: read result failed.");
+ ANS_LOGE("[PublishToDevice] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -114,17 +114,17 @@ ErrCode AnsManagerProxy::Cancel(int32_t notificationId, const std::string &label
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[Cancel] fail: write interface token failed.");
+ ANS_LOGE("[Cancel] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(notificationId)) {
- ANS_LOGW("[Cancel] fail: write notificationId failed");
+ ANS_LOGE("[Cancel] fail: write notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(label)) {
- ANS_LOGW("[Cancel] fail: write label failed");
+ ANS_LOGE("[Cancel] fail: write label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -132,12 +132,12 @@ ErrCode AnsManagerProxy::Cancel(int32_t notificationId, const std::string &label
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(CANCEL_NOTIFICATION, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[Cancel] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[Cancel] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[Cancel] fail: read result failed.");
+ ANS_LOGE("[Cancel] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -148,7 +148,7 @@ ErrCode AnsManagerProxy::CancelAll()
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[CancelAll] fail: write interface token failed.");
+ ANS_LOGE("[CancelAll] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -156,12 +156,12 @@ ErrCode AnsManagerProxy::CancelAll()
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(CANCEL_ALL_NOTIFICATIONS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[CancelAll] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[CancelAll] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[CancelAll] fail: read result failed.");
+ ANS_LOGE("[CancelAll] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -173,22 +173,22 @@ ErrCode AnsManagerProxy::CancelAsBundle(
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[CancelAsBundle] fail: write interface token failed.");
+ ANS_LOGE("[CancelAsBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(notificationId)) {
- ANS_LOGW("[CancelAsBundle] fail: write notificationId failed");
+ ANS_LOGE("[CancelAsBundle] fail: write notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(representativeBundle)) {
- ANS_LOGW("[CancelAsBundle] fail: write representativeBundle failed");
+ ANS_LOGE("[CancelAsBundle] fail: write representativeBundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(userId)) {
- ANS_LOGW("[CancelAsBundle] fail: write userId failed");
+ ANS_LOGE("[CancelAsBundle] fail: write userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -196,12 +196,12 @@ ErrCode AnsManagerProxy::CancelAsBundle(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(CANCEL_AS_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[CancelAsBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[CancelAsBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[CancelAsBundle] fail: read result failed.");
+ ANS_LOGE("[CancelAsBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -212,12 +212,12 @@ ErrCode AnsManagerProxy::AddSlotByType(NotificationConstant::SlotType slotType)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[AddSlotByType] fail: write interface token failed.");
+ ANS_LOGE("[AddSlotByType] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(slotType)) {
- ANS_LOGW("[AddSlotByType] fail:: write slotIds failed.");
+ ANS_LOGE("[AddSlotByType] fail:: write slotIds failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -225,12 +225,12 @@ ErrCode AnsManagerProxy::AddSlotByType(NotificationConstant::SlotType slotType)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(ADD_SLOT_BY_TYPE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[AddSlotByType] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[AddSlotByType] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[AddSlotByType] fail: read result failed.");
+ ANS_LOGE("[AddSlotByType] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -240,24 +240,24 @@ ErrCode AnsManagerProxy::AddSlotByType(NotificationConstant::SlotType slotType)
ErrCode AnsManagerProxy::AddSlots(const std::vector> &slots)
{
if (slots.empty()) {
- ANS_LOGW("[AddSlots] fail: slots is empty.");
+ ANS_LOGE("[AddSlots] fail: slots is empty.");
return ERR_ANS_INVALID_PARAM;
}
size_t slotsSize = slots.size();
if (slotsSize > MAX_SLOT_NUM) {
- ANS_LOGW("[AddSlots] fail: slotsSize over max size.");
+ ANS_LOGE("[AddSlots] fail: slotsSize over max size.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[AddSlots] fail: write interface token failed.");
+ ANS_LOGE("[AddSlots] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!WriteParcelableVector(slots, data)) {
- ANS_LOGW("[AddSlots] fail: write slots failed");
+ ANS_LOGE("[AddSlots] fail: write slots failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -265,12 +265,12 @@ ErrCode AnsManagerProxy::AddSlots(const std::vector> &slo
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(ADD_SLOTS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[AddSlots] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[AddSlots] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[AddSlots] fail: read result failed.");
+ ANS_LOGE("[AddSlots] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -281,12 +281,12 @@ ErrCode AnsManagerProxy::RemoveSlotByType(const NotificationConstant::SlotType &
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RemoveSlotByType] fail: write interface token failed.");
+ ANS_LOGE("[RemoveSlotByType] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(slotType)) {
- ANS_LOGW("[RemoveSlotByType] fail:: write slotIds failed.");
+ ANS_LOGE("[RemoveSlotByType] fail:: write slotIds failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -294,12 +294,12 @@ ErrCode AnsManagerProxy::RemoveSlotByType(const NotificationConstant::SlotType &
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(REMOVE_SLOT_BY_TYPE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[RemoveSlotByType] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[RemoveSlotByType] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[RemoveSlotByType] fail: read result failed.");
+ ANS_LOGE("[RemoveSlotByType] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -310,7 +310,7 @@ ErrCode AnsManagerProxy::RemoveAllSlots()
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RemoveAllSlots] fail: write interface token failed.");
+ ANS_LOGE("[RemoveAllSlots] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -318,12 +318,12 @@ ErrCode AnsManagerProxy::RemoveAllSlots()
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(REMOVE_ALL_SLOTS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[RemoveAllSlots] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[RemoveAllSlots] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[RemoveAllSlots] fail: read result failed.");
+ ANS_LOGE("[RemoveAllSlots] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -333,24 +333,24 @@ ErrCode AnsManagerProxy::RemoveAllSlots()
ErrCode AnsManagerProxy::AddSlotGroups(std::vector> groups)
{
if (groups.empty()) {
- ANS_LOGW("[AddSlotGroups] fail: groups is empty.");
+ ANS_LOGE("[AddSlotGroups] fail: groups is empty.");
return ERR_ANS_INVALID_PARAM;
}
size_t groupsSize = groups.size();
if (groupsSize > MAX_SLOT_GROUP_NUM) {
- ANS_LOGW("[AddSlotGroups] fail: groupsSize over max size.");
+ ANS_LOGE("[AddSlotGroups] fail: groupsSize over max size.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[AddSlotGroups] fail: write interface token failed.");
+ ANS_LOGE("[AddSlotGroups] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!WriteParcelableVector(groups, data)) {
- ANS_LOGW("[AddSlotGroups] fail: write groups failed");
+ ANS_LOGE("[AddSlotGroups] fail: write groups failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -358,12 +358,12 @@ ErrCode AnsManagerProxy::AddSlotGroups(std::vector>
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(ADD_SLOT_GROUPS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[AddSlotGroups] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[AddSlotGroups] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[AddSlotGroups] fail: read result failed.");
+ ANS_LOGE("[AddSlotGroups] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -374,12 +374,12 @@ ErrCode AnsManagerProxy::GetSlotByType(const NotificationConstant::SlotType &slo
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlotByType] fail: write interface token failed.");
+ ANS_LOGE("[GetSlotByType] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(slotType)) {
- ANS_LOGW("[GetSlotByType] fail:: write slotId failed");
+ ANS_LOGE("[GetSlotByType] fail:: write slotId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -387,19 +387,19 @@ ErrCode AnsManagerProxy::GetSlotByType(const NotificationConstant::SlotType &slo
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SLOT_BY_TYPE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetSlotByType] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetSlotByType] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetSlotByType] fail: read result failed.");
+ ANS_LOGE("[GetSlotByType] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (result == ERR_OK) {
slot = reply.ReadParcelable();
if (slot == nullptr) {
- ANS_LOGW("[GetSlotByType] fail: read slot failed");
+ ANS_LOGE("[GetSlotByType] fail: read slot failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -411,7 +411,7 @@ ErrCode AnsManagerProxy::GetSlots(std::vector> &slots)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlots] fail: write interface token failed.");
+ ANS_LOGE("[GetSlots] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -419,12 +419,12 @@ ErrCode AnsManagerProxy::GetSlots(std::vector> &slots)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SLOTS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetSlots] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetSlots] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!ReadParcelableVector(slots, reply, result)) {
- ANS_LOGW("[GetSlots] fail: read slots failed.");
+ ANS_LOGE("[GetSlots] fail: read slots failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -434,18 +434,18 @@ ErrCode AnsManagerProxy::GetSlots(std::vector> &slots)
ErrCode AnsManagerProxy::GetSlotGroup(const std::string &groupId, sptr &group)
{
if (groupId.empty()) {
- ANS_LOGW("[GetSlotGroup] fail: groupId is null.");
+ ANS_LOGE("[GetSlotGroup] fail: groupId is null.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlotGroup] fail: write interface token failed.");
+ ANS_LOGE("[GetSlotGroup] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(groupId)) {
- ANS_LOGW("[GetSlotGroup] fail:: write groupId failed");
+ ANS_LOGE("[GetSlotGroup] fail:: write groupId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -453,19 +453,19 @@ ErrCode AnsManagerProxy::GetSlotGroup(const std::string &groupId, sptr();
if (group == nullptr) {
- ANS_LOGW("[GetSlotGroup] fail: read group failed");
+ ANS_LOGE("[GetSlotGroup] fail: read group failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -477,7 +477,7 @@ ErrCode AnsManagerProxy::GetSlotGroups(std::vector>
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlotGroups] fail: write interface token failed.");
+ ANS_LOGE("[GetSlotGroups] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -485,12 +485,12 @@ ErrCode AnsManagerProxy::GetSlotGroups(std::vector>
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SLOT_GROUPS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetSlotGroups] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetSlotGroups] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!ReadParcelableVector(groups, reply, result)) {
- ANS_LOGW("[GetSlotGroups] fail: read groups failed.");
+ ANS_LOGE("[GetSlotGroups] fail: read groups failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -500,18 +500,18 @@ ErrCode AnsManagerProxy::GetSlotGroups(std::vector>
ErrCode AnsManagerProxy::GetSlotNumAsBundle(const sptr &bundleOption, uint64_t &num)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[GetSlotNumAsBundle] fail: bundle is empty.");
+ ANS_LOGE("[GetSlotNumAsBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlotNumAsBundle] fail: write interface token failed.");
+ ANS_LOGE("[GetSlotNumAsBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[GetSlotNumAsBundle] fail:: write bundle failed");
+ ANS_LOGE("[GetSlotNumAsBundle] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -519,17 +519,17 @@ ErrCode AnsManagerProxy::GetSlotNumAsBundle(const sptr
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SLOT_NUM_AS_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail: read result failed.");
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadUint64(num)) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail: read enabled failed.");
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -539,18 +539,18 @@ ErrCode AnsManagerProxy::GetSlotNumAsBundle(const sptr
ErrCode AnsManagerProxy::RemoveSlotGroups(const std::vector &groupIds)
{
if (groupIds.empty()) {
- ANS_LOGW("[RemoveSlotGroups] fail: groupIds is empty.");
+ ANS_LOGE("[RemoveSlotGroups] fail: groupIds is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RemoveSlotGroups] fail: write interface token failed.");
+ ANS_LOGE("[RemoveSlotGroups] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStringVector(groupIds)) {
- ANS_LOGW("[RemoveSlotGroups] fail:: write groupIds failed");
+ ANS_LOGE("[RemoveSlotGroups] fail:: write groupIds failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -558,12 +558,12 @@ ErrCode AnsManagerProxy::RemoveSlotGroups(const std::vector &groupI
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(REMOVE_SLOT_GROUPS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[RemoveSlotGroups] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[RemoveSlotGroups] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[RemoveSlotGroups] fail: read result failed.");
+ ANS_LOGE("[RemoveSlotGroups] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -574,7 +574,7 @@ ErrCode AnsManagerProxy::GetActiveNotifications(std::vector &key, std::vector> ¬ifications)
{
if (key.empty()) {
- ANS_LOGW("[GetSpecialActiveNotifications] fail: key is empty.");
+ ANS_LOGE("[GetSpecialActiveNotifications] fail: key is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSpecialActiveNotifications] fail: write interface token failed.");
+ ANS_LOGE("[GetSpecialActiveNotifications] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStringVector(key)) {
- ANS_LOGW("[GetSpecialActiveNotifications] fail:: write key failed");
+ ANS_LOGE("[GetSpecialActiveNotifications] fail:: write key failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -670,12 +670,12 @@ ErrCode AnsManagerProxy::GetSpecialActiveNotifications(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SPECIAL_ACTIVE_NOTIFICATIONS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetSpecialActiveNotifications] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetSpecialActiveNotifications] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!ReadParcelableVector(notifications, reply, result)) {
- ANS_LOGW("[GetSpecialActiveNotifications] fail: read notifications failed.");
+ ANS_LOGE("[GetSpecialActiveNotifications] fail: read notifications failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -685,18 +685,18 @@ ErrCode AnsManagerProxy::GetSpecialActiveNotifications(
ErrCode AnsManagerProxy::SetNotificationAgent(const std::string &agent)
{
if (agent.empty()) {
- ANS_LOGW("[SetNotificationAgent] fail: agent is null.");
+ ANS_LOGE("[SetNotificationAgent] fail: agent is null.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationAgent] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationAgent] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(agent)) {
- ANS_LOGW("[SetNotificationAgent] fail:: write agent failed.");
+ ANS_LOGE("[SetNotificationAgent] fail:: write agent failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -704,12 +704,12 @@ ErrCode AnsManagerProxy::SetNotificationAgent(const std::string &agent)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_AGENT, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationAgent] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationAgent] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationAgent] fail: read result failed.");
+ ANS_LOGE("[SetNotificationAgent] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -720,7 +720,7 @@ ErrCode AnsManagerProxy::GetNotificationAgent(std::string &agent)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetNotificationAgent] fail: write interface token failed.");
+ ANS_LOGE("[GetNotificationAgent] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -728,17 +728,17 @@ ErrCode AnsManagerProxy::GetNotificationAgent(std::string &agent)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_NOTIFICATION_AGENT, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetNotificationAgent] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetNotificationAgent] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetNotificationAgent] fail: read result failed.");
+ ANS_LOGE("[GetNotificationAgent] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadString(agent)) {
- ANS_LOGW("[GetNotificationAgent] fail: read agent failed.");
+ ANS_LOGE("[GetNotificationAgent] fail: read agent failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -748,18 +748,18 @@ ErrCode AnsManagerProxy::GetNotificationAgent(std::string &agent)
ErrCode AnsManagerProxy::CanPublishAsBundle(const std::string &representativeBundle, bool &canPublish)
{
if (representativeBundle.empty()) {
- ANS_LOGW("[CanPublishAsBundle] fail: representativeBundle is null.");
+ ANS_LOGE("[CanPublishAsBundle] fail: representativeBundle is null.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[CanPublishAsBundle] fail: write interface token failed.");
+ ANS_LOGE("[CanPublishAsBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(representativeBundle)) {
- ANS_LOGW("[CanPublishAsBundle] fail: write representativeBundle failed.");
+ ANS_LOGE("[CanPublishAsBundle] fail: write representativeBundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -767,17 +767,17 @@ ErrCode AnsManagerProxy::CanPublishAsBundle(const std::string &representativeBun
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(CAN_PUBLISH_AS_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[CanPublishAsBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[CanPublishAsBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[CanPublishAsBundle] fail: read result failed.");
+ ANS_LOGE("[CanPublishAsBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(canPublish)) {
- ANS_LOGW("[CanPublishAsBundle] fail: read canPublish failed.");
+ ANS_LOGE("[CanPublishAsBundle] fail: read canPublish failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -788,28 +788,28 @@ ErrCode AnsManagerProxy::PublishAsBundle(
const sptr notification, const std::string &representativeBundle)
{
if (notification == nullptr) {
- ANS_LOGW("[PublishAsBundle] fail: notification is null ptr.");
+ ANS_LOGE("[PublishAsBundle] fail: notification is null ptr.");
return ERR_ANS_INVALID_PARAM;
}
if (representativeBundle.empty()) {
- ANS_LOGW("[PublishAsBundle] fail: representativeBundle is empty.");
+ ANS_LOGE("[PublishAsBundle] fail: representativeBundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[PublishAsBundle] fail: write interface token failed.");
+ ANS_LOGE("[PublishAsBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[PublishAsBundle] fail: write notification failed.");
+ ANS_LOGE("[PublishAsBundle] fail: write notification failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(representativeBundle)) {
- ANS_LOGW("[PublishAsBundle] fail: write representativeBundle failed.");
+ ANS_LOGE("[PublishAsBundle] fail: write representativeBundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -817,12 +817,12 @@ ErrCode AnsManagerProxy::PublishAsBundle(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(PUBLISH_AS_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[PublishAsBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[PublishAsBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[PublishAsBundle] fail: read result failed.");
+ ANS_LOGE("[PublishAsBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -833,12 +833,12 @@ ErrCode AnsManagerProxy::SetNotificationBadgeNum(int32_t num)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationBadgeNum] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationBadgeNum] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(num)) {
- ANS_LOGW("[SetNotificationBadgeNum] fail: write num failed.");
+ ANS_LOGE("[SetNotificationBadgeNum] fail: write num failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -846,12 +846,12 @@ ErrCode AnsManagerProxy::SetNotificationBadgeNum(int32_t num)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_BADGE_NUM, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationBadgeNum] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationBadgeNum] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationBadgeNum] fail: read result failed.");
+ ANS_LOGE("[SetNotificationBadgeNum] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -862,7 +862,7 @@ ErrCode AnsManagerProxy::GetBundleImportance(int32_t &importance)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetBundleImportance] fail: write interface token failed.");
+ ANS_LOGE("[GetBundleImportance] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -870,17 +870,17 @@ ErrCode AnsManagerProxy::GetBundleImportance(int32_t &importance)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_BUNDLE_IMPORTANCE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetBundleImportance] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetBundleImportance] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetBundleImportance] fail: read result failed.");
+ ANS_LOGE("[GetBundleImportance] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadInt32(importance)) {
- ANS_LOGW("[GetBundleImportance] fail: read importance failed.");
+ ANS_LOGE("[GetBundleImportance] fail: read importance failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -891,7 +891,7 @@ ErrCode AnsManagerProxy::HasNotificationPolicyAccessPermission(bool &granted)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[HasNotificationPolicyAccessPermission] fail: write interface token failed.");
+ ANS_LOGE("[HasNotificationPolicyAccessPermission] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -899,17 +899,17 @@ ErrCode AnsManagerProxy::HasNotificationPolicyAccessPermission(bool &granted)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_NOTIFICATION_POLICY_ACCESS_GRANTED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[HasNotificationPolicyAccessPermission] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[HasNotificationPolicyAccessPermission] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[HasNotificationPolicyAccessPermission] fail: read result failed.");
+ ANS_LOGE("[HasNotificationPolicyAccessPermission] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(granted)) {
- ANS_LOGW("[HasNotificationPolicyAccessPermission] fail: read granted failed.");
+ ANS_LOGE("[HasNotificationPolicyAccessPermission] fail: read granted failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -920,12 +920,12 @@ ErrCode AnsManagerProxy::SetPrivateNotificationsAllowed(bool allow)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetPrivateNotificationsAllowed] fail: write interface token failed.");
+ ANS_LOGE("[SetPrivateNotificationsAllowed] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(allow)) {
- ANS_LOGW("[SetPrivateNotificationsAllowed] fail: write allow failed");
+ ANS_LOGE("[SetPrivateNotificationsAllowed] fail: write allow failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -933,12 +933,12 @@ ErrCode AnsManagerProxy::SetPrivateNotificationsAllowed(bool allow)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_PRIVATIVE_NOTIFICATIONS_ALLOWED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetPrivateNotificationsAllowed] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetPrivateNotificationsAllowed] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetPrivateNotificationsAllowed] fail: read result failed.");
+ ANS_LOGE("[SetPrivateNotificationsAllowed] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -949,7 +949,7 @@ ErrCode AnsManagerProxy::GetPrivateNotificationsAllowed(bool &allow)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetPrivateNotificationsAllowed] fail: write interface token failed.");
+ ANS_LOGE("[GetPrivateNotificationsAllowed] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -957,17 +957,17 @@ ErrCode AnsManagerProxy::GetPrivateNotificationsAllowed(bool &allow)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_PRIVATIVE_NOTIFICATIONS_ALLOWED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetPrivateNotificationsAllowed] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetPrivateNotificationsAllowed] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetPrivateNotificationsAllowed] fail: read result failed.");
+ ANS_LOGE("[GetPrivateNotificationsAllowed] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(allow)) {
- ANS_LOGW("[GetPrivateNotificationsAllowed] fail: read allow failed.");
+ ANS_LOGE("[GetPrivateNotificationsAllowed] fail: read allow failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -978,28 +978,28 @@ ErrCode AnsManagerProxy::RemoveNotification(
const sptr &bundleOption, int32_t notificationId, const std::string &label)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[RemoveNotification] fail: bundle is empty.");
+ ANS_LOGE("[RemoveNotification] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RemoveNotification] fail:, write interface token failed.");
+ ANS_LOGE("[RemoveNotification] fail:, write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[RemoveNotification] fail:: write bundle failed");
+ ANS_LOGE("[RemoveNotification] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(notificationId)) {
- ANS_LOGW("[RemoveNotification] fail: write notificationId failed");
+ ANS_LOGE("[RemoveNotification] fail: write notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(label)) {
- ANS_LOGW("[RemoveNotification] fail: write label failed");
+ ANS_LOGE("[RemoveNotification] fail: write label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1007,12 +1007,12 @@ ErrCode AnsManagerProxy::RemoveNotification(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(REMOVE_NOTIFICATION, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[RemoveNotification] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[RemoveNotification] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[RemoveNotification] fail: read result failed.");
+ ANS_LOGE("[RemoveNotification] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1022,18 +1022,18 @@ ErrCode AnsManagerProxy::RemoveNotification(
ErrCode AnsManagerProxy::RemoveAllNotifications(const sptr &bundleOption)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[RemoveAllNotifications] fail: bundle is empty.");
+ ANS_LOGE("[RemoveAllNotifications] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RemoveAllNotifications] fail:, write interface token failed.");
+ ANS_LOGE("[RemoveAllNotifications] fail:, write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[RemoveAllNotifications] fail:: write bundle failed");
+ ANS_LOGE("[RemoveAllNotifications] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1041,12 +1041,12 @@ ErrCode AnsManagerProxy::RemoveAllNotifications(const sptr &bundleOption)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[DeleteByBundle] fail: bundle is empty.");
+ ANS_LOGE("[DeleteByBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[DeleteByBundle] fail: write interface token failed.");
+ ANS_LOGE("[DeleteByBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[DeleteByBundle] fail: write bundle failed");
+ ANS_LOGE("[DeleteByBundle] fail: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1109,12 +1109,12 @@ ErrCode AnsManagerProxy::DeleteByBundle(const sptr &bu
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(DELETE_NOTIFICATION_BY_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[DeleteByBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[DeleteByBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[DeleteByBundle] fail: read result failed.");
+ ANS_LOGE("[DeleteByBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1125,7 +1125,7 @@ ErrCode AnsManagerProxy::DeleteAll()
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[DeleteAll] fail:, write interface token failed.");
+ ANS_LOGE("[DeleteAll] fail:, write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1133,12 +1133,12 @@ ErrCode AnsManagerProxy::DeleteAll()
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(DELETE_ALL_NOTIFICATIONS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[DeleteAll] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[DeleteAll] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[DeleteAll] fail: read result failed.");
+ ANS_LOGE("[DeleteAll] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1149,18 +1149,18 @@ ErrCode AnsManagerProxy::GetSlotsByBundle(
const sptr &bundleOption, std::vector> &slots)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[GetSlotsByBundle] fail: bundleOption is empty.");
+ ANS_LOGE("[GetSlotsByBundle] fail: bundleOption is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetSlotsByBundle] fail: write interface token failed.");
+ ANS_LOGE("[GetSlotsByBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[GetSlotsByBundle] fail:: write bundle failed");
+ ANS_LOGE("[GetSlotsByBundle] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1168,12 +1168,12 @@ ErrCode AnsManagerProxy::GetSlotsByBundle(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_SLOTS_BY_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetSlotsByBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetSlotsByBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!ReadParcelableVector(slots, reply, result)) {
- ANS_LOGW("[GetSlotsByBundle] fail: read slots failed.");
+ ANS_LOGE("[GetSlotsByBundle] fail: read slots failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1184,34 +1184,34 @@ ErrCode AnsManagerProxy::UpdateSlots(
const sptr &bundleOption, const std::vector> &slots)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[UpdateSlots] fail: bundleOption is empty.");
+ ANS_LOGE("[UpdateSlots] fail: bundleOption is empty.");
return ERR_ANS_INVALID_PARAM;
}
if (slots.empty()) {
- ANS_LOGW("[UpdateSlots] fail: slots is empty.");
+ ANS_LOGE("[UpdateSlots] fail: slots is empty.");
return ERR_ANS_INVALID_PARAM;
}
size_t slotSize = slots.size();
if (slotSize > MAX_SLOT_NUM) {
- ANS_LOGW("[UpdateSlots] fail: slotSize over max size.");
+ ANS_LOGE("[UpdateSlots] fail: slotSize over max size.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[UpdateSlots] fail: write interface token failed.");
+ ANS_LOGE("[UpdateSlots] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[UpdateSlots] fail:: write bundleoption failed");
+ ANS_LOGE("[UpdateSlots] fail:: write bundleoption failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!WriteParcelableVector(slots, data)) {
- ANS_LOGW("[UpdateSlots] fail: write slots failed");
+ ANS_LOGE("[UpdateSlots] fail: write slots failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1219,12 +1219,12 @@ ErrCode AnsManagerProxy::UpdateSlots(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(UPDATE_SLOTS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[UpdateSlots] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[UpdateSlots] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[UpdateSlots] fail: read result failed.");
+ ANS_LOGE("[UpdateSlots] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1235,34 +1235,34 @@ ErrCode AnsManagerProxy::UpdateSlotGroups(
const sptr &bundleOption, const std::vector> &groups)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[UpdateSlotGroups] fail: bundleOption is empty.");
+ ANS_LOGE("[UpdateSlotGroups] fail: bundleOption is empty.");
return ERR_ANS_INVALID_PARAM;
}
if (groups.empty()) {
- ANS_LOGW("[UpdateSlotGroups] fail: groups is empty.");
+ ANS_LOGE("[UpdateSlotGroups] fail: groups is empty.");
return ERR_ANS_INVALID_PARAM;
}
size_t groupSize = groups.size();
if (groupSize > MAX_SLOT_GROUP_NUM) {
- ANS_LOGW("[UpdateSlotGroups] fail: groupSize over max size.");
+ ANS_LOGE("[UpdateSlotGroups] fail: groupSize over max size.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[UpdateSlotGroups] fail: write interface token failed.");
+ ANS_LOGE("[UpdateSlotGroups] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[UpdateSlotGroups] fail:: write bundleOption failed.");
+ ANS_LOGE("[UpdateSlotGroups] fail:: write bundleOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!WriteParcelableVector(groups, data)) {
- ANS_LOGW("[UpdateSlotGroups] fail: write groups failed");
+ ANS_LOGE("[UpdateSlotGroups] fail: write groups failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1270,12 +1270,12 @@ ErrCode AnsManagerProxy::UpdateSlotGroups(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(UPDATE_SLOT_GROUPS, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[UpdateSlotGroups] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[UpdateSlotGroups] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[UpdateSlotGroups] fail: read result failed.");
+ ANS_LOGE("[UpdateSlotGroups] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1286,12 +1286,12 @@ ErrCode AnsManagerProxy::RequestEnableNotification(const std::string &deviceId)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[RequestEnableNotification] fail: write interface token failed.");
+ ANS_LOGE("[RequestEnableNotification] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(deviceId)) {
- ANS_LOGW("[RequestEnableNotification] fail: write deviceId failed");
+ ANS_LOGE("[RequestEnableNotification] fail: write deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1299,12 +1299,12 @@ ErrCode AnsManagerProxy::RequestEnableNotification(const std::string &deviceId)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(REQUEST_ENABLE_NOTIFICATION, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[RequestEnableNotification] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[RequestEnableNotification] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[RequestEnableNotification] fail: read result failed.");
+ ANS_LOGE("[RequestEnableNotification] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1315,17 +1315,17 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForBundle(const std::string &dev
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationsEnabledForBundle] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationsEnabledForBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(deviceId)) {
- ANS_LOGW("[SetNotificationsEnabledForBundle] fail: write deviceId failed");
+ ANS_LOGE("[SetNotificationsEnabledForBundle] fail: write deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetNotificationsEnabledForBundle] fail: write enabled failed");
+ ANS_LOGE("[SetNotificationsEnabledForBundle] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1333,12 +1333,12 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForBundle(const std::string &dev
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationsEnabledForBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationsEnabledForBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationsEnabledForBundle] fail: read result failed.");
+ ANS_LOGE("[SetNotificationsEnabledForBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1349,17 +1349,17 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForAllBundles(const std::string
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationsEnabledForAllBundles] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(deviceId)) {
- ANS_LOGW("[SetNotificationsEnabledForAllBundles] fail: write deviceId failed");
+ ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: write deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetNotificationsEnabledForAllBundles] fail: write enabled failed");
+ ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1367,12 +1367,12 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForAllBundles(const std::string
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_ALL_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationsEnabledForAllBundles] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationsEnabledForAllBundles] fail: read result failed.");
+ ANS_LOGE("[SetNotificationsEnabledForAllBundles] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1383,28 +1383,28 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForSpecialBundle(
const std::string &deviceId, const sptr &bundleOption, bool enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: bundleOption is empty.");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: bundleOption is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(deviceId)) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: write deviceId failed");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: write deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: write bundleOption failed");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: write bundleOption failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: write enabled failed");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1412,12 +1412,12 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForSpecialBundle(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_FOR_SPECIAL_BUNDLE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationsEnabledForSpecialBundle] fail: read result failed.");
+ ANS_LOGE("[SetNotificationsEnabledForSpecialBundle] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1427,23 +1427,23 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledForSpecialBundle(
ErrCode AnsManagerProxy::SetShowBadgeEnabledForBundle(const sptr &bundleOption, bool enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[SetShowBadgeEnabledForBundle] fail: bundle is empty.");
+ ANS_LOGE("[SetShowBadgeEnabledForBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetShowBadgeEnabledForBundle] fail: write interface token failed.");
+ ANS_LOGE("[SetShowBadgeEnabledForBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[SetShowBadgeEnabledForBundle] fail:: write bundle failed");
+ ANS_LOGE("[SetShowBadgeEnabledForBundle] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetShowBadgeEnabledForBundle] fail:: write enabled failed");
+ ANS_LOGE("[SetShowBadgeEnabledForBundle] fail:: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1451,12 +1451,12 @@ ErrCode AnsManagerProxy::SetShowBadgeEnabledForBundle(const sptr &bundleOption, bool &enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail: bundle is empty.");
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail: write interface token failed.");
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[GetShowBadgeEnabledForBundle] fail:: write bundle failed");
+ ANS_LOGE("[GetShowBadgeEnabledForBundle] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1485,17 +1485,17 @@ ErrCode AnsManagerProxy::GetShowBadgeEnabledForBundle(const sptr &subscriber, const sptr &info)
{
if (subscriber == nullptr) {
- ANS_LOGW("[Subscribe] fail: subscriber is empty.");
+ ANS_LOGE("[Subscribe] fail: subscriber is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[Subscribe] fail: write interface token failed.");
+ ANS_LOGE("[Subscribe] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool ret = data.WriteRemoteObject(subscriber->AsObject());
if (!ret) {
- ANS_LOGW("[Subscribe] fail: write subscriber failed.");
+ ANS_LOGE("[Subscribe] fail: write subscriber failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(info != nullptr)) {
- ANS_LOGW("[Subscribe] fail: write isSubcribeInfo failed");
+ ANS_LOGE("[Subscribe] fail: write isSubcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (info != nullptr) {
if (!data.WriteParcelable(info)) {
- ANS_LOGW("[Subscribe] fail: write subcribeInfo failed");
+ ANS_LOGE("[Subscribe] fail: write subcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -1566,12 +1566,12 @@ ErrCode AnsManagerProxy::Subscribe(const sptr &subscriber, const
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SUBSCRIBE_NOTIFICATION, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[Subscribe] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[Subscribe] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[Subscribe] fail: read result failed.");
+ ANS_LOGE("[Subscribe] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1582,30 +1582,30 @@ ErrCode AnsManagerProxy::Unsubscribe(
const sptr &subscriber, const sptr &info)
{
if (subscriber == nullptr) {
- ANS_LOGW("[Unsubscribe] fail: subscriber is empty.");
+ ANS_LOGE("[Unsubscribe] fail: subscriber is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[Unsubscribe] fail: write interface token failed.");
+ ANS_LOGE("[Unsubscribe] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool ret = data.WriteRemoteObject(subscriber->AsObject());
if (!ret) {
- ANS_LOGW("[Unsubscribe] fail: write subscriber failed.");
+ ANS_LOGE("[Unsubscribe] fail: write subscriber failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(info != nullptr)) {
- ANS_LOGW("[Unsubscribe] fail: write isSubcribeInfo failed");
+ ANS_LOGE("[Unsubscribe] fail: write isSubcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (info != nullptr) {
if (!data.WriteParcelable(info)) {
- ANS_LOGW("[Unsubscribe] fail: write subcribeInfo failed");
+ ANS_LOGE("[Unsubscribe] fail: write subcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -1614,12 +1614,12 @@ ErrCode AnsManagerProxy::Unsubscribe(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(UNSUBSCRIBE_NOTIFICATION, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[Unsubscribe] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[Unsubscribe] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[Unsubscribe] fail: read result failed.");
+ ANS_LOGE("[Unsubscribe] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1630,7 +1630,7 @@ ErrCode AnsManagerProxy::AreNotificationsSuspended(bool &suspended)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[AreNotificationsSuspended] fail: write interface token failed.");
+ ANS_LOGE("[AreNotificationsSuspended] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1638,17 +1638,17 @@ ErrCode AnsManagerProxy::AreNotificationsSuspended(bool &suspended)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(ARE_NOTIFICATION_SUSPENDED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[AreNotificationsSuspended] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[AreNotificationsSuspended] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[AreNotificationsSuspended] fail: read result failed.");
+ ANS_LOGE("[AreNotificationsSuspended] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(suspended)) {
- ANS_LOGW("[AreNotificationsSuspended] fail: read suspended failed.");
+ ANS_LOGE("[AreNotificationsSuspended] fail: read suspended failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1659,7 +1659,7 @@ ErrCode AnsManagerProxy::GetCurrentAppSorting(sptr &sort
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetCurrentAppSorting] fail: write interface token failed.");
+ ANS_LOGE("[GetCurrentAppSorting] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1667,18 +1667,18 @@ ErrCode AnsManagerProxy::GetCurrentAppSorting(sptr &sort
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_CURRENT_APP_SORTING, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetCurrentAppSorting] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetCurrentAppSorting] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetCurrentAppSorting] fail: read result failed.");
+ ANS_LOGE("[GetCurrentAppSorting] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
sortingMap = reply.ReadParcelable();
if (sortingMap == nullptr) {
- ANS_LOGW("[GetCurrentAppSorting] fail: read sortingMap failed.");
+ ANS_LOGE("[GetCurrentAppSorting] fail: read sortingMap failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1689,7 +1689,7 @@ ErrCode AnsManagerProxy::IsAllowedNotify(bool &allowed)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsAllowedNotify] fail: write interface token failed.");
+ ANS_LOGE("[IsAllowedNotify] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1697,17 +1697,17 @@ ErrCode AnsManagerProxy::IsAllowedNotify(bool &allowed)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_ALLOWED_NOTIFY, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[IsAllowedNotify] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[IsAllowedNotify] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[IsAllowedNotify] fail: read result failed.");
+ ANS_LOGE("[IsAllowedNotify] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(allowed)) {
- ANS_LOGW("[IsAllowedNotify] fail: read allowed failed.");
+ ANS_LOGE("[IsAllowedNotify] fail: read allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1718,7 +1718,7 @@ ErrCode AnsManagerProxy::IsAllowedNotifySelf(bool &allowed)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsAllowedNotifySelf] fail: write interface token failed.");
+ ANS_LOGE("[IsAllowedNotifySelf] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1726,17 +1726,17 @@ ErrCode AnsManagerProxy::IsAllowedNotifySelf(bool &allowed)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_ALLOWED_NOTIFY_SELF, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[IsAllowedNotifySelf] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[IsAllowedNotifySelf] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[IsAllowedNotifySelf] fail: read result failed.");
+ ANS_LOGE("[IsAllowedNotifySelf] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(allowed)) {
- ANS_LOGW("[IsAllowedNotifySelf] fail: read allowed failed.");
+ ANS_LOGE("[IsAllowedNotifySelf] fail: read allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1746,18 +1746,18 @@ ErrCode AnsManagerProxy::IsAllowedNotifySelf(bool &allowed)
ErrCode AnsManagerProxy::IsSpecialBundleAllowedNotify(const sptr &bundleOption, bool &allowed)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: bundle is empty.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: write interface token failed.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: write bundle failed");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1765,17 +1765,17 @@ ErrCode AnsManagerProxy::IsSpecialBundleAllowedNotify(const sptr &date)
{
if (date == nullptr) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: date is empty.");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: date is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: write interface token failed.");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(date)) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: write date failed");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: write date failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1868,12 +1868,12 @@ ErrCode AnsManagerProxy::SetDoNotDisturbDate(const sptr
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetDoNotDisturbDate] fail: write interface token failed.");
+ ANS_LOGE("[GetDoNotDisturbDate] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1892,19 +1892,19 @@ ErrCode AnsManagerProxy::GetDoNotDisturbDate(sptr
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_DO_NOT_DISTURB_DATE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetDoNotDisturbDate] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetDoNotDisturbDate] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetDoNotDisturbDate] fail: read result failed.");
+ ANS_LOGE("[GetDoNotDisturbDate] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (result == ERR_OK) {
date = reply.ReadParcelable();
if (date == nullptr) {
- ANS_LOGW("[GetDoNotDisturbDate] fail: read date failed.");
+ ANS_LOGE("[GetDoNotDisturbDate] fail: read date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -1916,7 +1916,7 @@ ErrCode AnsManagerProxy::DoesSupportDoNotDisturbMode(bool &doesSupport)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[DoesSupportDoNotDisturbMode] fail: write interface token failed.");
+ ANS_LOGE("[DoesSupportDoNotDisturbMode] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1924,17 +1924,17 @@ ErrCode AnsManagerProxy::DoesSupportDoNotDisturbMode(bool &doesSupport)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(DOES_SUPPORT_DO_NOT_DISTURB_MODE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[DoesSupportDoNotDisturbMode] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[DoesSupportDoNotDisturbMode] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[DoesSupportDoNotDisturbMode] fail: read result failed.");
+ ANS_LOGE("[DoesSupportDoNotDisturbMode] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(doesSupport)) {
- ANS_LOGW("[DoesSupportDoNotDisturbMode] fail: read doesSupport failed.");
+ ANS_LOGE("[DoesSupportDoNotDisturbMode] fail: read doesSupport failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1945,7 +1945,7 @@ ErrCode AnsManagerProxy::IsDistributedEnabled(bool &enabled)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsDistributedEnabled] fail: write interface token failed.");
+ ANS_LOGE("[IsDistributedEnabled] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1953,17 +1953,17 @@ ErrCode AnsManagerProxy::IsDistributedEnabled(bool &enabled)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_DISTRIBUTED_ENABLED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[IsDistributedEnabled] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[IsDistributedEnabled] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[IsDistributedEnabled] fail: read result failed.");
+ ANS_LOGE("[IsDistributedEnabled] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(enabled)) {
- ANS_LOGW("[IsDistributedEnabled] fail: read enabled failed.");
+ ANS_LOGE("[IsDistributedEnabled] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1974,12 +1974,12 @@ ErrCode AnsManagerProxy::EnableDistributed(bool enabled)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[EnableDistributed] fail: write interface token failed.");
+ ANS_LOGE("[EnableDistributed] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[EnableDistributed] fail: write enabled failed");
+ ANS_LOGE("[EnableDistributed] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1987,12 +1987,12 @@ ErrCode AnsManagerProxy::EnableDistributed(bool enabled)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(ENABLE_DISTRIBUTED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[EnableDistributed] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[EnableDistributed] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[EnableDistributed] fail: read result failed.");
+ ANS_LOGE("[EnableDistributed] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2002,23 +2002,23 @@ ErrCode AnsManagerProxy::EnableDistributed(bool enabled)
ErrCode AnsManagerProxy::EnableDistributedByBundle(const sptr &bundleOption, bool enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[EnableDistributedByBundle] fail: bundle is empty.");
+ ANS_LOGE("[EnableDistributedByBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[EnableDistributedByBundle] fail: write interface token failed.");
+ ANS_LOGE("[EnableDistributedByBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[EnableDistributedByBundle] fail:: write bundle failed");
+ ANS_LOGE("[EnableDistributedByBundle] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[EnableDistributedByBundle] fail:: write enabled failed");
+ ANS_LOGE("[EnableDistributedByBundle] fail:: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2026,12 +2026,12 @@ ErrCode AnsManagerProxy::EnableDistributedByBundle(const sptr &bundleOption, bool &enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[IsDistributedEnableByBundle] fail: bundle is empty.");
+ ANS_LOGE("[IsDistributedEnableByBundle] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsDistributedEnableByBundle] fail: write interface token failed.");
+ ANS_LOGE("[IsDistributedEnableByBundle] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(bundleOption)) {
- ANS_LOGW("[IsDistributedEnableByBundle] fail: write bundle failed");
+ ANS_LOGE("[IsDistributedEnableByBundle] fail: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2089,17 +2089,17 @@ ErrCode AnsManagerProxy::IsDistributedEnableByBundle(const sptr &request)
{
if (request == nullptr) {
- ANS_LOGW("[PublishContinuousTaskNotification] fail: notification request is null ptr.");
+ ANS_LOGE("[PublishContinuousTaskNotification] fail: notification request is null ptr.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[PublishContinuousTaskNotification] fail: write interface token failed.");
+ ANS_LOGE("[PublishContinuousTaskNotification] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(request)) {
- ANS_LOGW("[PublishContinuousTaskNotification] fail: write request failed.");
+ ANS_LOGE("[PublishContinuousTaskNotification] fail: write request failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2196,12 +2196,12 @@ ErrCode AnsManagerProxy::PublishContinuousTaskNotification(const sptrSendRequest(code, data, reply, flags);
@@ -2399,11 +2399,11 @@ ErrCode AnsManagerProxy::InnerTransact(uint32_t code, MessageOption &flags, Mess
return ERR_OK;
}
case DEAD_OBJECT: {
- ANS_LOGW("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
+ ANS_LOGE("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
return ERR_DEAD_OBJECT;
}
default: {
- ANS_LOGW("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
+ ANS_LOGE("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
return ERR_ANS_TRANSACT_FAILED;
}
}
@@ -2413,13 +2413,13 @@ template
bool AnsManagerProxy::WriteParcelableVector(const std::vector> &parcelableVector, MessageParcel &data)
{
if (!data.WriteInt32(parcelableVector.size())) {
- ANS_LOGW("write ParcelableVector size failed");
+ ANS_LOGE("write ParcelableVector size failed");
return false;
}
for (auto &parcelable : parcelableVector) {
if (!data.WriteStrongParcelable(parcelable)) {
- ANS_LOGW("write ParcelableVector failed");
+ ANS_LOGE("write ParcelableVector failed");
return false;
}
}
@@ -2430,13 +2430,13 @@ template
bool AnsManagerProxy::ReadParcelableVector(std::vector> &parcelableInfos, MessageParcel &reply, ErrCode &result)
{
if (!reply.ReadInt32(result)) {
- ANS_LOGW("read result failed.");
+ ANS_LOGE("read result failed.");
return false;
}
int32_t infoSize = 0;
if (!reply.ReadInt32(infoSize)) {
- ANS_LOGW("read Parcelable size failed.");
+ ANS_LOGE("read Parcelable size failed.");
return false;
}
@@ -2444,7 +2444,7 @@ bool AnsManagerProxy::ReadParcelableVector(std::vector> &parcelableInfos
for (int32_t index = 0; index < infoSize; index++) {
sptr info = reply.ReadStrongParcelable();
if (info == nullptr) {
- ANS_LOGW("read Parcelable infos failed.");
+ ANS_LOGE("read Parcelable infos failed.");
return false;
}
parcelableInfos.emplace_back(info);
@@ -2457,12 +2457,12 @@ ErrCode AnsManagerProxy::IsSupportTemplate(const std::string &templateName, bool
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsSupportTemplate] fail: write interface token failed.");
+ ANS_LOGE("[IsSupportTemplate] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteString(templateName)) {
- ANS_LOGW("[IsSupportTemplate] fail: write template name failed");
+ ANS_LOGE("[IsSupportTemplate] fail: write template name failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2470,17 +2470,17 @@ ErrCode AnsManagerProxy::IsSupportTemplate(const std::string &templateName, bool
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_SUPPORT_TEMPLATE, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[IsSupportTemplate] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[IsSupportTemplate] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[IsSupportTemplate] fail: read result failed.");
+ ANS_LOGE("[IsSupportTemplate] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(support)) {
- ANS_LOGW("[IsSupportTemplate] fail: read support failed.");
+ ANS_LOGE("[IsSupportTemplate] fail: read support failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2491,12 +2491,12 @@ ErrCode AnsManagerProxy::IsSpecialUserAllowedNotify(const int32_t &userId, bool
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[IsSpecialUserAllowedNotify] fail: write interface token failed.");
+ ANS_LOGE("[IsSpecialUserAllowedNotify] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(userId)) {
- ANS_LOGW("[IsSpecialUserAllowedNotify] fail: write userId failed");
+ ANS_LOGE("[IsSpecialUserAllowedNotify] fail: write userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2504,17 +2504,17 @@ ErrCode AnsManagerProxy::IsSpecialUserAllowedNotify(const int32_t &userId, bool
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(IS_SPECIAL_USER_ALLOWED_NOTIFY, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: read result failed.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(allowed)) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: read allowed failed.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: read allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2525,17 +2525,17 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledByUser(const int32_t &userId, bo
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetNotificationsEnabledByUser] fail: write interface token failed.");
+ ANS_LOGE("[SetNotificationsEnabledByUser] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(userId)) {
- ANS_LOGW("[SetNotificationsEnabledByUser] fail: write userId failed");
+ ANS_LOGE("[SetNotificationsEnabledByUser] fail: write userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetNotificationsEnabledByUser] fail: write enabled failed");
+ ANS_LOGE("[SetNotificationsEnabledByUser] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2543,12 +2543,12 @@ ErrCode AnsManagerProxy::SetNotificationsEnabledByUser(const int32_t &userId, bo
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_NOTIFICATION_ENABLED_BY_USER, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetNotificationsEnabledByUser] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetNotificationsEnabledByUser] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetNotificationsEnabledByUser] fail: read result failed.");
+ ANS_LOGE("[SetNotificationsEnabledByUser] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2559,12 +2559,12 @@ ErrCode AnsManagerProxy::DeleteAllByUser(const int32_t &userId)
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[DeleteAllByUser] fail:, write interface token failed.");
+ ANS_LOGE("[DeleteAllByUser] fail:, write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(userId)) {
- ANS_LOGW("[DeleteAllByUser] fail: write userId failed");
+ ANS_LOGE("[DeleteAllByUser] fail: write userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2572,12 +2572,12 @@ ErrCode AnsManagerProxy::DeleteAllByUser(const int32_t &userId)
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(DELETE_ALL_NOTIFICATIONS_BY_USER, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[DeleteAllByUser] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[DeleteAllByUser] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[DeleteAllByUser] fail: read result failed.");
+ ANS_LOGE("[DeleteAllByUser] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2587,23 +2587,23 @@ ErrCode AnsManagerProxy::DeleteAllByUser(const int32_t &userId)
ErrCode AnsManagerProxy::SetDoNotDisturbDate(const int32_t &userId, const sptr &date)
{
if (date == nullptr) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: date is empty.");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: date is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: write interface token failed.");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(userId)) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: write userId failed");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: write userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteParcelable(date)) {
- ANS_LOGW("[SetDoNotDisturbDate] fail: write date failed");
+ ANS_LOGE("[SetDoNotDisturbDate] fail: write date failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2611,12 +2611,12 @@ ErrCode AnsManagerProxy::SetDoNotDisturbDate(const int32_t &userId, const sptr();
if (date == nullptr) {
- ANS_LOGW("[GetDoNotDisturbDate] fail: read date failed.");
+ ANS_LOGE("[GetDoNotDisturbDate] fail: read date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -2664,28 +2664,28 @@ ErrCode AnsManagerProxy::SetEnabledForBundleSlot(
const sptr &bundleOption, const NotificationConstant::SlotType &slotType, bool enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail: bundle is empty.");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail: write interface token failed.");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail:: write bundle failed");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(slotType)) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail:: write slotType failed.");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail:: write slotType failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteBool(enabled)) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail: write enabled failed");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail: write enabled failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2693,12 +2693,12 @@ ErrCode AnsManagerProxy::SetEnabledForBundleSlot(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(SET_ENABLED_FOR_BUNDLE_SLOT, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[SetEnabledForBundleSlot] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[SetEnabledForBundleSlot] fail: read result failed.");
+ ANS_LOGE("[SetEnabledForBundleSlot] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2709,23 +2709,23 @@ ErrCode AnsManagerProxy::GetEnabledForBundleSlot(
const sptr &bundleOption, const NotificationConstant::SlotType &slotType, bool &enabled)
{
if (bundleOption == nullptr) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail: bundle is empty.");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail: bundle is empty.");
return ERR_ANS_INVALID_PARAM;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsManagerProxy::GetDescriptor())) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail: write interface token failed.");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail: write interface token failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteStrongParcelable(bundleOption)) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail:: write bundle failed");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail:: write bundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!data.WriteInt32(slotType)) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail:: write slotType failed.");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail:: write slotType failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -2733,17 +2733,17 @@ ErrCode AnsManagerProxy::GetEnabledForBundleSlot(
MessageOption option = {MessageOption::TF_SYNC};
ErrCode result = InnerTransact(GET_ENABLED_FOR_BUNDLE_SLOT, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail: transact ErrCode=%{public}d", result);
+ ANS_LOGE("[GetEnabledForBundleSlot] fail: transact ErrCode=%{public}d", result);
return ERR_ANS_TRANSACT_FAILED;
}
if (!reply.ReadInt32(result)) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail: read result failed.");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail: read result failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.ReadBool(enabled)) {
- ANS_LOGW("[GetEnabledForBundleSlot] fail: read canPublish failed.");
+ ANS_LOGE("[GetEnabledForBundleSlot] fail: read canPublish failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
diff --git a/frameworks/ans/core/src/ans_manager_stub.cpp b/frameworks/ans/core/src/ans_manager_stub.cpp
index a35ad897c31b3f20e211da562cddbe7e77e05c56..92b68738416bcad2c1c53e11f09ffabb2d33bd99 100644
--- a/frameworks/ans/core/src/ans_manager_stub.cpp
+++ b/frameworks/ans/core/src/ans_manager_stub.cpp
@@ -276,19 +276,19 @@ int32_t AnsManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess
std::u16string descriptor = AnsManagerStub::GetDescriptor();
std::u16string remoteDescriptor = data.ReadInterfaceToken();
if (descriptor != remoteDescriptor) {
- ANS_LOGW("[OnRemoteRequest] fail: invalid interface token!");
+ ANS_LOGE("[OnRemoteRequest] fail: invalid interface token!");
return OBJECT_NULL;
}
auto it = interfaces_.find(code);
if (it == interfaces_.end()) {
- ANS_LOGW("[OnRemoteRequest] fail: unknown code!");
+ ANS_LOGE("[OnRemoteRequest] fail: unknown code!");
return IRemoteStub::OnRemoteRequest(code, data, reply, flags);
}
auto fun = it->second;
if (fun == nullptr) {
- ANS_LOGW("[OnRemoteRequest] fail: not find function!");
+ ANS_LOGE("[OnRemoteRequest] fail: not find function!");
return IRemoteStub::OnRemoteRequest(code, data, reply, flags);
}
@@ -297,7 +297,7 @@ int32_t AnsManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess
return NO_ERROR;
}
- ANS_LOGW("[OnRemoteRequest] fail: Failed to call interface %{public}u, err:%{public}d", code, result);
+ ANS_LOGE("[OnRemoteRequest] fail: Failed to call interface %{public}u, err:%{public}d", code, result);
return result;
}
@@ -305,19 +305,19 @@ ErrCode AnsManagerStub::HandlePublish(MessageParcel &data, MessageParcel &reply)
{
std::string label;
if (!data.ReadString(label)) {
- ANS_LOGW("[HandlePublish] fail: read label failed");
+ ANS_LOGE("[HandlePublish] fail: read label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
sptr notification = data.ReadParcelable();
if (!notification) {
- ANS_LOGW("[HandlePublish] fail: notification ReadParcelable failed");
+ ANS_LOGE("[HandlePublish] fail: notification ReadParcelable failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = Publish(label, notification);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandlePublish] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandlePublish] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -327,19 +327,19 @@ ErrCode AnsManagerStub::HandlePublishToDevice(MessageParcel &data, MessageParcel
{
sptr notification = data.ReadParcelable();
if (!notification) {
- ANS_LOGW("[HandlePublishToDevice] fail: notification ReadParcelable failed");
+ ANS_LOGE("[HandlePublishToDevice] fail: notification ReadParcelable failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string deviceId;
if (!data.ReadString(deviceId)) {
- ANS_LOGW("[HandlePublishToDevice] fail: read deviceId failed");
+ ANS_LOGE("[HandlePublishToDevice] fail: read deviceId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = PublishToDevice(notification, deviceId);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandlePublishToDevice] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandlePublishToDevice] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -349,19 +349,19 @@ ErrCode AnsManagerStub::HandleCancel(MessageParcel &data, MessageParcel &reply)
{
int32_t notificationId = 0;
if (!data.ReadInt32(notificationId)) {
- ANS_LOGW("[HandleCancel] fail: read notificationId failed");
+ ANS_LOGE("[HandleCancel] fail: read notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string label;
if (!data.ReadString(label)) {
- ANS_LOGW("[HandleCancel] fail: read label failed");
+ ANS_LOGE("[HandleCancel] fail: read label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = Cancel(notificationId, label);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCancel] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCancel] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -371,7 +371,7 @@ ErrCode AnsManagerStub::HandleCancelAll(MessageParcel &data, MessageParcel &repl
{
ErrCode result = CancelAll();
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCancelAll] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCancelAll] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -381,25 +381,25 @@ ErrCode AnsManagerStub::HandleCancelAsBundle(MessageParcel &data, MessageParcel
{
int32_t notificationId = 0;
if (!data.ReadInt32(notificationId)) {
- ANS_LOGW("[HandleCancelAsBundle] fail: read notificationId failed");
+ ANS_LOGE("[HandleCancelAsBundle] fail: read notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string representativeBundle;
if (!data.ReadString(representativeBundle)) {
- ANS_LOGW("[HandleCancelAsBundle] fail: read representativeBundle failed");
+ ANS_LOGE("[HandleCancelAsBundle] fail: read representativeBundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
int32_t userId = 0;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleCancelAsBundle] fail: read userId failed");
+ ANS_LOGE("[HandleCancelAsBundle] fail: read userId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = CancelAsBundle(notificationId, representativeBundle, userId);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCancelAsBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCancelAsBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -410,7 +410,7 @@ ErrCode AnsManagerStub::HandleAddSlotByType(MessageParcel &data, MessageParcel &
NotificationConstant::SlotType slotType = static_cast(data.ReadInt32());
ErrCode result = AddSlotByType(slotType);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleAddSlotByType] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleAddSlotByType] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -420,14 +420,14 @@ ErrCode AnsManagerStub::HandleAddSlots(MessageParcel &data, MessageParcel &reply
{
std::vector> slots;
if (!ReadParcelableVector(slots, data)) {
- ANS_LOGW("[HandleAddSlots] fail: read slotsSize failed");
+ ANS_LOGE("[HandleAddSlots] fail: read slotsSize failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = AddSlots(slots);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleAddSlots] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleAddSlots] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -439,7 +439,7 @@ ErrCode AnsManagerStub::HandleRemoveSlotByType(MessageParcel &data, MessageParce
ErrCode result = RemoveSlotByType(slotType);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveSlotByType] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveSlotByType] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -449,7 +449,7 @@ ErrCode AnsManagerStub::HandleRemoveAllSlots(MessageParcel &data, MessageParcel
{
ErrCode result = RemoveAllSlots();
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveAllSlots] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveAllSlots] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -459,13 +459,13 @@ ErrCode AnsManagerStub::HandleAddSlotGroups(MessageParcel &data, MessageParcel &
{
std::vector> groups;
if (!ReadParcelableVector(groups, data)) {
- ANS_LOGW("[HandleAddSlotGroups] fail: read slotsSize failed");
+ ANS_LOGE("[HandleAddSlotGroups] fail: read slotsSize failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = AddSlotGroups(groups);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleAddSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleAddSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -476,7 +476,7 @@ ErrCode AnsManagerStub::HandleGetSlots(MessageParcel &data, MessageParcel &reply
std::vector> slots;
ErrCode result = GetSlots(slots);
if (!WriteParcelableVector(slots, reply, result)) {
- ANS_LOGW("[HandleGetSlots] fail: write slots failed");
+ ANS_LOGE("[HandleGetSlots] fail: write slots failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -490,12 +490,12 @@ ErrCode AnsManagerStub::HandleGetSlotByType(MessageParcel &data, MessageParcel &
sptr slot = nullptr;
ErrCode result = GetSlotByType(slotType, slot);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetSlotByType] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetSlotByType] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteParcelable(slot)) {
- ANS_LOGW("[HandleGetSlotByType] fail: write slot failed.");
+ ANS_LOGE("[HandleGetSlotByType] fail: write slot failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -505,19 +505,19 @@ ErrCode AnsManagerStub::HandleGetSlotGroup(MessageParcel &data, MessageParcel &r
{
std::string groupId;
if (!data.ReadString(groupId)) {
- ANS_LOGW("[HandleGetSlotGroup] fail: read groupId failed");
+ ANS_LOGE("[HandleGetSlotGroup] fail: read groupId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
sptr group;
ErrCode result = GetSlotGroup(groupId, group);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetSlotGroup] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetSlotGroup] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteParcelable(group)) {
- ANS_LOGW("[HandleGetSlotGroup] fail: write group failed.");
+ ANS_LOGE("[HandleGetSlotGroup] fail: write group failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -528,7 +528,7 @@ ErrCode AnsManagerStub::HandleGetSlotGroups(MessageParcel &data, MessageParcel &
std::vector> groups;
ErrCode result = GetSlotGroups(groups);
if (!WriteParcelableVector(groups, reply, result)) {
- ANS_LOGW("[HandleGetSlotGroups] fail: write groups failed");
+ ANS_LOGE("[HandleGetSlotGroups] fail: write groups failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -539,19 +539,19 @@ ErrCode AnsManagerStub::HandleGetSlotNumAsBundle(MessageParcel &data, MessagePar
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleGetSlotNumAsBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleGetSlotNumAsBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
uint64_t num = 0;
ErrCode result = GetSlotNumAsBundle(bundleOption, num);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetSlotNumAsBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetSlotNumAsBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteUint64(num)) {
- ANS_LOGW("[HandleGetSlotNumAsBundle] fail: write enabled failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetSlotNumAsBundle] fail: write enabled failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -561,13 +561,13 @@ ErrCode AnsManagerStub::HandleRemoveSlotGroups(MessageParcel &data, MessageParce
{
std::vector groupIds;
if (!data.ReadStringVector(&groupIds)) {
- ANS_LOGW("[HandleRemoveSlotGroups] fail: read groupIds failed");
+ ANS_LOGE("[HandleRemoveSlotGroups] fail: read groupIds failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = RemoveSlotGroups(groupIds);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -578,7 +578,7 @@ ErrCode AnsManagerStub::HandleGetActiveNotifications(MessageParcel &data, Messag
std::vector> notifications;
ErrCode result = GetActiveNotifications(notifications);
if (!WriteParcelableVector(notifications, reply, result)) {
- ANS_LOGW("[HandleGetActiveNotifications] fail: write notifications failed");
+ ANS_LOGE("[HandleGetActiveNotifications] fail: write notifications failed");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -589,12 +589,12 @@ ErrCode AnsManagerStub::HandleGetActiveNotificationNums(MessageParcel &data, Mes
uint64_t num = 0;
ErrCode result = GetActiveNotificationNums(num);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetActiveNotificationNums] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetActiveNotificationNums] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteUint64(num)) {
- ANS_LOGW("[HandleGetActiveNotificationNums] fail: write num failed");
+ ANS_LOGE("[HandleGetActiveNotificationNums] fail: write num failed");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -605,7 +605,7 @@ ErrCode AnsManagerStub::HandleGetAllActiveNotifications(MessageParcel &data, Mes
std::vector> notifications;
ErrCode result = GetAllActiveNotifications(notifications);
if (!WriteParcelableVector(notifications, reply, result)) {
- ANS_LOGW("[HandleGetAllActiveNotifications] fail: write notifications failed");
+ ANS_LOGE("[HandleGetAllActiveNotifications] fail: write notifications failed");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -615,14 +615,14 @@ ErrCode AnsManagerStub::HandleGetSpecialActiveNotifications(MessageParcel &data,
{
std::vector key;
if (!data.ReadStringVector(&key)) {
- ANS_LOGW("[HandleGetSpecialActiveNotifications] fail: read key failed");
+ ANS_LOGE("[HandleGetSpecialActiveNotifications] fail: read key failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::vector> notifications;
ErrCode result = GetSpecialActiveNotifications(key, notifications);
if (!WriteParcelableVector(notifications, reply, result)) {
- ANS_LOGW("[HandleGetSpecialActiveNotifications] fail: write notifications failed");
+ ANS_LOGE("[HandleGetSpecialActiveNotifications] fail: write notifications failed");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -632,13 +632,13 @@ ErrCode AnsManagerStub::HandleSetNotificationAgent(MessageParcel &data, MessageP
{
std::string agent;
if (!data.ReadString(agent)) {
- ANS_LOGW("[HandleSetNotificationAgent] fail: read agent failed");
+ ANS_LOGE("[HandleSetNotificationAgent] fail: read agent failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationAgent(agent);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetNotificationAgent] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetNotificationAgent] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -649,12 +649,12 @@ ErrCode AnsManagerStub::HandleGetNotificationAgent(MessageParcel &data, MessageP
std::string agent;
ErrCode result = GetNotificationAgent(agent);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetNotificationAgent] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetNotificationAgent] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteString(agent)) {
- ANS_LOGW("[HandleGetNotificationAgent] fail: write agent failed");
+ ANS_LOGE("[HandleGetNotificationAgent] fail: write agent failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -665,19 +665,19 @@ ErrCode AnsManagerStub::HandleCanPublishAsBundle(MessageParcel &data, MessagePar
{
std::string representativeBundle;
if (!data.ReadString(representativeBundle)) {
- ANS_LOGW("[HandleCanPublishAsBundle] fail: read representativeBundle failed");
+ ANS_LOGE("[HandleCanPublishAsBundle] fail: read representativeBundle failed");
return ERR_ANS_PARCELABLE_FAILED;
}
bool canPublish = false;
ErrCode result = CanPublishAsBundle(representativeBundle, canPublish);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCanPublishAsBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCanPublishAsBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(canPublish)) {
- ANS_LOGW("[HandleCanPublishAsBundle] fail: write canPublish failed");
+ ANS_LOGE("[HandleCanPublishAsBundle] fail: write canPublish failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -688,19 +688,19 @@ ErrCode AnsManagerStub::HandlePublishAsBundle(MessageParcel &data, MessageParcel
{
sptr notification = data.ReadParcelable();
if (!notification) {
- ANS_LOGW("[HandlePublishAsBundle] fail: read notification failed");
+ ANS_LOGE("[HandlePublishAsBundle] fail: read notification failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string representativeBundle;
if (!data.ReadString(representativeBundle)) {
- ANS_LOGW("[HandlePublishAsBundle] fail: read representativeBundle failed.");
+ ANS_LOGE("[HandlePublishAsBundle] fail: read representativeBundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = PublishAsBundle(notification, representativeBundle);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandlePublishAsBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandlePublishAsBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -710,13 +710,13 @@ ErrCode AnsManagerStub::HandleSetNotificationBadgeNum(MessageParcel &data, Messa
{
int32_t num = 0;
if (!data.ReadInt32(num)) {
- ANS_LOGW("[HandleSetNotificationBadgeNum] fail: read notification failed");
+ ANS_LOGE("[HandleSetNotificationBadgeNum] fail: read notification failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationBadgeNum(num);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetNotificationBadgeNum] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetNotificationBadgeNum] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -727,12 +727,12 @@ ErrCode AnsManagerStub::HandleGetBundleImportance(MessageParcel &data, MessagePa
int32_t importance = 0;
ErrCode result = GetBundleImportance(importance);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetBundleImportance] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetBundleImportance] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteInt32(importance)) {
- ANS_LOGW("[HandleGetBundleImportance] fail: write importance failed.");
+ ANS_LOGE("[HandleGetBundleImportance] fail: write importance failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -742,13 +742,13 @@ ErrCode AnsManagerStub::HandleSetDoNotDisturbDate(MessageParcel &data, MessagePa
{
sptr date = data.ReadParcelable();
if (date == nullptr) {
- ANS_LOGW("[HandleSetDoNotDisturbDate] fail: read date failed.");
+ ANS_LOGE("[HandleSetDoNotDisturbDate] fail: read date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetDoNotDisturbDate(date);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetDoNotDisturbDate] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetDoNotDisturbDate] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -761,13 +761,13 @@ ErrCode AnsManagerStub::HandleGetDoNotDisturbDate(MessageParcel &data, MessagePa
ErrCode result = GetDoNotDisturbDate(date);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetDoNotDisturbDate] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetDoNotDisturbDate] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (result == ERR_OK) {
if (!reply.WriteParcelable(date)) {
- ANS_LOGW("[HandleSetDoNotDisturbDate] fail: write date failed.");
+ ANS_LOGE("[HandleSetDoNotDisturbDate] fail: write date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -781,12 +781,12 @@ ErrCode AnsManagerStub::HandleDoesSupportDoNotDisturbMode(MessageParcel &data, M
ErrCode result = DoesSupportDoNotDisturbMode(support);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleDoesSupportDoNotDisturbMode] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleDoesSupportDoNotDisturbMode] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(support)) {
- ANS_LOGW("[HandleDoesSupportDoNotDisturbMode] fail: write doesSupport failed.");
+ ANS_LOGE("[HandleDoesSupportDoNotDisturbMode] fail: write doesSupport failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -797,13 +797,13 @@ ErrCode AnsManagerStub::HandlePublishContinuousTaskNotification(MessageParcel &d
{
sptr request = data.ReadParcelable();
if (!request) {
- ANS_LOGW("[HandlePublishContinuousTaskNotification] fail: notification ReadParcelable failed");
+ ANS_LOGE("[HandlePublishContinuousTaskNotification] fail: notification ReadParcelable failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = PublishContinuousTaskNotification(request);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandlePublishContinuousTaskNotification] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandlePublishContinuousTaskNotification] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -813,19 +813,19 @@ ErrCode AnsManagerStub::HandleCancelContinuousTaskNotification(MessageParcel &da
{
std::string label;
if (!data.ReadString(label)) {
- ANS_LOGW("[HandleCancelContinuousTaskNotification] fail: read label failed");
+ ANS_LOGE("[HandleCancelContinuousTaskNotification] fail: read label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
int32_t notificationId = 0;
if (!data.ReadInt32(notificationId)) {
- ANS_LOGW("[HandleCancelContinuousTaskNotification] fail: read notificationId failed");
+ ANS_LOGE("[HandleCancelContinuousTaskNotification] fail: read notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = CancelContinuousTaskNotification(label, notificationId);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCancelContinuousTaskNotification] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCancelContinuousTaskNotification] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -836,12 +836,12 @@ ErrCode AnsManagerStub::HandleIsNotificationPolicyAccessGranted(MessageParcel &d
bool granted = false;
ErrCode result = HasNotificationPolicyAccessPermission(granted);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsNotificationPolicyAccessGranted] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsNotificationPolicyAccessGranted] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(granted)) {
- ANS_LOGW("[HandleIsNotificationPolicyAccessGranted] fail: write granted failed.");
+ ANS_LOGE("[HandleIsNotificationPolicyAccessGranted] fail: write granted failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -851,13 +851,13 @@ ErrCode AnsManagerStub::HandleSetPrivateNotificationsAllowed(MessageParcel &data
{
bool allow = false;
if (!reply.ReadBool(allow)) {
- ANS_LOGW("[HandleSetPrivateNotificationsAllowed] fail: read allow failed.");
+ ANS_LOGE("[HandleSetPrivateNotificationsAllowed] fail: read allow failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetPrivateNotificationsAllowed(allow);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetPrivateNotificationsAllowed] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetPrivateNotificationsAllowed] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -868,7 +868,7 @@ ErrCode AnsManagerStub::HandleGetPrivateNotificationsAllowed(MessageParcel &data
bool allow = false;
ErrCode result = GetPrivateNotificationsAllowed(allow);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetPrivateNotificationsAllowed] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetPrivateNotificationsAllowed] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -878,25 +878,25 @@ ErrCode AnsManagerStub::HandleRemoveNotification(MessageParcel &data, MessagePar
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleRemoveNotification] fail: read bundle failed.");
+ ANS_LOGE("[HandleRemoveNotification] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
int32_t notificationId = 0;
if (!data.ReadInt32(notificationId)) {
- ANS_LOGW("[HandleRemoveNotification] fail: read notificationId failed");
+ ANS_LOGE("[HandleRemoveNotification] fail: read notificationId failed");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string label;
if (!data.ReadString(label)) {
- ANS_LOGW("[HandleRemoveNotification] fail: read label failed");
+ ANS_LOGE("[HandleRemoveNotification] fail: read label failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = RemoveNotification(bundleOption, notificationId, label);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveNotification] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveNotification] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -906,13 +906,13 @@ ErrCode AnsManagerStub::HandleRemoveAllNotifications(MessageParcel &data, Messag
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleRemoveAllNotifications] fail: read bundle failed.");
+ ANS_LOGE("[HandleRemoveAllNotifications] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = RemoveAllNotifications(bundleOption);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveAllNotifications] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveAllNotifications] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -922,13 +922,13 @@ ErrCode AnsManagerStub::HandleDelete(MessageParcel &data, MessageParcel &reply)
{
std::string key;
if (!data.ReadString(key)) {
- ANS_LOGW("[HandleDelete] fail: read key failed.");
+ ANS_LOGE("[HandleDelete] fail: read key failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = Delete(key);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleDelete] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleDelete] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -938,13 +938,13 @@ ErrCode AnsManagerStub::HandleDeleteByBundle(MessageParcel &data, MessageParcel
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleDeleteByBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleDeleteByBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = DeleteByBundle(bundleOption);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleDeleteByBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleDeleteByBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -954,7 +954,7 @@ ErrCode AnsManagerStub::HandleDeleteAll(MessageParcel &data, MessageParcel &repl
{
ErrCode result = DeleteAll();
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleDeleteAll] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleDeleteAll] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -964,14 +964,14 @@ ErrCode AnsManagerStub::HandleGetSlotsByBundle(MessageParcel &data, MessageParce
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleGetSlotsByBundle] fail: read bundleOption failed.");
+ ANS_LOGE("[HandleGetSlotsByBundle] fail: read bundleOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
std::vector> slots;
ErrCode result = GetSlotsByBundle(bundleOption, slots);
if (!WriteParcelableVector(slots, reply, result)) {
- ANS_LOGW("[HandleGetSlotsByBundle] fail: write slots failed.");
+ ANS_LOGE("[HandleGetSlotsByBundle] fail: write slots failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -981,19 +981,19 @@ ErrCode AnsManagerStub::HandleUpdateSlots(MessageParcel &data, MessageParcel &re
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleUpdateSlots] fail: read bundleOption failed.");
+ ANS_LOGE("[HandleUpdateSlots] fail: read bundleOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
std::vector> slots;
if (!ReadParcelableVector(slots, data)) {
- ANS_LOGW("[HandleUpdateSlots] fail: read slots failed");
+ ANS_LOGE("[HandleUpdateSlots] fail: read slots failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = UpdateSlots(bundleOption, slots);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleUpdateSlots] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleUpdateSlots] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1003,19 +1003,19 @@ ErrCode AnsManagerStub::HandleUpdateSlotGroups(MessageParcel &data, MessageParce
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleUpdateSlotGroups] fail: read bundle failed.");
+ ANS_LOGE("[HandleUpdateSlotGroups] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
std::vector> groups;
if (!ReadParcelableVector(groups, data)) {
- ANS_LOGW("[HandleUpdateSlotGroups] fail: read groups failed");
+ ANS_LOGE("[HandleUpdateSlotGroups] fail: read groups failed");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = UpdateSlotGroups(bundleOption, groups);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleUpdateSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleUpdateSlotGroups] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1025,13 +1025,13 @@ ErrCode AnsManagerStub::HandleRequestEnableNotification(MessageParcel &data, Mes
{
std::string deviceId;
if (!data.ReadString(deviceId)) {
- ANS_LOGW("[HandleRequestEnableNotification] fail: read deviceId failed.");
+ ANS_LOGE("[HandleRequestEnableNotification] fail: read deviceId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = RequestEnableNotification(deviceId);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRequestEnableNotification] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRequestEnableNotification] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1041,19 +1041,19 @@ ErrCode AnsManagerStub::HandleSetNotificationsEnabledForBundle(MessageParcel &da
{
std::string deviceId;
if (!data.ReadString(deviceId)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForBundle] fail: read deviceId failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForBundle] fail: read deviceId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForBundle] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForBundle] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationsEnabledForBundle(deviceId, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetNotificationsEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1063,19 +1063,19 @@ ErrCode AnsManagerStub::HandleSetNotificationsEnabledForAllBundles(MessageParcel
{
std::string deviceId;
if (!data.ReadString(deviceId)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForAllBundles] fail: read deviceId failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForAllBundles] fail: read deviceId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForAllBundles] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForAllBundles] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationsEnabledForAllBundles(deviceId, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForAllBundles] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetNotificationsEnabledForAllBundles] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1085,25 +1085,25 @@ ErrCode AnsManagerStub::HandleSetNotificationsEnabledForSpecialBundle(MessagePar
{
std::string deviceId;
if (!data.ReadString(deviceId)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForSpecialBundle] fail: read deviceId failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForSpecialBundle] fail: read deviceId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleSetNotificationsEnabledForSpecialBundle] fail: read bundleOption failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForSpecialBundle] fail: read bundleOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetNotificationsEnabledForSpecialBundle] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledForSpecialBundle] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationsEnabledForSpecialBundle(deviceId, bundleOption, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW(
+ ANS_LOGE(
"[HandleSetNotificationsEnabledForSpecialBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1114,19 +1114,19 @@ ErrCode AnsManagerStub::HandleSetShowBadgeEnabledForBundle(MessageParcel &data,
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleSetShowBadgeEnabledForBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleSetShowBadgeEnabledForBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetShowBadgeEnabledForBundle] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetShowBadgeEnabledForBundle] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetShowBadgeEnabledForBundle(bundleOption, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetShowBadgeEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetShowBadgeEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1136,19 +1136,19 @@ ErrCode AnsManagerStub::HandleGetShowBadgeEnabledForBundle(MessageParcel &data,
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleGetShowBadgeEnabledForBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleGetShowBadgeEnabledForBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
ErrCode result = GetShowBadgeEnabledForBundle(bundleOption, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetShowBadgeEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetShowBadgeEnabledForBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(enabled)) {
- ANS_LOGW("[HandleGetShowBadgeEnabledForBundle] fail: write enabled failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetShowBadgeEnabledForBundle] fail: write enabled failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1159,12 +1159,12 @@ ErrCode AnsManagerStub::HandleGetShowBadgeEnabled(MessageParcel &data, MessagePa
bool enabled = false;
ErrCode result = GetShowBadgeEnabled(enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetShowBadgeEnabled] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetShowBadgeEnabled] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(enabled)) {
- ANS_LOGW("[HandleGetShowBadgeEnabled] fail: write enabled failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetShowBadgeEnabled] fail: write enabled failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1174,13 +1174,13 @@ ErrCode AnsManagerStub::HandleSubscribe(MessageParcel &data, MessageParcel &repl
{
sptr subscriber = data.ReadRemoteObject();
if (subscriber == nullptr) {
- ANS_LOGW("[HandleSubscribe] fail: read subscriber failed");
+ ANS_LOGE("[HandleSubscribe] fail: read subscriber failed");
return ERR_ANS_PARCELABLE_FAILED;
}
bool subcribeInfo = false;
if (!data.ReadBool(subcribeInfo)) {
- ANS_LOGW("[HandleSubscribe] fail: read isSubcribeInfo failed");
+ ANS_LOGE("[HandleSubscribe] fail: read isSubcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1188,14 +1188,14 @@ ErrCode AnsManagerStub::HandleSubscribe(MessageParcel &data, MessageParcel &repl
if (subcribeInfo) {
info = data.ReadParcelable();
if (info == nullptr) {
- ANS_LOGW("[HandleSubscribe] fail: read info failed");
+ ANS_LOGE("[HandleSubscribe] fail: read info failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
ErrCode result = Subscribe(iface_cast(subscriber), info);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSubscribe] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSubscribe] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1205,13 +1205,13 @@ ErrCode AnsManagerStub::HandleUnsubscribe(MessageParcel &data, MessageParcel &re
{
sptr subscriber = data.ReadRemoteObject();
if (subscriber == nullptr) {
- ANS_LOGW("[HandleUnsubscribe] fail: read subscriber failed");
+ ANS_LOGE("[HandleUnsubscribe] fail: read subscriber failed");
return ERR_ANS_PARCELABLE_FAILED;
}
bool subcribeInfo = false;
if (!data.ReadBool(subcribeInfo)) {
- ANS_LOGW("[HandleUnsubscribe] fail: read isSubcribeInfo failed");
+ ANS_LOGE("[HandleUnsubscribe] fail: read isSubcribeInfo failed");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1219,14 +1219,14 @@ ErrCode AnsManagerStub::HandleUnsubscribe(MessageParcel &data, MessageParcel &re
if (subcribeInfo) {
info = data.ReadParcelable();
if (info == nullptr) {
- ANS_LOGW("[HandleUnsubscribe] fail: read info failed");
+ ANS_LOGE("[HandleUnsubscribe] fail: read info failed");
return ERR_ANS_PARCELABLE_FAILED;
}
}
ErrCode result = Unsubscribe(iface_cast(subscriber), info);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleUnsubscribe] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleUnsubscribe] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1237,12 +1237,12 @@ ErrCode AnsManagerStub::HandleAreNotificationsSuspended(MessageParcel &data, Mes
bool suspended = false;
ErrCode result = AreNotificationsSuspended(suspended);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleAreNotificationsSuspended] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleAreNotificationsSuspended] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(suspended)) {
- ANS_LOGW("[HandleAreNotificationsSuspended] fail: write suspended failed.");
+ ANS_LOGE("[HandleAreNotificationsSuspended] fail: write suspended failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1253,12 +1253,12 @@ ErrCode AnsManagerStub::HandleGetCurrentAppSorting(MessageParcel &data, MessageP
sptr sortingMap;
ErrCode result = GetCurrentAppSorting(sortingMap);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetCurrentAppSorting] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetCurrentAppSorting] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteParcelable(sortingMap)) {
- ANS_LOGW("[HandleGetCurrentAppSorting] fail: write sortingMap failed.");
+ ANS_LOGE("[HandleGetCurrentAppSorting] fail: write sortingMap failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1269,12 +1269,12 @@ ErrCode AnsManagerStub::HandleIsAllowedNotify(MessageParcel &data, MessageParcel
bool allowed = false;
ErrCode result = IsAllowedNotify(allowed);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsAllowedNotify] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsAllowedNotify] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(allowed)) {
- ANS_LOGW("[HandleIsAllowedNotify] fail: write allowed failed.");
+ ANS_LOGE("[HandleIsAllowedNotify] fail: write allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1285,12 +1285,12 @@ ErrCode AnsManagerStub::HandleIsAllowedNotifySelf(MessageParcel &data, MessagePa
bool allowed = false;
ErrCode result = IsAllowedNotifySelf(allowed);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsAllowedNotifySelf] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsAllowedNotifySelf] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(allowed)) {
- ANS_LOGW("[HandleIsAllowedNotifySelf] fail: write allowed failed.");
+ ANS_LOGE("[HandleIsAllowedNotifySelf] fail: write allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1300,19 +1300,19 @@ ErrCode AnsManagerStub::HandleIsSpecialBundleAllowedNotify(MessageParcel &data,
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: read bundle failed.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool allowed = false;
ErrCode result = IsSpecialBundleAllowedNotify(bundleOption, allowed);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(allowed)) {
- ANS_LOGW("[IsSpecialBundleAllowedNotify] fail: write allowed failed.");
+ ANS_LOGE("[IsSpecialBundleAllowedNotify] fail: write allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1322,13 +1322,13 @@ ErrCode AnsManagerStub::HandleCancelGroup(MessageParcel &data, MessageParcel &re
{
std::string groupName;
if (!data.ReadString(groupName)) {
- ANS_LOGW("[HandleCancelGroup] fail: read groupName failed.");
+ ANS_LOGE("[HandleCancelGroup] fail: read groupName failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = CancelGroup(groupName);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleCancelGroup] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleCancelGroup] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1338,19 +1338,19 @@ ErrCode AnsManagerStub::HandleRemoveGroupByBundle(MessageParcel &data, MessagePa
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleRemoveGroupByBundle] fail: read bundleOption failed.");
+ ANS_LOGE("[HandleRemoveGroupByBundle] fail: read bundleOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
std::string groupName;
if (!data.ReadString(groupName)) {
- ANS_LOGW("[HandleRemoveGroupByBundle] fail: read groupName failed.");
+ ANS_LOGE("[HandleRemoveGroupByBundle] fail: read groupName failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = RemoveGroupByBundle(bundleOption, groupName);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleRemoveGroupByBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleRemoveGroupByBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1361,12 +1361,12 @@ ErrCode AnsManagerStub::HandleIsDistributedEnabled(MessageParcel &data, MessageP
bool enabled = false;
ErrCode result = IsDistributedEnabled(enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsDistributedEnabled] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsDistributedEnabled] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(enabled)) {
- ANS_LOGW("[HandleIsDistributedEnabled] fail: write enabled failed.");
+ ANS_LOGE("[HandleIsDistributedEnabled] fail: write enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1377,13 +1377,13 @@ ErrCode AnsManagerStub::HandleEnableDistributed(MessageParcel &data, MessageParc
{
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleEnableDistributed] fail: read enabled failed.");
+ ANS_LOGE("[HandleEnableDistributed] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = EnableDistributed(enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleEnableDistributed] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleEnableDistributed] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1394,19 +1394,19 @@ ErrCode AnsManagerStub::HandleEnableDistributedByBundle(MessageParcel &data, Mes
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleEnableDistributedByBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleEnableDistributedByBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleEnableDistributedByBundle] fail: read enabled failed.");
+ ANS_LOGE("[HandleEnableDistributedByBundle] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = EnableDistributedByBundle(bundleOption, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleEnableDistributedByBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleEnableDistributedByBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1417,13 +1417,13 @@ ErrCode AnsManagerStub::HandleEnableDistributedSelf(MessageParcel &data, Message
{
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleEnableDistributedSelf] fail: read enabled failed.");
+ ANS_LOGE("[HandleEnableDistributedSelf] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = EnableDistributedSelf(enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleEnableDistributedSelf] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleEnableDistributedSelf] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1434,19 +1434,19 @@ ErrCode AnsManagerStub::HandleIsDistributedEnableByBundle(MessageParcel &data, M
{
sptr bundleOption = data.ReadParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleIsDistributedEnableByBundle] fail: read bundle failed.");
+ ANS_LOGE("[HandleIsDistributedEnableByBundle] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
ErrCode result = IsDistributedEnableByBundle(bundleOption, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsDistributedEnableByBundle] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsDistributedEnableByBundle] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(enabled)) {
- ANS_LOGW("[HandleIsDistributedEnableByBundle] fail: write enabled failed.");
+ ANS_LOGE("[HandleIsDistributedEnableByBundle] fail: write enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1458,12 +1458,12 @@ ErrCode AnsManagerStub::HandleGetDeviceRemindType(MessageParcel &data, MessagePa
auto rType {NotificationConstant::RemindType::NONE};
ErrCode result = GetDeviceRemindType(rType);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetDeviceRemindType] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetDeviceRemindType] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteInt32(static_cast(rType))) {
- ANS_LOGW("[HandleGetDeviceRemindType] fail: write remind type failed.");
+ ANS_LOGE("[HandleGetDeviceRemindType] fail: write remind type failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1474,19 +1474,19 @@ ErrCode AnsManagerStub::HandleShellDump(MessageParcel &data, MessageParcel &repl
{
std::string dumpOption;
if (!data.ReadString(dumpOption)) {
- ANS_LOGW("[HandleShellDump] fail: read dumpOption failed.");
+ ANS_LOGE("[HandleShellDump] fail: read dumpOption failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
std::vector notificationsInfo;
ErrCode result = ShellDump(dumpOption, notificationsInfo);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetRecentNotificationsInfo] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetRecentNotificationsInfo] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteStringVector(notificationsInfo)) {
- ANS_LOGW("[HandleGetRecentNotificationsInfo] fail: write notificationsInfo failed.");
+ ANS_LOGE("[HandleGetRecentNotificationsInfo] fail: write notificationsInfo failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1579,18 +1579,18 @@ bool AnsManagerStub::WriteParcelableVector(
const std::vector> &parcelableVector, MessageParcel &reply, ErrCode &result)
{
if (!reply.WriteInt32(result)) {
- ANS_LOGW("write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("write result failed, ErrCode=%{public}d", result);
return false;
}
if (!reply.WriteInt32(parcelableVector.size())) {
- ANS_LOGW("write ParcelableVector size failed");
+ ANS_LOGE("write ParcelableVector size failed");
return false;
}
for (auto &parcelable : parcelableVector) {
if (!reply.WriteStrongParcelable(parcelable)) {
- ANS_LOGW("write ParcelableVector failed");
+ ANS_LOGE("write ParcelableVector failed");
return false;
}
}
@@ -1602,7 +1602,7 @@ bool AnsManagerStub::ReadParcelableVector(std::vector> &parcelableInfos,
{
int32_t infoSize = 0;
if (!data.ReadInt32(infoSize)) {
- ANS_LOGW("read Parcelable size failed.");
+ ANS_LOGE("read Parcelable size failed.");
return false;
}
@@ -1610,7 +1610,7 @@ bool AnsManagerStub::ReadParcelableVector(std::vector> &parcelableInfos,
for (int32_t index = 0; index < infoSize; index++) {
sptr info = data.ReadStrongParcelable();
if (info == nullptr) {
- ANS_LOGW("read Parcelable infos failed.");
+ ANS_LOGE("read Parcelable infos failed.");
return false;
}
parcelableInfos.emplace_back(info);
@@ -1623,7 +1623,7 @@ ErrCode AnsManagerStub::HandleIsSupportTemplate(MessageParcel &data, MessageParc
{
std::string templateName;
if (!data.ReadString(templateName)) {
- ANS_LOGW("[HandleIsSupportTemplate] fail: read template name failed.");
+ ANS_LOGE("[HandleIsSupportTemplate] fail: read template name failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1631,12 +1631,12 @@ ErrCode AnsManagerStub::HandleIsSupportTemplate(MessageParcel &data, MessageParc
ErrCode result = IsSupportTemplate(templateName, support);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsSupportTemplate] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsSupportTemplate] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(support)) {
- ANS_LOGW("[HandleIsSupportTemplate] fail: write support failed.");
+ ANS_LOGE("[HandleIsSupportTemplate] fail: write support failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1646,19 +1646,19 @@ ErrCode AnsManagerStub::HandleIsSpecialUserAllowedNotifyByUser(MessageParcel &da
{
int32_t userId = SUBSCRIBE_USER_INIT;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleIsSpecialUserAllowedNotifyByUser] fail: read userId failed.");
+ ANS_LOGE("[HandleIsSpecialUserAllowedNotifyByUser] fail: read userId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool allowed = false;
ErrCode result = IsSpecialUserAllowedNotify(userId, allowed);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleIsSpecialUserAllowedNotifyByUser] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleIsSpecialUserAllowedNotifyByUser] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(allowed)) {
- ANS_LOGW("[HandleIsSpecialUserAllowedNotifyByUser] fail: write allowed failed.");
+ ANS_LOGE("[HandleIsSpecialUserAllowedNotifyByUser] fail: write allowed failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1668,19 +1668,19 @@ ErrCode AnsManagerStub::HandleSetNotificationsEnabledByUser(MessageParcel &data,
{
int32_t userId = SUBSCRIBE_USER_INIT;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleSetNotificationsEnabledByUser] fail: read userId failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledByUser] fail: read userId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetNotificationsEnabledByUser] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetNotificationsEnabledByUser] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetNotificationsEnabledByUser(userId, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetNotificationsEnabledByUser] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetNotificationsEnabledByUser] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1690,13 +1690,13 @@ ErrCode AnsManagerStub::HandleDeleteAllByUser(MessageParcel &data, MessageParcel
{
int32_t userId = SUBSCRIBE_USER_INIT;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleDeleteAllByUser] fail: read userId failed.");
+ ANS_LOGE("[HandleDeleteAllByUser] fail: read userId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = DeleteAllByUser(userId);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleDeleteAllByUser] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleDeleteAllByUser] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
return ERR_OK;
@@ -1706,19 +1706,19 @@ ErrCode AnsManagerStub::HandleSetDoNotDisturbDateByUser(MessageParcel &data, Mes
{
int32_t userId = SUBSCRIBE_USER_INIT;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleSetDoNotDisturbDateByUser] fail: read userId failed.");
+ ANS_LOGE("[HandleSetDoNotDisturbDateByUser] fail: read userId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
sptr date = data.ReadParcelable();
if (date == nullptr) {
- ANS_LOGW("[HandleSetDoNotDisturbDateByUser] fail: read date failed.");
+ ANS_LOGE("[HandleSetDoNotDisturbDateByUser] fail: read date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetDoNotDisturbDate(userId, date);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetDoNotDisturbDateByUser] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetDoNotDisturbDateByUser] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1729,20 +1729,20 @@ ErrCode AnsManagerStub::HandleGetDoNotDisturbDateByUser(MessageParcel &data, Mes
{
int32_t userId = SUBSCRIBE_USER_INIT;
if (!data.ReadInt32(userId)) {
- ANS_LOGW("[HandleGetDoNotDisturbDateByUser] fail: read userId failed.");
+ ANS_LOGE("[HandleGetDoNotDisturbDateByUser] fail: read userId failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
sptr date = nullptr;
ErrCode result = GetDoNotDisturbDate(userId, date);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetDoNotDisturbDateByUser] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetDoNotDisturbDateByUser] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (result == ERR_OK) {
if (!reply.WriteParcelable(date)) {
- ANS_LOGW("[HandleGetDoNotDisturbDateByUser] fail: write date failed.");
+ ANS_LOGE("[HandleGetDoNotDisturbDateByUser] fail: write date failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
}
@@ -1754,26 +1754,26 @@ ErrCode AnsManagerStub::HandleSetEnabledForBundleSlot(MessageParcel &data, Messa
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleSetEnabledForBundleSlot] fail: read bundle failed.");
+ ANS_LOGE("[HandleSetEnabledForBundleSlot] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
int32_t type = 0;
if (!data.ReadInt32(type)) {
- ANS_LOGW("[HandleSetEnabledForBundleSlot] fail: read slot type failed.");
+ ANS_LOGE("[HandleSetEnabledForBundleSlot] fail: read slot type failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
NotificationConstant::SlotType slotType = static_cast(type);
bool enabled = false;
if (!data.ReadBool(enabled)) {
- ANS_LOGW("[HandleSetEnabledForBundleSlot] fail: read enabled failed.");
+ ANS_LOGE("[HandleSetEnabledForBundleSlot] fail: read enabled failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
ErrCode result = SetEnabledForBundleSlot(bundleOption, slotType, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleSetEnabledForBundleSlot] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleSetEnabledForBundleSlot] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1784,13 +1784,13 @@ ErrCode AnsManagerStub::HandleGetEnabledForBundleSlot(MessageParcel &data, Messa
{
sptr bundleOption = data.ReadStrongParcelable();
if (bundleOption == nullptr) {
- ANS_LOGW("[HandleGetEnabledForBundleSlot] fail: read bundle failed.");
+ ANS_LOGE("[HandleGetEnabledForBundleSlot] fail: read bundle failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
int32_t type = 0;
if (!data.ReadInt32(type)) {
- ANS_LOGW("[HandleGetEnabledForBundleSlot] fail: read slot type failed.");
+ ANS_LOGE("[HandleGetEnabledForBundleSlot] fail: read slot type failed.");
return ERR_ANS_PARCELABLE_FAILED;
}
NotificationConstant::SlotType slotType = static_cast(type);
@@ -1798,12 +1798,12 @@ ErrCode AnsManagerStub::HandleGetEnabledForBundleSlot(MessageParcel &data, Messa
bool enabled = false;
ErrCode result = GetEnabledForBundleSlot(bundleOption, slotType, enabled);
if (!reply.WriteInt32(result)) {
- ANS_LOGW("[HandleGetEnabledForBundleSlot] fail: write result failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetEnabledForBundleSlot] fail: write result failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
if (!reply.WriteBool(enabled)) {
- ANS_LOGW("[HandleGetEnabledForBundleSlot] fail: write enabled failed, ErrCode=%{public}d", result);
+ ANS_LOGE("[HandleGetEnabledForBundleSlot] fail: write enabled failed, ErrCode=%{public}d", result);
return ERR_ANS_PARCELABLE_FAILED;
}
@@ -1812,473 +1812,473 @@ ErrCode AnsManagerStub::HandleGetEnabledForBundleSlot(MessageParcel &data, Messa
ErrCode AnsManagerStub::Publish(const std::string &label, const sptr ¬ification)
{
- ANS_LOGW("AnsManagerStub::Publish called!");
+ ANS_LOGE("AnsManagerStub::Publish called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::PublishToDevice(const sptr ¬ification, const std::string &deviceId)
{
- ANS_LOGW("AnsManagerStub::PublishToDevice called!");
+ ANS_LOGE("AnsManagerStub::PublishToDevice called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::Cancel(int notificationId, const std::string &label)
{
- ANS_LOGW("AnsManagerStub::Cancel called!");
+ ANS_LOGE("AnsManagerStub::Cancel called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelAll()
{
- ANS_LOGW("AnsManagerStub::CancelAll called!");
+ ANS_LOGE("AnsManagerStub::CancelAll called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelAsBundle(int32_t notificationId, const std::string &representativeBundle, int32_t userId)
{
- ANS_LOGW("AnsManagerStub::CancelAsBundle called!");
+ ANS_LOGE("AnsManagerStub::CancelAsBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::AddSlotByType(NotificationConstant::SlotType slotType)
{
- ANS_LOGW("AnsManagerStub::AddSlotByType called!");
+ ANS_LOGE("AnsManagerStub::AddSlotByType called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::AddSlots(const std::vector> &slots)
{
- ANS_LOGW("AnsManagerStub::AddSlots called!");
+ ANS_LOGE("AnsManagerStub::AddSlots called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveSlotByType(const NotificationConstant::SlotType &slotType)
{
- ANS_LOGW("AnsManagerStub::RemoveSlotByType called!");
+ ANS_LOGE("AnsManagerStub::RemoveSlotByType called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveAllSlots()
{
- ANS_LOGW("AnsManagerStub::RemoveAllSlots called!");
+ ANS_LOGE("AnsManagerStub::RemoveAllSlots called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::AddSlotGroups(std::vector> groups)
{
- ANS_LOGW("AnsManagerStub::AddSlotGroups called!");
+ ANS_LOGE("AnsManagerStub::AddSlotGroups called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlotByType(const NotificationConstant::SlotType &slotType, sptr &slot)
{
- ANS_LOGW("AnsManagerStub::GetSlotByType called!");
+ ANS_LOGE("AnsManagerStub::GetSlotByType called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlots(std::vector> &slots)
{
- ANS_LOGW("AnsManagerStub::GetSlots called!");
+ ANS_LOGE("AnsManagerStub::GetSlots called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlotGroup(const std::string &groupId, sptr &group)
{
- ANS_LOGW("AnsManagerStub::GetSlotGroup called!");
+ ANS_LOGE("AnsManagerStub::GetSlotGroup called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlotGroups(std::vector> &groups)
{
- ANS_LOGW("AnsManagerStub::GetSlotGroups called!");
+ ANS_LOGE("AnsManagerStub::GetSlotGroups called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlotNumAsBundle(const sptr &bundleOption, uint64_t &num)
{
- ANS_LOGW("AnsManagerStub::GetSlotNumAsBundle called!");
+ ANS_LOGE("AnsManagerStub::GetSlotNumAsBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveSlotGroups(const std::vector &groupIds)
{
- ANS_LOGW("AnsManagerStub::RemoveSlotGroups called!");
+ ANS_LOGE("AnsManagerStub::RemoveSlotGroups called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetActiveNotifications(std::vector> ¬ifications)
{
- ANS_LOGW("AnsManagerStub::GetActiveNotifications called!");
+ ANS_LOGE("AnsManagerStub::GetActiveNotifications called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetActiveNotificationNums(uint64_t &num)
{
- ANS_LOGW("AnsManagerStub::GetActiveNotificationNums called!");
+ ANS_LOGE("AnsManagerStub::GetActiveNotificationNums called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetAllActiveNotifications(std::vector> ¬ifications)
{
- ANS_LOGW("AnsManagerStub::GetAllActiveNotifications called!");
+ ANS_LOGE("AnsManagerStub::GetAllActiveNotifications called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSpecialActiveNotifications(
const std::vector &key, std::vector> ¬ifications)
{
- ANS_LOGW("AnsManagerStub::GetSpecialActiveNotifications called!");
+ ANS_LOGE("AnsManagerStub::GetSpecialActiveNotifications called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationAgent(const std::string &agent)
{
- ANS_LOGW("AnsManagerStub::SetNotificationAgent called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationAgent called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetNotificationAgent(std::string &agent)
{
- ANS_LOGW("AnsManagerStub::GetNotificationAgent called!");
+ ANS_LOGE("AnsManagerStub::GetNotificationAgent called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CanPublishAsBundle(const std::string &representativeBundle, bool &canPublish)
{
- ANS_LOGW("AnsManagerStub::CanPublishAsBundle called!");
+ ANS_LOGE("AnsManagerStub::CanPublishAsBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::PublishAsBundle(
const sptr notification, const std::string &representativeBundle)
{
- ANS_LOGW("AnsManagerStub::PublishAsBundle called!");
+ ANS_LOGE("AnsManagerStub::PublishAsBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationBadgeNum(int num)
{
- ANS_LOGW("AnsManagerStub::SetNotificationBadgeNum called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationBadgeNum called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetBundleImportance(int &importance)
{
- ANS_LOGW("AnsManagerStub::GetBundleImportance called!");
+ ANS_LOGE("AnsManagerStub::GetBundleImportance called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::HasNotificationPolicyAccessPermission(bool &granted)
{
- ANS_LOGW("AnsManagerStub::HasNotificationPolicyAccessPermission called!");
+ ANS_LOGE("AnsManagerStub::HasNotificationPolicyAccessPermission called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetPrivateNotificationsAllowed(bool allow)
{
- ANS_LOGW("AnsManagerStub::SetPrivateNotificationsAllowed called!");
+ ANS_LOGE("AnsManagerStub::SetPrivateNotificationsAllowed called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetPrivateNotificationsAllowed(bool &allow)
{
- ANS_LOGW("AnsManagerStub::GetPrivateNotificationsAllowed called!");
+ ANS_LOGE("AnsManagerStub::GetPrivateNotificationsAllowed called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveNotification(
const sptr &bundleOption, int notificationId, const std::string &label)
{
- ANS_LOGW("AnsManagerStub::RemoveNotification called!");
+ ANS_LOGE("AnsManagerStub::RemoveNotification called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveAllNotifications(const sptr &bundleOption)
{
- ANS_LOGW("AnsManagerStub::RemoveAllNotifications called!");
+ ANS_LOGE("AnsManagerStub::RemoveAllNotifications called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::Delete(const std::string &key)
{
- ANS_LOGW("AnsManagerStub::Delete called!");
+ ANS_LOGE("AnsManagerStub::Delete called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::DeleteByBundle(const sptr &bundleOption)
{
- ANS_LOGW("AnsManagerStub::DeleteByBundle called!");
+ ANS_LOGE("AnsManagerStub::DeleteByBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::DeleteAll()
{
- ANS_LOGW("AnsManagerStub::DeleteAll called!");
+ ANS_LOGE("AnsManagerStub::DeleteAll called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetSlotsByBundle(
const sptr &bundleOption, std::vector> &slots)
{
- ANS_LOGW("AnsManagerStub::GetSlotsByBundle called!");
+ ANS_LOGE("AnsManagerStub::GetSlotsByBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::UpdateSlots(
const sptr &bundleOption, const std::vector> &slots)
{
- ANS_LOGW("AnsManagerStub::UpdateSlots called!");
+ ANS_LOGE("AnsManagerStub::UpdateSlots called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::UpdateSlotGroups(
const sptr &bundleOption, const std::vector> &groups)
{
- ANS_LOGW("AnsManagerStub::UpdateSlotGroups called!");
+ ANS_LOGE("AnsManagerStub::UpdateSlotGroups called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RequestEnableNotification(const std::string &deviceId)
{
- ANS_LOGW("AnsManagerStub::RequestEnableNotification called!");
+ ANS_LOGE("AnsManagerStub::RequestEnableNotification called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationsEnabledForBundle(const std::string &bundle, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetNotificationsEnabledForBundle called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationsEnabledForAllBundles(const std::string &deviceId, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetNotificationsEnabledForAllBundles called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForAllBundles called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationsEnabledForSpecialBundle(
const std::string &deviceId, const sptr &bundleOption, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetNotificationsEnabledForSpecialBundle called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationsEnabledForSpecialBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetShowBadgeEnabledForBundle(const sptr &bundleOption, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetShowBadgeEnabledForBundle called!");
+ ANS_LOGE("AnsManagerStub::SetShowBadgeEnabledForBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetShowBadgeEnabledForBundle(const sptr &bundleOption, bool &enabled)
{
- ANS_LOGW("AnsManagerStub::GetShowBadgeEnabledForBundle called!");
+ ANS_LOGE("AnsManagerStub::GetShowBadgeEnabledForBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetShowBadgeEnabled(bool &enabled)
{
- ANS_LOGW("AnsManagerStub::GetShowBadgeEnabled called!");
+ ANS_LOGE("AnsManagerStub::GetShowBadgeEnabled called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::Subscribe(const sptr &subscriber, const sptr &info)
{
- ANS_LOGW("AnsManagerStub::Subscribe called!");
+ ANS_LOGE("AnsManagerStub::Subscribe called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::Unsubscribe(const sptr &subscriber, const sptr &info)
{
- ANS_LOGW("AnsManagerStub::Unsubscribe called!");
+ ANS_LOGE("AnsManagerStub::Unsubscribe called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::AreNotificationsSuspended(bool &suspended)
{
- ANS_LOGW("AnsManagerStub::AreNotificationsSuspended called!");
+ ANS_LOGE("AnsManagerStub::AreNotificationsSuspended called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetCurrentAppSorting(sptr &sortingMap)
{
- ANS_LOGW("AnsManagerStub::GetCurrentAppSorting called!");
+ ANS_LOGE("AnsManagerStub::GetCurrentAppSorting called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsAllowedNotify(bool &allowed)
{
- ANS_LOGW("AnsManagerStub::IsAllowedNotify called!");
+ ANS_LOGE("AnsManagerStub::IsAllowedNotify called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsAllowedNotifySelf(bool &allowed)
{
- ANS_LOGW("AnsManagerStub::IsAllowedNotifySelf called!");
+ ANS_LOGE("AnsManagerStub::IsAllowedNotifySelf called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsSpecialBundleAllowedNotify(const sptr &bundleOption, bool &allowed)
{
- ANS_LOGW("AnsManagerStub::IsSpecialBundleAllowedNotify called!");
+ ANS_LOGE("AnsManagerStub::IsSpecialBundleAllowedNotify called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelGroup(const std::string &groupName)
{
- ANS_LOGW("AnsManagerStub::CancelGroup called!");
+ ANS_LOGE("AnsManagerStub::CancelGroup called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::RemoveGroupByBundle(
const sptr &bundleOption, const std::string &groupName)
{
- ANS_LOGW("AnsManagerStub::RemoveGroupByBundle called!");
+ ANS_LOGE("AnsManagerStub::RemoveGroupByBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetDoNotDisturbDate(const sptr &date)
{
- ANS_LOGW("AnsManagerStub::SetDoNotDisturbDate called!");
+ ANS_LOGE("AnsManagerStub::SetDoNotDisturbDate called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetDoNotDisturbDate(sptr &date)
{
- ANS_LOGW("AnsManagerStub::GetDoNotDisturbDate called!");
+ ANS_LOGE("AnsManagerStub::GetDoNotDisturbDate called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::DoesSupportDoNotDisturbMode(bool &doesSupport)
{
- ANS_LOGW("AnsManagerStub::DoesSupportDoNotDisturbMode called!");
+ ANS_LOGE("AnsManagerStub::DoesSupportDoNotDisturbMode called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsDistributedEnabled(bool &enabled)
{
- ANS_LOGW("AnsManagerStub::IsDistributedEnabled called!");
+ ANS_LOGE("AnsManagerStub::IsDistributedEnabled called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::EnableDistributed(bool enabled)
{
- ANS_LOGW("AnsManagerStub::EnableDistributed called!");
+ ANS_LOGE("AnsManagerStub::EnableDistributed called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::EnableDistributedByBundle(const sptr &bundleOption, bool enabled)
{
- ANS_LOGW("AnsManagerStub::EnableDistributedByBundle called!");
+ ANS_LOGE("AnsManagerStub::EnableDistributedByBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::EnableDistributedSelf(bool enabled)
{
- ANS_LOGW("AnsManagerStub::EnableDistributedSelf called!");
+ ANS_LOGE("AnsManagerStub::EnableDistributedSelf called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsDistributedEnableByBundle(const sptr &bundleOption, bool &enabled)
{
- ANS_LOGW("AnsManagerStub::IsDistributedEnableByBundle called!");
+ ANS_LOGE("AnsManagerStub::IsDistributedEnableByBundle called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetDeviceRemindType(NotificationConstant::RemindType &remindType)
{
- ANS_LOGW("AnsManagerStub::GetDeviceRemindType called!");
+ ANS_LOGE("AnsManagerStub::GetDeviceRemindType called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::ShellDump(const std::string &dumpOption, std::vector &dumpInfo)
{
- ANS_LOGW("AnsManagerStub::ShellDump called!");
+ ANS_LOGE("AnsManagerStub::ShellDump called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::PublishContinuousTaskNotification(const sptr &request)
{
- ANS_LOGW("AnsManagerStub::PublishContinuousTaskNotification called!");
+ ANS_LOGE("AnsManagerStub::PublishContinuousTaskNotification called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelContinuousTaskNotification(const std::string &label, int32_t notificationId)
{
- ANS_LOGW("AnsManagerStub::CancelContinuousTaskNotification called!");
+ ANS_LOGE("AnsManagerStub::CancelContinuousTaskNotification called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::PublishReminder(sptr &reminder)
{
- ANS_LOGW("AnsManagerStub::PublishReminder called!");
+ ANS_LOGE("AnsManagerStub::PublishReminder called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelReminder(const int32_t reminderId)
{
- ANS_LOGW("AnsManagerStub::CancelReminder called!");
+ ANS_LOGE("AnsManagerStub::CancelReminder called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetValidReminders(std::vector> &reminders)
{
- ANS_LOGW("AnsManagerStub::getValidReminders called!");
+ ANS_LOGE("AnsManagerStub::getValidReminders called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::CancelAllReminders()
{
- ANS_LOGW("AnsManagerStub::cancelAllReminders called!");
+ ANS_LOGE("AnsManagerStub::cancelAllReminders called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsSupportTemplate(const std::string &templateName, bool &support)
{
- ANS_LOGW("AnsManagerStub::IsSupportTemplate called!");
+ ANS_LOGE("AnsManagerStub::IsSupportTemplate called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::IsSpecialUserAllowedNotify(const int32_t &userId, bool &allowed)
{
- ANS_LOGW("AnsManagerStub::IsSpecialUserAllowedNotify called!");
+ ANS_LOGE("AnsManagerStub::IsSpecialUserAllowedNotify called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetNotificationsEnabledByUser(const int32_t &deviceId, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetNotificationsEnabledByUser called!");
+ ANS_LOGE("AnsManagerStub::SetNotificationsEnabledByUser called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::DeleteAllByUser(const int32_t &userId)
{
- ANS_LOGW("AnsManagerStub::DeleteAllByUser called!");
+ ANS_LOGE("AnsManagerStub::DeleteAllByUser called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetDoNotDisturbDate(const int32_t &userId, const sptr &date)
{
- ANS_LOGW("AnsManagerStub::SetDoNotDisturbDate called!");
+ ANS_LOGE("AnsManagerStub::SetDoNotDisturbDate called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetDoNotDisturbDate(const int32_t &userId, sptr &date)
{
- ANS_LOGW("AnsManagerStub::GetDoNotDisturbDate called!");
+ ANS_LOGE("AnsManagerStub::GetDoNotDisturbDate called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::SetEnabledForBundleSlot(
const sptr &bundleOption, const NotificationConstant::SlotType &slotType, bool enabled)
{
- ANS_LOGW("AnsManagerStub::SetEnabledForBundleSlot called!");
+ ANS_LOGE("AnsManagerStub::SetEnabledForBundleSlot called!");
return ERR_INVALID_OPERATION;
}
ErrCode AnsManagerStub::GetEnabledForBundleSlot(
const sptr &bundleOption, const NotificationConstant::SlotType &slotType, bool &enabled)
{
- ANS_LOGW("AnsManagerStub::GetEnabledForBundleSlot called!");
+ ANS_LOGE("AnsManagerStub::GetEnabledForBundleSlot called!");
return ERR_INVALID_OPERATION;
}
} // namespace Notification
diff --git a/frameworks/ans/core/src/ans_subscriber_proxy.cpp b/frameworks/ans/core/src/ans_subscriber_proxy.cpp
index 1cd184434981898d312dbd17636ed271096e10d8..148f1f1c9ca13b7510f95fa21b0414a4ef397012 100644
--- a/frameworks/ans/core/src/ans_subscriber_proxy.cpp
+++ b/frameworks/ans/core/src/ans_subscriber_proxy.cpp
@@ -33,7 +33,7 @@ ErrCode AnsSubscriberProxy::InnerTransact(
{
auto remote = Remote();
if (remote == nullptr) {
- ANS_LOGW("[InnerTransact] fail: get Remote fail code %{public}u", code);
+ ANS_LOGE("[InnerTransact] fail: get Remote fail code %{public}u", code);
return ERR_DEAD_OBJECT;
}
@@ -43,11 +43,11 @@ ErrCode AnsSubscriberProxy::InnerTransact(
return ERR_OK;
}
case DEAD_OBJECT: {
- ANS_LOGW("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
+ ANS_LOGE("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
return ERR_DEAD_OBJECT;
}
default: {
- ANS_LOGW("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
+ ANS_LOGE("[InnerTransact] fail: ipcErr=%{public}d code %{public}d", err, code);
return ERR_ANS_TRANSACT_FAILED;
}
}
@@ -57,7 +57,7 @@ void AnsSubscriberProxy::OnConnected()
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnConnected] fail: write interface token failed.");
+ ANS_LOGE("[OnConnected] fail: write interface token failed.");
return;
}
@@ -65,7 +65,7 @@ void AnsSubscriberProxy::OnConnected()
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_CONNECTED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnConnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnConnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -74,7 +74,7 @@ void AnsSubscriberProxy::OnDisconnected()
{
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnDisconnected] fail: write interface token failed.");
+ ANS_LOGE("[OnDisconnected] fail: write interface token failed.");
return;
}
@@ -82,7 +82,7 @@ void AnsSubscriberProxy::OnDisconnected()
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_DISCONNECTED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnDisconnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnDisconnected] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -90,18 +90,18 @@ void AnsSubscriberProxy::OnDisconnected()
void AnsSubscriberProxy::OnConsumed(const sptr ¬ification)
{
if (notification == nullptr) {
- ANS_LOGW("[OnConsumed] fail: notification is nullptr.");
+ ANS_LOGE("[OnConsumed] fail: notification is nullptr.");
return;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnConsumed] fail: write interface token failed.");
+ ANS_LOGE("[OnConsumed] fail: write interface token failed.");
return;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[OnConsumed] fail: write notification failed.");
+ ANS_LOGE("[OnConsumed] fail: write notification failed.");
return;
}
@@ -109,7 +109,7 @@ void AnsSubscriberProxy::OnConsumed(const sptr ¬ification)
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_CONSUMED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnConsumed] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnConsumed] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -118,29 +118,29 @@ void AnsSubscriberProxy::OnConsumed(
const sptr ¬ification, const sptr ¬ificationMap)
{
if (notification == nullptr) {
- ANS_LOGW("[OnConsumed] fail: notification is nullptr.");
+ ANS_LOGE("[OnConsumed] fail: notification is nullptr.");
return;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnConsumed] fail: write interface token failed.");
+ ANS_LOGE("[OnConsumed] fail: write interface token failed.");
return;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[OnConsumed] fail: write notification failed.");
+ ANS_LOGE("[OnConsumed] fail: write notification failed.");
return;
}
if (!data.WriteBool(notificationMap != nullptr)) {
- ANS_LOGW("[OnConsumed] fail: write existMap failed");
+ ANS_LOGE("[OnConsumed] fail: write existMap failed");
return;
}
if (notificationMap != nullptr) {
if (!data.WriteParcelable(notificationMap)) {
- ANS_LOGW("[OnConsumed] fail: write notificationMap failed");
+ ANS_LOGE("[OnConsumed] fail: write notificationMap failed");
return;
}
}
@@ -149,7 +149,7 @@ void AnsSubscriberProxy::OnConsumed(
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_CONSUMED_MAP, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnConsumed] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnConsumed] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -157,18 +157,18 @@ void AnsSubscriberProxy::OnConsumed(
void AnsSubscriberProxy::OnCanceled(const sptr ¬ification)
{
if (notification == nullptr) {
- ANS_LOGW("[OnCanceled] fail: notification is nullptr.");
+ ANS_LOGE("[OnCanceled] fail: notification is nullptr.");
return;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnCanceled] fail: write interface token failed.");
+ ANS_LOGE("[OnCanceled] fail: write interface token failed.");
return;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[OnCanceled] fail: write notification failed.");
+ ANS_LOGE("[OnCanceled] fail: write notification failed.");
return;
}
@@ -176,7 +176,7 @@ void AnsSubscriberProxy::OnCanceled(const sptr ¬ification)
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_CANCELED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnCanceled] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnCanceled] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -185,35 +185,35 @@ void AnsSubscriberProxy::OnCanceled(
const sptr ¬ification, const sptr ¬ificationMap, int32_t deleteReason)
{
if (notification == nullptr) {
- ANS_LOGW("[OnCanceled] fail: notification is nullptr.");
+ ANS_LOGE("[OnCanceled] fail: notification is nullptr.");
return;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnCanceled] fail: write interface token failed.");
+ ANS_LOGE("[OnCanceled] fail: write interface token failed.");
return;
}
if (!data.WriteParcelable(notification)) {
- ANS_LOGW("[OnCanceled] fail: write notification failed.");
+ ANS_LOGE("[OnCanceled] fail: write notification failed.");
return;
}
if (!data.WriteBool(notificationMap != nullptr)) {
- ANS_LOGW("[OnCanceled] fail: write existMap failed");
+ ANS_LOGE("[OnCanceled] fail: write existMap failed");
return;
}
if (notificationMap != nullptr) {
if (!data.WriteParcelable(notificationMap)) {
- ANS_LOGW("[OnCanceled] fail: write notificationMap failed");
+ ANS_LOGE("[OnCanceled] fail: write notificationMap failed");
return;
}
}
if (!data.WriteInt32(deleteReason)) {
- ANS_LOGW("[OnCanceled] fail: write deleteReason failed.");
+ ANS_LOGE("[OnCanceled] fail: write deleteReason failed.");
return;
}
@@ -221,7 +221,7 @@ void AnsSubscriberProxy::OnCanceled(
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_CANCELED_MAP, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnCanceled] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnCanceled] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -229,18 +229,18 @@ void AnsSubscriberProxy::OnCanceled(
void AnsSubscriberProxy::OnUpdated(const sptr ¬ificationMap)
{
if (notificationMap == nullptr) {
- ANS_LOGW("[OnUpdated] fail: notificationMap is empty.");
+ ANS_LOGE("[OnUpdated] fail: notificationMap is empty.");
return;
}
MessageParcel data;
if (!data.WriteInterfaceToken(AnsSubscriberProxy::GetDescriptor())) {
- ANS_LOGW("[OnUpdated] fail: write interface token failed.");
+ ANS_LOGE("[OnUpdated] fail: write interface token failed.");
return;
}
if (!data.WriteParcelable(notificationMap)) {
- ANS_LOGW("[OnUpdated] fail: write notificationMap failed.");
+ ANS_LOGE("[OnUpdated] fail: write notificationMap failed.");
return;
}
@@ -248,7 +248,7 @@ void AnsSubscriberProxy::OnUpdated(const sptr ¬ificat
MessageOption option = {MessageOption::TF_ASYNC};
ErrCode result = InnerTransact(ON_UPDATED, option, data, reply);
if (result != ERR_OK) {
- ANS_LOGW("[OnUpdated] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
+ ANS_LOGE("[OnUpdated] fail: transact ErrCode=ERR_ANS_TRANSACT_FAILED");
return;
}
}
@@ -257,12 +257,12 @@ void AnsSubscriberProxy::OnDoNotDisturbDateChange(const sptr();
if (member == nullptr) {
ANS_LOGE("Failed to read actionButton");
diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn
index 97f0c02a34ceb534d78dca6ee295ee28dc748f46..bfa66da97fbb662e7ccab32497236b1aefd9c24a 100644
--- a/services/ans/BUILD.gn
+++ b/services/ans/BUILD.gn
@@ -54,6 +54,8 @@ ohos_shared_library("libans") {
defines = []
deps = [
+ ":downloadTemplate.abc",
+ ":downloadTemplate.js",
":external.json",
"${core_path}:ans_core",
"${frameworks_path}/ans/dialog/dialog_ui/js:dialog_js_files_etc",
@@ -97,3 +99,17 @@ ohos_prebuilt_etc("external.json") {
subsystem_name = "notification"
part_name = "ans_standard"
}
+
+ohos_prebuilt_etc("downloadTemplate.abc") {
+ source = "//base/notification/ans_standard/services/ans/resource/downloadTemplate.abc"
+ relative_install_dir = "notification_template/assets/js"
+ subsystem_name = "notification"
+ part_name = "ans_standard"
+}
+
+ohos_prebuilt_etc("downloadTemplate.js") {
+ source = "//base/notification/ans_standard/services/ans/resource/downloadTemplate.js"
+ relative_install_dir = "notification_template/assets/js"
+ subsystem_name = "notification"
+ part_name = "ans_standard"
+}
diff --git a/services/ans/resource/downloadTemplate.abc b/services/ans/resource/downloadTemplate.abc
new file mode 100644
index 0000000000000000000000000000000000000000..4bee22f50ceb0cca9eb1b6c188d438bd5680640b
Binary files /dev/null and b/services/ans/resource/downloadTemplate.abc differ
diff --git a/services/ans/resource/downloadTemplate.js b/services/ans/resource/downloadTemplate.js
new file mode 100644
index 0000000000000000000000000000000000000000..fe795e0e6f9cd0e15377c71f240f7cfe232c5e07
--- /dev/null
+++ b/services/ans/resource/downloadTemplate.js
@@ -0,0 +1,2 @@
+(()=>{"use strict";var e={};(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0});const o="Template-DownloadTemplate";class i extends View{constructor(e,t,o){super(e,t),this.icon=null,this.__title=new ObservedPropertySimple("",this,"title"),this.__detailedInfo=new ObservedPropertySimple("",this,"detailedInfo"),this.__passTime=new ObservedPropertySimple(0,this,"passTime"),this.__fileName=new ObservedPropertySimple("",this,"fileName"),this.__progressValue=new ObservedPropertySimple(40,this,"progressValue"),this.__isShowDetailedInfo=new ObservedPropertySimple(!1,this,"isShowDetailedInfo"),this.updateWithValueParams(o)}updateWithValueParams(e){void 0!==e.icon&&(this.icon=e.icon),void 0!==e.title&&(this.title=e.title),void 0!==e.detailedInfo&&(this.detailedInfo=e.detailedInfo),void 0!==e.passTime&&(this.passTime=e.passTime),void 0!==e.fileName&&(this.fileName=e.fileName),void 0!==e.progressValue&&(this.progressValue=e.progressValue),void 0!==e.isShowDetailedInfo&&(this.isShowDetailedInfo=e.isShowDetailedInfo)}aboutToBeDeleted(){this.__title.aboutToBeDeleted(),this.__detailedInfo.aboutToBeDeleted(),this.__passTime.aboutToBeDeleted(),this.__fileName.aboutToBeDeleted(),this.__progressValue.aboutToBeDeleted(),this.__isShowDetailedInfo.aboutToBeDeleted(),SubscriberManager.Get().delete(this.id())}get title(){return this.__title.get()}set title(e){this.__title.set(e)}get detailedInfo(){return this.__detailedInfo.get()}set detailedInfo(e){this.__detailedInfo.set(e)}get passTime(){return this.__passTime.get()}set passTime(e){this.__passTime.set(e)}get fileName(){return this.__fileName.get()}set fileName(e){this.__fileName.set(e)}get progressValue(){return this.__progressValue.get()}set progressValue(e){this.__progressValue.set(e)}get isShowDetailedInfo(){return this.__isShowDetailedInfo.get()}set isShowDetailedInfo(e){this.__isShowDetailedInfo.set(e)}aboutToAppear(){console.log(`${o} ------\x3e aboutToAppear, icon: ${JSON.stringify(this.icon)}`),console.log(`${o} ------\x3e aboutToAppear, title: ${this.title}`),console.log(`${o} ------\x3e aboutToAppear, detailedInfo: ${this.detailedInfo}`),console.log(`${o} ------\x3e aboutToAppear, passTime: ${this.passTime}`),console.log(`${o} ------\x3e aboutToAppear, fileName: ${this.fileName}`),console.log(`${o} ------\x3e aboutToAppear, progressValue: ${this.progressValue}`)}render(){Flex.create({direction:FlexDirection.Column,alignItems:ItemAlign.Center,justifyContent:FlexAlign.Start}),Flex.width("100%"),Flex.margin({top:12,bottom:12}),Flex.border({width:1,color:Color.White,radius:30}),Flex.backgroundColor(Color.White),Column.create({space:10}),Column.alignItems(HorizontalAlign.Center),Column.width("100%"),Row.create({space:10}),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Row.margin({bottom:12}),Row.width("100%"),If.create(),this.icon&&(If.branchId(0),Image.create(this.icon),Image.objectFit(ImageFit.Contain),Image.width(16),Image.height(16)),If.pop(),Text.create(this.title),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.align(Alignment.Start),Text.pop(),Text.create("已完成:"),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Text.create(`${this.progressValue}%`),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Text.create(`${this.passTime}分钟前`),Text.fontColor("#182431"),Text.fontSize("12"),Text.fontWeight(FontWeight.Regular),Text.pop(),Row.pop(),Flex.create({justifyContent:FlexAlign.SpaceBetween}),Flex.width("100%"),Row.create({space:5}),Row.flexShrink(0),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Text.create("标题:正在接收"),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Text.create(this.fileName),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Row.pop(),Row.create(),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.End),Row.onClick((()=>this.isShowDetailedInfo=!this.isShowDetailedInfo)),Text.create("文件详情"),Text.fontColor("#182431"),Text.fontSize("14"),Text.fontWeight(FontWeight.Regular),Text.pop(),Row.pop(),Flex.pop(),If.create(),this.isShowDetailedInfo&&(If.branchId(0),Row.create(),Row.alignItems(VerticalAlign.Center),Row.align(Alignment.Start),Row.width("100%"),Text.create(this.detailedInfo),Text.maxLines(3),Text.textOverflow({overflow:TextOverflow.Ellipsis}),Text.fontColor("#182431"),Text.fontSize("14"),Text.pop(),Row.pop()),If.pop(),Column.create(),Column.alignItems(HorizontalAlign.Start),Column.width("100%"),Progress.create({value:this.progressValue,total:100,style:ProgressStyle.Linear}),Progress.color(Color.Blue),Progress.value(this.progressValue),Progress.width("100%"),Column.pop(),Column.pop(),Flex.pop()}}t.default=i,loadDocument(new i("1",void 0,{}))})()})();
+//# sourceMappingURL=../_releaseMap/pages/downloadTemplate.js.map
\ No newline at end of file