Skip to content
Commit 7a2b13ea authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Fix transitioning between non-accept strict policies.

https://android-review.googlesource.com/438278/ attempted
to fix changing between two non-accept StrictMode policies (which
is not supported by netd) by ensuring that if neither the old nor
the new policy were accept, we'd first set an accept policy.

Unfortunately, while this is what the comment says, what the
code actually does is send the new policy twice. Fix the code to
match the comment and the intent of the CL.

While I'm at it, also move applyUidCleartextNetworkPolicy into
the synchronized block, so multiple concurrent calls to
setUidCleartextNetworkPolicy don't result in NMS state going out
of sync with netd state.

(cherry picked from commit 26364f1d)

Bug: 28362720
Test: builds
Change-Id: I7fe6871bda20566f4cc01ad75711ea52f9a72145
parent dd09e994
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment