Commit Graph

21764 Commits

Author SHA1 Message Date
Neil Fuller
1aa92e3754 Merge "Add a Y2038 check into the time_detector" am: 808b9f1b73
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1994850

Change-Id: I791a25c36760a8828eea27e11c5dfc5bdd9e8d0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 20:56:13 +00:00
Neil Fuller
808b9f1b73 Merge "Add a Y2038 check into the time_detector" 2022-05-10 11:44:09 +00:00
Neil Fuller
2ff5ec1aad Add a Y2038 check into the time_detector
Add a Y2038 check into the time_detector and add infrastructure to allow
command-line testing to confirm it works.

This is before removing a Y2038 check from NITZ parsing code in the
telephony process. After this change, Androdi will consistently block
>= Y2038 suggestions, not just time signals that come in via telephony.

The initial checks attempt to limit the restriction to devices with
32-bit ABIs, since the main issue we're aware of is that time_t is a
32-bit signed int under bionic, hence there could be issues with that
type in 32-bit processes on 32-bit / mixed 32/64-bit devices.

Bug: 204193177
Test: adb shell cmd time_detector suggest_network_time --reference_time 2480587 --unix_epoch_time 1646473966056
Test: Run with 32-bit + 64-bit only builds, inspect adb shell dumpsys time_detector
Merged-In: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
Change-Id: Ib9d6472f5ca7a62d59b3224f1845846f99a0b52d
2022-05-10 10:01:58 +00:00
Jing Ji
2ee9e5dbb7 Merge "[BugFix] acquireProvider maybe wait for timeout" am: bf7ab279a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1999690

Change-Id: I4b8b8c57f3f8efebceb8751a5ea304014f252a76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 04:50:12 +00:00
Jing Ji
bf7ab279a6 Merge "[BugFix] acquireProvider maybe wait for timeout" 2022-04-19 04:31:57 +00:00
Xin Li
b2f021295c Merge sc-v2-dev-plus-aosp-without-vendor@8433047
Bug: 226662282
Merged-In: I6541f7d49cb932c85374bf9acf777038b888e873
Change-Id: I95df36a778a7fa9ea52fe0bba2332534d6288032
2022-04-18 21:01:07 +00:00
Sudheer Shanka
11ca5138aa Inform Application thread to block for network rules to be updated. am: 3bad67bf01
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2062965

Change-Id: I6e9d7cf43ba2758df9b110e83d5f55f6f1fa39e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 18:18:03 +00:00
Sudheer Shanka
7ee9ee6a32 Inform AMS about the uid blocked reasons. am: eb5e04aeca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065619

Change-Id: I71ebe7b4ba72b159951d79e94d5783c4b508a8b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 18:17:58 +00:00
Sudheer Shanka
6216322403 Inform NPMS about the app coming to the TOP state early. am: 3d9f5e63c1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065617

Change-Id: I5339e5eae40519857d8c33b23c04b6b036fae00a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 18:17:48 +00:00
Sudheer Shanka
595316feff Avoid checking for idle state when the app is in top state. am: 99b5c0cbf6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2065614

Change-Id: I9beeae26b70181bd1050f6f10666dbb3141b8295
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 18:17:43 +00:00
Sudheer Shanka
3bad67bf01 Inform Application thread to block for network rules to be updated.
Bug: 226299593
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: Ie37173d0d3f4034a74b834550920530166cd4201
Merged-In: Ie37173d0d3f4034a74b834550920530166cd4201
2022-04-15 09:40:13 +00:00
Sudheer Shanka
eb5e04aeca Inform AMS about the uid blocked reasons.
This will be used to let the application thread
know whether or not to block for network rules to
be updated when coming to the foreground.

