summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Sudheer Shanka <sudheersai@google.com> 2022-04-04 16:08:00 -0700
committer Sudheer Shanka <sudheersai@google.com> 2022-04-15 09:39:49 +0000
commitefa4f742360efc714082d04d7224aae7058e186e (patch)
tree254f02976afbff8ad9aa95bc88727ced45e57d9e /api/api.go
parent3d9f5e63c1d2fec02cabe7aa27ad0dd2c0747637 (diff)
Ignore older UID state change callbacks in NPMS.
Since the onUidStateChanged() callbacks will be happening from more than one thread, we need to make sure we only handle the latest uid state change callbacks and ignore any older callbacks that could override the latest uid states in NPMS. In order to this, every uid state change will be associated with a unique seq number. Also, remove the UidRecord.lastDispatchedProcStateSeq. This was added as a safety measure to make sure we don't unnecessarily end up waiting but it isn't necessary and if we need to keep it, we need to add a way to access it without holding global AMS lock, which isn't worth the complexity. Bug: 226299593 Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java Change-Id: I631f5e01f6627916a96c930c22849a1d11eab636 Merged-In: I631f5e01f6627916a96c930c22849a1d11eab636
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions