summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authormarkchien <markchien@google.com>2020-04-17 10:02:43 +0800
committermarkchien <markchien@google.com>2020-04-30 14:00:20 +0800
commit981b27631080f1f699695b3fa042161922e2b0e3 (patch)
tree2e4055f3c1d042d289b20ee4f68a4f53f61f6e9b /tools/aapt2/java/JavaClassGenerator.cpp
parent71dd69e10ad11d41e82538783fd3f0d2e01c2303 (diff)
Refactor the EntitlementManager
1. Change ArraySet usage to BitSet 2. Change mCellularUpstreamPermitted to mLastCellularUpstreamPermitted. Before this change: a member variable(mCellularUpstreamPermitted) is used to check whether cellular upstream is permitted, the code must ensure to update this variable once entitlement result is changed or the entitlement check is triggered but does not have a result yet. In this change: Instead of storing the information about whether cellular is permitted in a member variable. The information is recalculated every time when user call isCellularUpstreamPermitted(). Now isCellularUpstreamPermitted() is always be used to check whether cellular upstream is permitted no matter inside or outside EntitlementManager. This make the code be easier to maintain that we do not need to care when mCellularUpstreamPermitted need to be updated because the information would be recalculated every time. And the recalculation is lock free because this is only used inside tethering while running in the same thread. Bug: 141256482 Test: atest TetheringTests Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions