* changes:
Prevent clearing Restricted Mode uid state when other rules change
Add shell command to query Restricted Mode state
Add Restricted Mode settings observer to NetworkPolicyManagerService
This will be used in the CTS test to query the state of the Restricted
Mode.
Test: adb shell cmd netpolicy get restricted-mode
Bug: 170323671
Bug: 175281879
Change-Id: Ic25b5835d48a4b54eb9f2b4817244651ea09bd60
Netd currently calls maybeCloseSockets before adding/removing users for
network. The task should be moved from netd to CS. In this way, we can
handle WiFi lingering more easily in the future.
Test: atest HostsideVpnTests
Test: atest FrameworksNetTests
Change-Id: Icf8125e8552c89da367a67f48611ed193a1a343d
Adds Restricted Mode functionality to NetworkPolicyManager. When this
mode is turned on (via setting), only apps with
android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS will be able to
use the network. For all other apps, the network will be blocked by the
firewall. This is controlled by a new allowlist firewall chain
fw_restricted_mode.
As a first step, this implementation still requires a reboot after the
enabling / disabling the mode to take effect. I will provide the dynamic
configuration in the next CL.
Test: atest CtsHostsideNetworkTests && atest
NetworkPolicyManagerServiceTest
Bug: 170322816
Bug: 157505406
Bug: 170322455
Bug: 175281879
Exempt-From-Owner-Approval: Change already merged on internal gerrit.
Change-Id: I0731fa842c69683953baaf9ec3a9a03454f4c607
Merged-In: I0731fa842c69683953baaf9ec3a9a03454f4c607
This gives more flexibility to the user (e.g. will allow restricted
networking mode to update all firewall rules at once) and removes some
unnecessary code.
Bug: 170322816
Bug: 157505406
Test: atest NeworkPolicyManagerServiceTest
Change-Id: Id31a60ad37c280bfb4f5bacf63aafe9de28c5e62
Merged-In: Id31a60ad37c280bfb4f5bacf63aafe9de28c5e62
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. NetworkPolicyManagerInternal
is a internal serivce that CS can't be access after be a mainline
module. Thus, replace NPMI#isUidNetworkingBlocked() to similar
method NPMS#isUidNetworkingBlocked() and create new API
NPM#isUidNetworkingBlocked() to support CS usage.
Bug: 170598012
Test: atest FrameworksNetTests
Test: atest FrameworksCoreTests:NetworkPolicyManagerTest
Test: atest FrameworksServicesTests:NetworkPolicyManagerServiceTest
Test: atest CtsNetTestCases
Test: atest CtsHostsideNetworkTests
Change-Id: Ic3427c71c395de787320f303c9513874b4d64f98
This reverts commit 08ba820d9e.
Reason for revert: The original breakage of aosp_cf_x86_pasan should be fixed with the compiler update.
Change-Id: I551923330bd920e0645c62246801cc87a16402b2
With this patch it is possible to enable eatt_support as a GATT Client
or GATT Server.
Tag: #feature
Bug: 159786353
Test: manually verified against device supporting EATT
Sponsor: jpawlowski@
Change-Id: I6835a2bbd1b0ab9d6d64ee2bac5dfc96c0563afd
Now that the feature guarded by this flag has landed in Linux 5.10
we no longer need the flag, so we can remove it.
Bug: 135772972
Change-Id: I02fa50848cbd0486c23c8a229bb8f1ab5dd5a56f
MediaRourter uses main thread for internal operations, and ANR could
happens if AudioService is not running when MediaRouter tried to get
stream volumes. This CL avoids such ANR by caching stream volumes.
Bug: 170327593
Test: manually
(cherry picked from internal master branch)
Change-Id: I7c00b26a3a25f17c877d3ec0e998905ab0b4af28