PowerStatsService will handle PowerStatsHal queries, PowerStatsInternal
will provide the LocalService for querying PowerStatsHal derived data
from other System services.
Bug: 173077356
Test: atest FrameworksCoreTests:com.android.internal.power.MeasuredEnergyStatsTest
Test: atest com.android.server.powerstats.PowerStatsServiceTest
Change-Id: Ibc0165a44ffdbbcc9328c250f1dca3d29616c766
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
Fixes earlier issue where UI didn't get dismissed correctly.
Avoids removing the ExitTransitionCoordinator callback too early,
so that we get the hideSharedElements call.
Bug: 170138961
Bug: 159419046
Test: manual
Change-Id: I78193e46c97d01943df9b8438a29c6ee1e0106ff
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