Persist hibernation states to disk. This CL persists the user-level
and global hibernation states to disk.
Bug: 175829330
Test: atest AppHibernationServiceTest
Test: atest HibernationStateDiskStoreTest
Change-Id: If58d648d720bed1693b9346c4d0e85074daec931
Similar to other system services, we move AppHibernationService's
dependencies to an injector class that can be mocked for testing so that
we minimize side-effects in unit tests
Also, add @GuardedBy annotations instead of having an L at the end of
method names since this is exactly what the annotation is for.
Bug: 175829330
Test: atest AppHibernationServiceTest
Change-Id: Iec51a349ff898923bacf6040c3ebccefa8831a68
Only store user hibernation state in memory when the user is not stopped
and is unlocked since we do not need the information. When a user
unlocks, we get their installed packages and initialize their
hibernation states in memory. When the user is stopped, we clear it.
Bug: 175829330
Test: atest AppHibernationServiceTest
Change-Id: Idb2dba02d53df72daedae0078405634a5db51e8d
Follow-up from aosp/1549897, the capability will not be in
default capabilities, but will be in most of the NetworkRequests
which requires internet. Thus, add the capabilities into all
NetworkAgent implementations by default to provide
backward compatibility.
Test: TH
Bug: 175662146
Change-Id: Id706fea7ac3136779e51853956bc1251f1f54611
The wifi (mainline module) need to set the subscriberId for specific
wifi network.
Bug: 176396812
Test: TreeHugger
Change-Id: Ib568ce0c2d1b629e1c20e7ac8d8b78579cf4825c
As a preparation of exposing system API. This patch does some
harmless refactoring, which includes:
1. Change raw arrays into lists according to API guidelines.
2. Write test.
3. Rename class to UnderlyingNetworkInfo.
4. Rename vpnIface to iface.
5. Make underlyingIfaces @NonNull in order to adapt new
unparceling code.
6. implement equals and hashCode for testing.
Test: atest android.net.UnderlyingNetworkInfoTest
Bug: 174123988
Change-Id: I405c21e57c4af8a12a9dd0a1749b9e6690f87045
This will be mainly used by VCN management service which will
need to hold the networks but preserve the backgrounded-ness
of the networks.
Test: android.net.ConnectivityManagerTest#testRequestType
Test: android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork /
--rerun-until-failure 100
Test: ConnectivityServiceTest#testBackgroundNetworks
Test: m -j doc-comment-check-docs
Bug: 175662146
Change-Id: I463c7a3139a286e50ea71e674060975ce228caa9
This CL updates VcnManager to allow system components with permission
NETWORK_FACTORY to request the current VcnUnderlingNetworkPolicy for a
specific Network's NetworkCapabilities and LinkProperties.
Bug: 175900686
Test: atest FrameworksVcnTests
Change-Id: I16416e619bdb03630582f5660260b0090730e9eb
The SET_INITIAL_LOCK permission takes the "signature|setup" protection
level. Replicate this for secure storage access as this is an implicit
requirement.
Bug: 153726356
Test: N/A
Signed-off-by: Julius D'Souza <jdsouza@google.com>
Change-Id: If03cbf54d69125ee262a0f6ba7a7e11744a442de
Merged-In: If03cbf54d69125ee262a0f6ba7a7e11744a442de
Introduce the concept of global package hibernation / package-level
hibernation. This opens the way for optimizations at the package or
APK level based off usage across all users.
Bug: 175829330
Test: atest AppHibernationServiceTest
Test: adb shell cmd app_hibernation get-state --global
com.google.android.deskclock
Change-Id: Ic989fc09a4c60f3bbf28b34fe38fa07e77eedacb
Similar to how HIDL HALs are here, we don't know the commandline of the
service, so we can dump them based on service name prefixes.
Power stats and lights are added here, for parity w/ HIDL since these
hvae been converted to AIDL.
Fixes: 175322136
Test: after `adb shell am hang`, we can verify the light service is
dumped, when it wasn't before:
vsoc_x86_64:/data/anr # cat anr_2021-01-28-22-42-44-969 | grep light
Cmd line: /vendor/bin/hw/android.hardware.lights-service.example
Change-Id: I8c8b0cff0c102221875114015a5524c03cfb5b5c
We shouldn't create a new object to do unbinding.
Bug: 172780686
Test: TreeHugger; try server based ror, no exception for unbind
Change-Id: I4f3cc29380125c21ae7a3b975282244a4de25db9
BackendBusyException now returns a back-off hint that API users can use
to implement their retry loop.
Bug: 174761871
Test: N/A
Change-Id: I95662a5a5432965de365017eae43c502eb5bfc06