Bug: 226299593
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I9bff481a0026fb57af8dbee580e617c8410f9ebe
Merged-In: I9bff481a0026fb57af8dbee580e617c8410f9ebe
2022-04-15 09:39:57 +00:00
Sudheer Shanka
3d9f5e63c1 Inform NPMS about the app coming to the TOP state early.
It's possible for an app to come to the TOP state before
the oomAdj computation is done and we cannot wait for
oomAdj computation to complete and then inform NPMS about
the state change. So, inform NPMS early about the state
change when we know the app is going to the TOP state.

Bug: 226299593
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I5d582618652cead179c419f7fe084283dd89d514
Merged-In: I5d582618652cead179c419f7fe084283dd89d514
2022-04-15 09:39:39 +00:00
Sudheer Shanka
99b5c0cbf6 Avoid checking for idle state when the app is in top state.
When we know that an app moved to a procstate that is considered
an interaction event, the app will not be in idle state. So, avoid
calling into UsageStatsService for idle state in this case.

Bug: 209338078
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I5648db595d2fd10a151da13e472fd905bcafe182
Merged-In: I5648db595d2fd10a151da13e472fd905bcafe182
2022-04-15 09:35:40 +00:00
Julia Reynolds
bd0f7d47eb Merge "Update FLAG_ONLY_ALERT_ONCE docs" am: e3a1682e0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2062847

Change-Id: I46beb5247898976a891faccd62f2464efb7c5b58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 19:34:08 +00:00
Julia Reynolds
e3a1682e0b Merge "Update FLAG_ONLY_ALERT_ONCE docs" 2022-04-13 19:02:02 +00:00
Edward Savage-Jones
1a90fd5998 Update FLAG_ONLY_ALERT_ONCE docs
Update FLAG_ONLY_ALERT_ONCE docs to match implementation
from Android P and onwards.

Bug: 222328375
Test: atest BuzzBeepBlinkTest
Change-Id: Ic058b8265551362b04b9cd0363e43a4c08ecd736
2022-04-13 08:35:38 +00:00
Jonathan Scott
58bbfc4167 [automerge] [scv2] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning. 2p: b157e658a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17567140

Bug: 210469972
Change-Id: I19e3b76e9289c9b0709c3c1584bbb93f008913f5
2022-04-05 12:55:43 +00:00
Jonathan Scott
b157e658a7 [scv2] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning.
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Bug: 210469972
Change-Id: I1ea926194992cbce26e2245fec0e563b3010a02f
2022-04-05 12:55:36 +00:00
Rubin Xu
fe4b824bbe Merge changes from topic "presubmit-am-a857ce8919bc4bb7802485a10b458590" into sc-v2-dev-plus-aosp
* changes:
  [automerge] Secure REMOTE_BUGREPORT_DISPATCH 2p: f62904fd70
  Secure REMOTE_BUGREPORT_DISPATCH
2022-03-28 10:10:03 +00:00
Hui Yu
a0be2d5cc5 Merge "[Bugfix] Don't delete mPendingUids if PendingTopPid is added later than updateOomAdj started" am: 8f321a616b am: c9c23976a9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2036403

Change-Id: Ie87188285f12c8d533ce053c1626a8080e04b67c
2022-03-24 16:46:13 +00:00
Rubin Xu
7997d581f5 [automerge] Secure REMOTE_BUGREPORT_DISPATCH 2p: f62904fd70
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17378906

Bug: 171495100
Change-Id: Iea8e133f8bd93b2568b6de21a6a7e2a95cf02ed0
Merged-In: I7649b4f22b74647d152d76bb46d5ca70bfa3617d
2022-03-24 14:55:11 +00:00
Rubin Xu
f62904fd70 Secure REMOTE_BUGREPORT_DISPATCH
In remote bugreport collection, Shell sends REMOTE_BUGREPORT_DISPATCH to
DevicePolicyManagerService which in turn notifies Device Owners that a
bug report is ready for collection. There existed a threat where a
malicous user could spoof the REMOTE_BUGREPORT_DISPATCH broadcast via
ADB to send a crafted bugreport to the Device Owner. Securing
REMOTE_BUGREPORT_DISPATCH is not as easy as it appears: putting a
permission on REMOTE_BUGREPORT_DISPATCH does not work since both the
legitimate sender and the malicious user are UID_SHELL. Instead, we
introduces a nonce which was sent from DPMS to Shell when bugreport is
triggered, and DPM will only accept REMOTE_BUGREPORT_DISPATCH when
a matching nonce is seen.

