diff options
author | Yingjie Wang <yingjiewang@codeaurora.org> | 2021-04-21 09:07:31 +0800 |
---|---|---|
committer | yingjiew <yingjiewang@codeaurora.org> | 2021-09-02 13:57:54 +0800 |
commit | c9560c1201d115ff372c74fed296e660139e7a76 (patch) | |
tree | 5afc80864e57ad3a956731697ff2e48849a374b0 /core | |
parent | 01269f41e61e3f1b5322e930aca65aa152358ba8 (diff) |
Correct equals() for SystemStatusNetworkInfo
Check more fields to identify NetworkInfo, i.e. NetworkHandle
and Apn;
Add debugging log print for xtra.
Change-Id: Ie4a28b1e4feaccbb9ef7ca806248521842a47a2e
CRs-fixed: 2926382
Diffstat (limited to 'core')
-rw-r--r-- | core/SystemStatus.cpp | 3 | ||||
-rw-r--r-- | core/SystemStatus.h | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/core/SystemStatus.cpp b/core/SystemStatus.cpp index d792577..fe11de0 100644 --- a/core/SystemStatus.cpp +++ b/core/SystemStatus.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -1586,6 +1586,7 @@ bool SystemStatus::eventDataItemNotify(IDataItemCore* dataitem) break; } pthread_mutex_unlock(&mMutexSystemStatus); + LOC_LOGv("DataItemId: %d, whether to record dateitem in cache: %d", dataitem->getId(), ret); return ret; } diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 097e7cc..bd4279e 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -509,9 +509,11 @@ public: for (uint8_t i = 0; rtv && i < MAX_NETWORK_HANDLES; ++i) { rtv &= (mAllNetworkHandles[i] == peer.mAllNetworkHandles[i]); } - return peer.mApn.compare(mApn); + return rtv & peer.mApn.compare(mApn); } inline virtual SystemStatusItemBase& collate(SystemStatusItemBase& curInfo) { + LOC_LOGv("NetworkInfo: mAllTypes=%" PRIx64 " connected=%u mType=%x mApn=%s", + mAllTypes, mConnected, mType, mApn.c_str()); uint64_t allTypes = (static_cast<SystemStatusNetworkInfo&>(curInfo)).mAllTypes; string& apn = (static_cast<SystemStatusNetworkInfo&>(curInfo)).mApn; // Replace current with cached table for now and then update |