This is a port of the exemption that exists in WifiPermissionsUtil.
Settings, sysui, network stack needs to be able to access all network
state regardless of location toggle. If we want to move sysui, etc to
retrieve WifiInfo via NetworkCapabilities (which is the current plan),
this exemption is essential since UI should reflect wifi state
regardless of location toggle state.
Bug: 162602799
Test: atest LocationPermissionCheckerTest
Change-Id: I49ce465eccce27bb7a860d882360436fd9ec19c6
VpnConfig is planned to be outside of the connectivity module, so it
needs to use its public API and not private symbols.
Change the RouteInfo constructor to use the equivalent API version.
Bug: 174436414
Test: m
Change-Id: Iae264e9b50ec6e97ce39bd2bab6f22f5844bf270
There is actually already a public API overload for
Context.bindService() which allows binding the service with the user
of Context.getUser() and a custom Executor.
We can construct an Executor from our Handler, but this executor is
required to remain the same instance for different calls to
bindService() for the same ServiceConnection by the API, so we should
keep the Executor instance, as well as the Handler instance, instead
of calling getJobHandler() every time. In fact getJobHandler() is
already required to return the same instance, or bindServiceAsUser()
would have thrown the same exception for different Handlers.
Also removed a check in ContextImpl.bindService() to allow mainline
modules to use the bindService() API with Context multi-user.
Bug: 158736025
Test: presubmit
Change-Id: I95717a4a74267dff4fbe1898a82cdfa7f195cc06
The first parameter of adding idle timer is an unique identity
to communicate between ConnectivityService and netd. Netd will
notify the activity change using the identity, so it's fine to
replace the legacy type with transport type since we should
deprecate the usage of legacy type.
Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ia00606539b86872cca9a92285bd940c8a720a033
The existing DropBoxManager APIs require that data be entirely
pre-cooked before it can be added. This adds significant overhead
to Log.wtf() style messages which collect logcat data, since we
need to copy that log data through a pipe to an in-memory buffer.
To avoid that overhead, this change introduces an EntrySource
interface which can either be pre-cooked data or dynamically
generated data written directly to an open FD on disk. Future
changes will adjust the Log.wtf() logic to use this new interface
to have logcat write directly into an FD.
In addition, this interface paves the way for leveraging a newer
F2FS feature which transparently compresses and decompresses data in
the kernel, instead of forcing us to use DEFLATE in userspace.
This change drops periodic quota checking while recording new
entries, and instead adjusts to pre-flight the quota checks before
writing starts. It also drops the expensive fsync(), since these
logs are collected on a best-effort basis.
Bug: 176843501
Test: atest CtsDropBoxManagerTestCases
Test: atest FrameworksServicesTests:com.android.server.DropBoxTest
Change-Id: Ic78e99a32cfaf4edac066a73a6864c9c9e9fdeef
Total CPU time in state added in https://r.android.com/1538886.
Bug: 174245730
Test: cmd stats pull-source 10095
Change-Id: I6cd27ac172e36d2e889429808bd4bd583795d7c9
The CountDownLatch#await() will be unblocked if there is an
InterruptedException happened.
Then it will cause the UnsupportedOperationException when
calling Completable.ValueBase#enforceGetValueLocked(),
Add a retry mechanism if InterruptedException happened.
Bug: 176441559
Test: atest CtsInputMethodTestCases
Change-Id: I6b93e76f78b4b8c94fc4423c33a707207961816d
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.
Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest
Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
Shortening Cuj<> to a more meaningful J<> for jank.
Using L<> for latency will make it easier to search for
Latency traces in trace tools. Using getNameOfAction() for
latencies in all places will simplify finding latencies in code.
Test: manual
Bug: 177018359
Change-Id: Ie3114e7d7f97e7950af19a014d06f5c632a607c3