Currently, BroadcastInterceptingContext always runs broadcast
receivers on the thread that called sendBroadcast. This means:
1. Receivers might run on the wrong thread, making the test less
realistic.
2. If any receiver checks what thread it's running on, then
either the check needs to be modified or deleted, or the test
must call sendBroadcast on the thread that the receiver
expects to run on. The latter is impossible when there is more
than one receiver that needs to run on more than one thread.
This CL adds a setUseRegisteredHandlers method that allows tests
to say that they want each receiver to run on the Handler
specified at registration time.
This CL also enables the new mode for ConnectivityServiceTest,
and resolves a TODO to re-enable a disabled thread check.
The new mode cannot be enabled by default because it would break
most of the tests.
All the below tests pass except for the car bluetooth test
testAutoConnectAdapterOff_returnsImmediately which was already failing.
Bug: 173331190
Test: atest CarInputServiceTest BluetoothProfileDeviceManagerTest
Test: atest NetworkPolicyManagerServiceTest
Test: atest ConnectivityServiceTest
Test: atest TetheringTest TetheringNotificationUpdaterTest
Test: atest VersionedBroadcastListenerTest EntitlementManagerTest
Test: atest TetheringConfigurationTest
Test: atest CachedDeviceStateServiceTest
Test: atest EmergencyAffordanceServiceTest
Change-Id: I3303bb14516f07a55d82a16b59c111ab3f8b0389
1. Remove the legacy network type. This is only used for logging.
- Replace the logcat logging with the display transport
- Remove the EventLogTags logging, since it's likely not
actually used by anyone.
2. Remove code that checks for NetworkInfo objects in state
FAILED, since LockdownVpnTracker can never have received any
such NetworkInfo from ConnectivityService since lollipop.
Bug: 173331190
Test: passes existing tests in ConnectivityServiceTest
Change-Id: I66ed71e51ba18b95862f3a0a5df2775eecea501e
This information originates in non-mainline system server code
and needs to be passed to the connectivity mainline code.
Bug: 173331190
Test: already covered by CTS tests
Change-Id: Ic612b6a51f7ec13e2213c8754312cf716130c876
* changes:
Check registering system default callback needs NETWORK_SETTINGS.
Move VPN code from ConnectivityService to VpnManagerService.
Add a skeleton VpnManagerService, and start it on boot.
Convert LockdownVpnTracker to NetworkCallbacks.
Minor fixes to VpnTransportInfo.
Modify lost RAM calculation to use total mapped dmabuf and private GPU
allocations instead of memtrack HAL's reported Graphics and GL values.
All of memtrack HAL's reported Graphics should be accounted for as part
of mapped dmabufs. In order to not count it twice and not to depend on
memtrack HAL's reported value we exclude it from total PSS calculation
and replace it with mapped dmabufs.
All of memtrack HAL's reported GL should be accounted for as part
of private GPU allocations. In order to not count it twice and not to
depend on memtrack HAL's reported value we exclude it from total PSS
calculation and add GPU private allocations to total kernel memory
usage.
Bug: 165832481
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I631488d95cfd91d5428c877b3a004215031dd223
Merged-In: I631488d95cfd91d5428c877b3a004215031dd223
This is part of the work to support
a credential management app on
unmanaged devices.
Bug: 179180345
Test: atest android.appsecurity.cts.AppOpsTest
Merged-In: Ifd87b5e38f341db4b34bf9f61480e29e49148846
Change-Id: Ifd87b5e38f341db4b34bf9f61480e29e49148846
The DMA buffers mapped by GPU device(s) are already accounted for
in the total exported dmabuf size (ionHeap) size.
To remove GPU memory from lost RAM, provide an API to get only the
DMA buf memory mapped by the GPU device(s).
Bug: 176477627
Test: adb shell dumpsys meminfo
Change-Id: Ie72f46c8de026b143629406714f413677ce6693b
Merged-In: Ie72f46c8de026b143629406714f413677ce6693b
Main implementation of ConnectivityService.setOemNetworkPreference. This
covers the main requirements of this method including listener
functionality.
Bug: 176495594
Bug: 177101287
Bug: 176494815
Test: atest FrameworksNetTests
atest NetworkStackTests
atest FrameworksNetIntegrationTests
atest NetworkStackIntegrationTests
atest CtsNetTestCasesLatestSdk
Change-Id: I8d318ab07785e52dd84d6261fdea8f318dce9bc5
Replace repeated calls to JNIEnv::GetArrayLength operating on the same
array with a cached value obtained once and then reused.
Bug: 165832481
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Id85f887a9a4dc8eeacbb047beca7ced49853484e
Currently getPssPid includes memtrack HAL reported values in the pss
calculation. This makes it impossible to get these values separately.
Extend this interface to include itemized memtrack values.
Bug: 165832481
Test: dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ieb7e1b79ad8ecae6023338d9992467952558e2bd
For server-based ror, we want to deplay loadEscrowData until
1. Binding to Gmscore works
2. Network is available
So we factor out the loadEscrowData to be called later in the
start sequence of system server. Also make the function async
so that we can retry on temporarily failures.
Bug: 172780686
Test: run server based ror
Change-Id: If71f8974f94eb1be2ab896e95601377196e01790
* Changed verbiage to be more generic at request of the API council
Bug: 175092152
Test: make & flash
Merged-In: I8bec64b0c38be94bcd3f3b99bcebfb378384c970
Change-Id: I8bec64b0c38be94bcd3f3b99bcebfb378384c970
- In order to better support UCE, allow the IMS registration update to
the framework to include the feature tags associated with the registration
so that this information can be used in SIP PUBLISH.
- Encapsulate other IMS registration attributes into a singlular class.
Bug: 177375635
Test: atest CtsTelephonyTestCases:ImsServiceTest
Merged-In: Id730e5e0c9322c2a845523f3b3901f3d899c3f1c
Change-Id: Id730e5e0c9322c2a845523f3b3901f3d899c3f1c
ConnectivityService itself does not depend on mVpns or the Vpn
class any more. Most of this CL is simply moving code from one
class to another:
- Move the AIDL calls from IConnectivityManager to IVpnManager.
- Move the implementation from ConnectivityService to
the new VpnManagerService.
- Move the APIs from ConnectivityManager to VpnManager, but
temporarily maintain some shims in ConnectivityManager for the
moved calls so that existing callers do not have to be modified
in this CL.
- Update VpnService to call IVpnManager instead of
IConnectivityManager.
- Move the code that registers the VpnManager service from
ConnectivityFrameworkInitializer to SystemServiceRegistry.
Bug: 173331190
Test: atest HostsideVpnTests FrameworksNetTests CtsNetTestCases
Change-Id: I4911e2144df721a94fa00da9edf0dc372a7091c2
This adds a lot of unused code but this should make it easier to
review subsequent CLs.
Bug: 173331190
Test: builds, boots, "dumpsys vpnmanager" succeeds
Change-Id: Ied379654a0c3ab6242d3125661fe30f322395059
This will allow moving LockdownVpnTracker from the connectivity
to the VPN code. This requires moderate refactoring since it's
pretty tightly coupled to both.
In this CL:
1. Add an @hide API to tell ConnectivityService that legacy
lockdown VPN is enabled. I chose not to use the existing
setVpnRequiredForUids API because that method has specific
semantics and because it will be required long term since
it's used by non-legacy VPN types.
2. Instead of updating LockdownVpnTracker inline from the
ConnectivityService handler thread, have it listen to
NetworkCallbacks. This introduces an extra thread hop, but
most of the interactions between the lockdown VPN and CS were
via NetworkAgent, which is asynchronous anyway.
3. Add code to LegacyTypeTracker to send the extra
CONNECTIVITY_ACTION broadcast for the underlying network type
that is sent after the VPN connects. In order to do this, make
Make LockdownVpnTracker specify its underlying network
(via setUnderlyingNetworks) when it connects.
4. Reimplement LockdownVpnTracker#augmentNetworkInfo based on
information that is available in ConnectivityService.
5. Remove the code in LockdownVpnTracker that counted errors.
I think this code has not worked since lollipop, because
ConnectivityService never sees NetworkInfo objects in state
FAILED. This is because ConnectivityService only hears about
NetworkInfo objects via NetworkAgents, and LegacyVpnRunner
only registers its NetworkAgent when the connection succeeds.
Bug: 173331190
Test: passes existing tests in ConnectivityServiceTest
Change-Id: I66d18512882efd468ee0ecec61f28786a195b357