Commit Graph

560239 Commits

Author SHA1 Message Date
Kevin Han
dba83c49dd Add persistence for app hibernation states
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
2021-02-03 18:17:25 -08:00
Kevin Han
6669dec038 Move AppHibernationServices dependencies to injector
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
2021-02-03 18:13:34 -08:00
Kevin Han
89575897ca Add/remove user state based off user unlocking
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
2021-02-01 13:05:23 -08:00
Kevin Han
6857f6ed91 Merge "Introduce global package hibernation" 2021-01-30 00:37:19 +00:00
Elliott Hughes
1528efe4b1 Merge "Remove __ANDROID_API__ #if checks." 2021-01-30 00:15:18 +00:00
Junyu Lai
ac0dbac04c Merge "[VCN07.6] Add NOT_VCN_MANAGED for NetworkAgent implementations" 2021-01-29 23:15:32 +00:00
Julius D'souza
6131ca7d2f Merge "Add setup usage for ACCESS_KEYGUARD_SECURE_STORAGE." 2021-01-29 22:56:00 +00:00
Varun Shah
98fc96fc65 Merge "Fixed to prevent usagestats file corruption when writing" 2021-01-29 22:10:29 +00:00
Steven Moreland
4c0600b406 Merge "WatchDog: support dumping AIDL HALs" 2021-01-29 21:24:26 +00:00
Tianjie Xu
b7682d401f Merge "Fixes how unbindService works" 2021-01-29 21:20:22 +00:00
Leon Scroggins
59e8bb9e98 Merge "Apply bilinear filter for Ninepatch." 2021-01-29 21:18:05 +00:00
Amit Mahajan
0a35aae9d6 Merge "Add config config_voice_data_sms_auto_fallback" 2021-01-29 21:06:24 +00:00
Etan Cohen
ec8ebce98e Merge "Revert "Grant shell permissions for Airplane Mode to Shell to support CTS"" 2021-01-29 21:05:59 +00:00
Cody Kesting
ba04ef8481 Merge "Allow system components to request underlying network policies." 2021-01-29 18:58:00 +00:00
Junyu Lai
6194d765d2 Merge "[FUI16] Expose setSubscriberId in NetworkAgentConfig as system API" 2021-01-29 17:15:28 +00:00
Treehugger Robot
c63817d8f0 Merge "add ownership" 2021-01-29 17:14:58 +00:00
junyulai
ded9b18406 [VCN07.6] Add NOT_VCN_MANAGED for NetworkAgent implementations
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
2021-01-29 14:46:45 +00:00
junyulai
0ee85f3bf8 [FUI16] Expose setSubscriberId in NetworkAgentConfig as system API
The wifi (mainline module) need to set the subscriberId for specific
wifi network.

Bug: 176396812
Test: TreeHugger
Change-Id: Ib568ce0c2d1b629e1c20e7ac8d8b78579cf4825c
2021-01-29 22:09:10 +08:00
Junyu Lai
561626b20d Merge "[FUI04] Refactor VpnInfo" 2021-01-29 13:54:53 +00:00
Naomi Musgrave
a1721e71ca Merge "Introduce OWNERS file for Display unit tests" 2021-01-29 11:33:30 +00:00
Junyu Lai
7e0d8315d1 Merge "[VCN06] Support request background network" 2021-01-29 11:02:02 +00:00
junyulai
d242947ae2 [FUI04] Refactor VpnInfo
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
2021-01-29 17:44:32 +08:00
Junyu Lai
15f4a9cd7c [VCN06] Support request background network
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
2021-01-29 14:42:32 +08:00
Cody Kesting
7de2e8443c Allow system components to request underlying network policies.
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
2021-01-28 19:38:06 -08:00
Lucas Lin
6a5d57c2ee Merge "Remove unused method from MatchAllNetworkSpecifier" 2021-01-29 02:47:00 +00:00
Julius D'souza
1bed1e56ca Add setup usage for ACCESS_KEYGUARD_SECURE_STORAGE.
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
2021-01-28 17:15:43 -08:00
Treehugger Robot
ac165ae86d Merge "Add stange@ to the list of ContextHub owners" 2021-01-29 01:01:53 +00:00
Treehugger Robot
7bbf421612 Merge "Throw IllegalStateException to fail fast in IMS" 2021-01-28 23:59:11 +00:00
Kevin Han
f4261d7215 Introduce global package hibernation
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
2021-01-28 15:32:23 -08:00
Steven Moreland
f6fee67b6e WatchDog: support dumping AIDL HALs
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
2021-01-28 22:53:23 +00:00
Jiachen Zhao
cf7b9b9a3d Fixes how unbindService works
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
2021-01-28 14:34:43 -08:00
Baligh Uddin
d985fe7b0e Merge "Migrate apex/permission to packages/modules/Permission" 2021-01-28 22:33:05 +00:00
Treehugger Robot
008819a578 Merge "Create owners" 2021-01-28 22:04:48 +00:00
Anthony Stange
657eb5b233 Add stange@ to the list of ContextHub owners
Change-Id: I91b4d30f94b7a75f50ece7c6fddab666e43d01b9
Test: presubmits
2021-01-28 20:49:20 +00:00
Treehugger Robot
9aba68730c Merge "Keystore 2.0 SPI: Add back-off hint to BackendBusyException." 2021-01-28 20:39:01 +00:00
Treehugger Robot
49467f1cdf Merge "Fix race condition in linearblock release between TIS and MediaCodec" 2021-01-28 20:01:11 +00:00
Jiashen Wang
f2193be3f0 Merge changes from topics "downloadable_init_change_1", "downloadable_init_change_2"
* changes:
  Do now throw exception when activation code is empty
  Init DownloadableSubscription with Confirmation Code
2021-01-28 19:53:49 +00:00
James Lin
4548fab7d6 Merge "Expose the RCS UCE APIs for capabilities request with presence mechanism." 2021-01-28 19:35:54 +00:00
Henry Fang
64cd9d3cf9 Fix race condition in linearblock release between TIS and MediaCodec
Bug: 177247275
Test: Manual
Change-Id: I13f924adc3586607eb3a60d184e7786536c7b788
Merged-In: I13f924adc3586607eb3a60d184e7786536c7b788
2021-01-28 18:42:50 +00:00
Benedict Wong
026b277911 Merge "Implement ConnectingState" 2021-01-28 18:24:43 +00:00
Andy Hung
f57ff9e7e5 Merge "audio: add implementation for TV related API" 2021-01-28 18:03:34 +00:00
Treehugger Robot
4844c2065b Merge "Keystore 2.0: Add human readable strings to Keystore exceptions." 2021-01-28 18:01:44 +00:00
Todd Kennedy
98b1f085ef Create owners
Change-Id: I970b5a32d2da06645d66d0062f8c2fa87924a204
2021-01-28 17:35:38 +00:00
Janis Danisevskis
f4c64ad3e2 Keystore 2.0 SPI: Add back-off hint to BackendBusyException.
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
2021-01-28 09:23:21 -08:00
Jeff Sharkey
033aefcb06 Merge "Add owners" 2021-01-28 17:22:27 +00:00
Todd Kennedy
19d09ca6ed Add owners
Change-Id: If3e8e500c4a5de47ec76cc19413546b736feb5f9
2021-01-28 17:20:10 +00:00
Todd Kennedy
c57585bd25 add ownership
Change-Id: I1399a560422d2138c1480d02e099b387a74c6800
2021-01-28 16:58:08 +00:00
Anton Hansson
b5b629607b Merge "Switch to new incompatibilities targets" 2021-01-28 16:48:16 +00:00
Anton Hansson
42fb4206f8 Merge "Set installable: false on apex jars by default" 2021-01-28 16:44:40 +00:00
Naomi Musgrave
4e00b71faa Introduce OWNERS file for Display unit tests
Test: manual
Bug: 171386167

Change-Id: I88a57ac4fa3b73da52b089c728e68b38aec2d62a
2021-01-28 16:02:21 +00:00