Ignore-AOSP-First: security fix

Bug: 171495100
Test: atest DeviceOwnerTest#testRemoteBugreportWithTwoUsers
Test: atest DeviceOwnerTest#testAdminActionBookkeeping
Test: atest BugreportManagerTest
Change-Id: I7649b4f22b74647d152d76bb46d5ca70bfa3617d
Merged-In: I7649b4f22b74647d152d76bb46d5ca70bfa3617d
(cherry picked from commit a4131c50d0)
2022-03-24 14:54:42 +00:00
huang chaopeng
2da542d368 [Bugfix] Don't delete mPendingUids if PendingTopPid is added later than updateOomAdj started
Analysis:
1.Doing updateOomAdjInnerLSP in backgroud, and it would last for a long
time
2.Now start a new Activity, windowManager save the latest topUid into PendingStartActivityUids
3.updateOomAdj task in step.1 done, and then delete all uids in PendingStartActivityUids
4.The topApp will be rejected by AppOps due to the deleting in step.3

Signed-off-by: huang chaopeng <huangchaopeng@oppo.corp-partner.google.com>
Change-Id: I52c7c2a8d6cb86b27b1f008cb56f670ce7698dc9
2022-03-24 10:47:35 +08:00
Patrick Rohr
c7d06c9e99 Merge "Split out the ethernet API surface and use framework-connectivity-t" am: c02e97dcdd am: 580f7ebbce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958559

Change-Id: Id8775d1085099fade286b65e0099fdf9457b1fed
2022-03-16 17:44:04 +00:00
Patrick Rohr
c02e97dcdd Merge "Split out the ethernet API surface and use framework-connectivity-t" 2022-03-16 16:03:30 +00:00
Sooraj Sasindran
cbeda1b1c3 Merge "Allow a list of configs to be sent for enterprise slice" am: 78bc18e26b am: 92a2654e17
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2019626

Change-Id: I7cf7107fdcb6c94f9c22940a9aa680465025b390
2022-03-15 04:40:26 +00:00
Xiao Ma
f4d72b212c Split out the ethernet API surface and use framework-connectivity-t
Ethernet framework and service source code is going to be moved to
Connectivity mainline module, this CL contains below corresponding
changes to adapt the migration in f/b side:

1. Split out ethernet module-lib APIs to Connectivity module.
   Add the ethernet resource filegroup to tiramisu-updatable-sources
   filegroup as well, build them together. Also update the module-lib
   and system api txt to reflect the APIs change. Remove the hidden
   APIs which are moved to Connectivity module. This removal fixes the
   api inconsistent issue with Tethering/apex/hidden/.

2. Remove EthernetService from SystemServer which will be registered
   from ConnectivityServiceInitializer.

3. Replace the BackgroundThread class(imported from f/b/core/java)
   with the one in the modules-utils-backgroundthread lib, which is
   visible to Connectivity module.

Bug: 210586283
Test: m
Test: atest FrameworksNetTests EthernetServiceTests
Change-Id: I3e13cb9c0e348333af295c2537d459aa6700ff17
Merged-In: I1956848d3248cc56e9841d221e5e4c160bed65a4
2022-03-14 13:47:01 +00:00
Sooraj Sasindran
e9c9dda003 Allow a list of configs to be sent for enterprise slice
Allow a list of configs to be sent for enterprise slice
Allow device owner to set enterprise slice config
Allow enterprise apn to be configured by profile owner

Bug: 217365439
Bug: 222723840
Test: ran CTS tests
Merged-In: I82c159843d0806cbfc5eea602fbd0304e7ff04ac
Change-Id: I82c159843d0806cbfc5eea602fbd0304e7ff04ac
2022-03-11 05:38:59 +00:00
Guanyou Chen
036d3ce1a9 [BugFix] acquireProvider maybe wait for timeout
Test: manual
Change-Id: Iaeb951ad8dda333e660a66a138e2cc80f9dbd6a0
2022-03-09 08:36:41 +00:00
TreeHugger Robot
42b2cec2d1 Merge "Allowing launch cookies to be passed via pending activity starts" into sc-v2-dev 2022-02-28 19:11:10 +00:00
TreeHugger Robot
95554e8967 Merge changes from topic "widget_launch_cookie-sc-v2-dev" into sc-v2-dev-plus-aosp
* changes:
  [automerge] Allowing launch cookies to be passed via pending activity starts 2p: 30362a07af
  Allowing launch cookies to be passed via pending activity starts
2022-02-28 19:11:10 +00:00
Junyu Lai
79fa2ad4ea [MS62.1] Start NetworkStatsService from the module am: c3c278779f am: 990eeb962e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987466

Change-Id: Id02c10cf56a14768cff58b585915668ddc97d0f9
2022-02-28 07:04:28 +00:00
Junyu Lai
990eeb962e [MS62.1] Start NetworkStatsService from the module am: c3c278779f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987466

Change-Id: I1f72e7f3fbcb64052e90a10bc2869076fc9ecea7
2022-02-28 06:26:36 +00:00
Felipe Leme
bce5c8c99a [automerge] Allows DPM.generateKeyPair() to be called from PO of affiliated user. 2p: e8caa07e9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16873887

Bug: 213388897
Change-Id: I49e4867165f0c8d7a3c258b0dd514b0b1e5dec1a
2022-02-24 02:31:37 +00:00
Felipe Leme
e8caa07e9f Allows DPM.generateKeyPair() to be called from PO of affiliated user.
If the key is used by device attestation, it can only be used by the
user that generated it, as it's not parcelable. Hence, on devices
running with Headless System User Mode (HSUM), the key must be
generated by the "real" user's PO, not the DO (which runs on system
user).

Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstallerDeviceIdAttestation # on phone
Test: manual verification with TestDpc on automotive
Bug: 213388897

Change-Id: I58623f5c1a1d60af7743f5a815a491ebbad9b9fe
2022-02-23 18:28:16 -08:00
Neil Fuller
02eebf4399 Merge "Switch "UTC time" to "Unix epoch time"" am: 1ecf1d2462 am: b78dfa9ee9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1979487

Change-Id: Ideb71c913dda192e7557e5f665fae6bb1f39ae8a
2022-02-23 17:06:42 +00:00
Neil Fuller
b78dfa9ee9 Merge "Switch "UTC time" to "Unix epoch time"" am: 1ecf1d2462
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1979487

Change-Id: I87481e4d54250097a306a1e7a0c48c0223f37f37
2022-02-23 16:43:27 +00:00
Neil Fuller
69c6a42de0 Switch "UTC time" to "Unix epoch time"
This is more correct.

Bug: 218802673
Test: Compile only
Merged-In: Ic477c021529a94b4a3665426b7daaf6567fa311a
Change-Id: Ic477c021529a94b4a3665426b7daaf6567fa311a
2022-02-22 15:05:33 +00:00
Presubmit Automerger Backend
37a7c8e89b [automerge] Allowing launch cookies to be passed via pending activity starts 2p: 30362a07af
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16968731


Change-Id: I68cd8b86e54bd5e3521724fdd5f21db28da38c3d
Merged-In: I339ea827836fa53ab5bb1617a72f9e0e5ae0f5ec
2022-02-22 14:33:56 +00:00
Selim Cinek
30362a07af Allowing launch cookies to be passed via pending activity starts
When overriding pending activity starts using remote animations,
we're now also allowing the passage of a launch cookie to associate
the task with the launched app. This allows us to return to the
right widgets for certain apps using broadcast trampolines.

Fixes: 220290671
Test: add Photos widget, return properly to widget
Merged-In: I339ea827836fa53ab5bb1617a72f9e0e5ae0f5ec
Change-Id: I339ea827836fa53ab5bb1617a72f9e0e5ae0f5ec
2022-02-22 14:33:46 +00:00
Yan Zhu
02272fd207 Merge "New @TestApi: DevicePolicyManager.isNewUserDisclaimerAcknowledged()" into sc-v2-dev am: 7ac3a06942
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16924150

Change-Id: I8e626dc38466799b2d65dfbd7519b0263ee60211
2022-02-22 04:08:11 +00:00
Junyu Lai
c3c278779f [MS62.1] Start NetworkStatsService from the module
NetworkStatsService is going to be moved into Connectivity mainlne
module and it will be not visible to SystemServiceResistry after
migration done. Thus:
1. Register service in NetworkStatsServiceInitialalizer, a separate
   initializer is needed because the service needs to be created
   before NetworkPolicyManagerService's initialization.
2. Call SystemReady at PHASE_ACTIVITY_MANAGER_READY phase where
   it needs to be ready before StatsPullAtomService pulls at
   PHASE_THIRD_PARTY_APPS_CAN_START.
3. Register manager in ConnectivityFrameworkInitializerTiramisu
   instead of SystemServiceRegistery.

Test: atest FrameworksNetTests CtsNetTestCases NetworkUsageStatsTest
Bug: 204830222
  (cherry-picked from ag/16688794)
Change-Id: I95020d816ed613ce3480a0720a5b71dcdc7fab72
Merged-In: I95020d816ed613ce3480a0720a5b71dcdc7fab72
2022-02-18 16:20:47 +08:00
Felipe Leme
abe9311d00 New @TestApi: DevicePolicyManager.isNewUserDisclaimerAcknowledged()
It also changes acknowledgeNewUserDisclaimer() to allow callers with
INTERACT_ACROSS_USERS permissions - that's more consistent with other
methods and allows it to be called by tests.

Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_newUserDisclaimer
Test: m update-api

Bug: 203822627
Bug: 215375992

Change-Id: I8b98a1af60db65c1b27f19cf3e93b21d33d88278
Merged-In: I8b98a1af60db65c1b27f19cf3e93b21d33d88278
(cherry picked from commit 9a6b808da3)
2022-02-17 06:02:35 +00:00
Joanne Chung
1bb2f28548 Merge "Update team OWNERS file." am: e96070ac89 am: 114d0c7773
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I973028e9095644d0aa71d3b0664297d81ecffb55
2022-02-16 05:14:21 +00:00
Joanne Chung
114d0c7773 Merge "Update team OWNERS file." am: e96070ac89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I50a93d3e190ba2a4988e0777be2c5e571f2a2760
2022-02-16 04:42:57 +00:00
Felipe Leme
334a4e4d51 Merge "Rename resetNewUserDisclaimer() to acknowledgeNewUserDisclaimer()" into sc-v2-dev am: d7a45338bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16830692

Change-Id: I1bcbc2c6b4de0471a6a5fd17e00a3210392bf7bf
2022-02-15 15:54:52 +00:00
Xin Li
2b87be68b8 Merge SP2A.220305.012
Bug: 219523960
Merged-In: I748fdd49626acaa0e986a9d8038039cada6faa60
Change-Id: I67693156d705f2488fe18149d2dd02d529f009ff
2022-02-14 20:06:38 +00:00
Joanne Chung
b00f0d6c95 Update team OWNERS file.
Bug: 177641730
Test: n/a
Change-Id: If4ecc7326dc229d8807e1497c5e3e2ef0637680f
2022-02-14 14:51:12 +08:00
Xin Li
5ad6db7742 Merge sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I8cfa435bb6233818adb9cc99dadeeb06a03443d5
Change-Id: Ib93992d88fd1704179009a3872798b9e7b83a6d1
2022-02-11 07:25:43 +00:00