Commit Graph

16402 Commits

Author SHA1 Message Date
Orion Hodson
44a1cece34 Revert^2 "Zygote: Load system server code early" am: 91c4f415e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15107813

Change-Id: I7521056726af2c39456f351111ab27e969ba8cb3
2021-06-29 16:11:10 +00:00
TreeHugger Robot
3d7b4a9670 Merge "Disable the BatteryUsageStatsStore feature" into sc-dev am: 9c8441c8af
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128691

Change-Id: Ic7de5a1c2949d17459bed2daf0dbadf42aad4b7f
2021-06-29 00:29:58 +00:00
TreeHugger Robot
9c8441c8af Merge "Disable the BatteryUsageStatsStore feature" into sc-dev 2021-06-29 00:25:22 +00:00
TreeHugger Robot
2fbaf455f4 Merge "Improve exception logging for system backup/restore" into sc-dev am: 8f589c02c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15123973

Change-Id: I6180db92be6ef2bb99b8b8c80fe22758af0526c8
2021-06-28 19:24:15 +00:00
Dmitri Plotnikov
483702e0df Disable the BatteryUsageStatsStore feature
Bug: 191120091
Test: run PowerOnOffTest#testPowerOnOff
Change-Id: I536bbf04ac3233575487bbffd120cbdfa305c41f
2021-06-28 09:22:15 -07:00
Orion Hodson
91c4f415e3 Revert^2 "Zygote: Load system server code early"
This reverts commit 6be3b0e117.

(cherry picked from commit d0d23f5a2b)

Bug: 180949581
Test: atest odsign_e2e_tests
Merged-In: I7a7dd5b475af4502dc9671d2dce02ee3673ddf81
Change-Id: I8a4ddc870816b47593184b06c4b36a41eda923f2
2021-06-28 13:33:12 +01:00
Bryan
385424f431 Improve exception logging for system backup/restore
Make sure to log stack traces of unexpected exceptions
to allow us to better diagnose issues such as b/190023280

Change-Id: I29a32329f52b8346570148ed5abc34f3149aa0f9

Test: make
Bug: 190023280
Change-Id: Idd4e4968fe4c642b463149f98a7669a8733b37d7
2021-06-28 10:45:42 +00:00
Mark Renouf
7e83e11521 Merge "Adds long screenshot support for ListView" into sc-dev am: 82f0979e7b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15083160

Change-Id: I74649e6907b4593ac2158a9c4b6008a0660fa6d0
2021-06-25 16:33:45 +00:00
Siim Sammul
7a24c02590 Merge "Fix process source propagation for binder calls stats settings so that it is correctly reported in the pushed atom BinderLatencyReported." into sc-dev am: fc7b373389
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15054863

Change-Id: Id04f637c6614ffd3296833950f3055ee282b2598
2021-06-25 16:29:01 +00:00
Siim Sammul
fe3ccac104 Merge "Collect binder latency data even when device is charging / device state is unknown." into sc-dev am: 764da8b1ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080830

Change-Id: I0b9c7e78655e909b2201e7b19ea0cee34883e54f
2021-06-25 16:27:53 +00:00
Mark Renouf
82f0979e7b Merge "Adds long screenshot support for ListView" into sc-dev 2021-06-25 14:56:49 +00:00
Siim Sammul
fc7b373389 Merge "Fix process source propagation for binder calls stats settings so that it is correctly reported in the pushed atom BinderLatencyReported." into sc-dev 2021-06-25 11:07:53 +00:00
Siim Sammul
764da8b1ab Merge "Collect binder latency data even when device is charging / device state is unknown." into sc-dev 2021-06-25 09:03:12 +00:00
Siim Sammul
f64b4c5dc9 Fix process source propagation for binder calls stats settings so that
it is correctly reported in the pushed atom BinderLatencyReported.

Bug: 180584913
Test: unit test
Change-Id: Ifbdd96c73276546fb2a05213f71e1de088e1fe1e
2021-06-25 09:02:26 +00:00
Alison Cichowlas
07d6b3487c Merge "Direct share load cutback - minimal/low-risk version." into sc-dev am: cf49f78265
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15056134

Change-Id: I057a6c2e898a5a9c6637fd2e13b5d195ae2b0a3c
2021-06-24 20:25:12 +00:00
Alison Cichowlas
cf49f78265 Merge "Direct share load cutback - minimal/low-risk version." into sc-dev 2021-06-24 20:19:45 +00:00
Mark Renouf
021fd5479f Adds long screenshot support for ListView
Adds ListViewCaptureHelper to handle captures from ListView.
This is required due to the implementation of
ListView#requestChildRectangleOnScreen which limits scrolling
to currently-bound views only.

Bug: 189479375
Test: Manual, long screenshot WhatsApp conversation view.
Change-Id: I37d01391b4d773db6e91fc104b0351d70bff01d3
2021-06-24 12:45:26 -04:00
TreeHugger Robot
8305c5584b Merge "Allow app zygote preload to retain files across fork" into sc-dev am: 2eca07915f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080412

Change-Id: I224e4fe581f96381fe8a1b67ac2f0b4d3cb7fdc1
2021-06-24 13:19:42 +00:00
TreeHugger Robot
2eca07915f Merge "Allow app zygote preload to retain files across fork" into sc-dev 2021-06-24 13:18:02 +00:00
Joe Bolinger
9ef3aee3b7 Merge "Fix crash when BiometricPrompt requests swipe pattern and talk back is enabled." into sc-dev am: aa910853fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15053960

Change-Id: I0ae17514424b7b0775ca794a212919086555bdca
2021-06-24 02:32:53 +00:00
Nate Myren
59067b7f08 Merge "Create Attribution Chains in HistoricalOps" into sc-dev am: 3e51f7cabd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14963609

Change-Id: I60aa91c4ef0971aed21329fed880821bf5ae2da4
2021-06-24 02:32:39 +00:00
Dmitri Plotnikov
6a20a99d17 Merge "Deprecate BatteryStatsHelper and BatterySipper" into sc-dev am: fb1dc9e3db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15081293

Change-Id: Idd5114a27bf3c84238ef9c9c6b56ce67b65efc24
2021-06-24 02:31:13 +00:00
Joe Bolinger
aa910853fb Merge "Fix crash when BiometricPrompt requests swipe pattern and talk back is enabled." into sc-dev 2021-06-23 21:25:03 +00:00
Nate Myren
3e51f7cabd Merge "Create Attribution Chains in HistoricalOps" into sc-dev 2021-06-23 21:23:19 +00:00
Dmitri Plotnikov
fb1dc9e3db Merge "Deprecate BatteryStatsHelper and BatterySipper" into sc-dev 2021-06-23 20:16:26 +00:00
Nate Myren
fd49debdc0 Create Attribution Chains in HistoricalOps
Add a historical flag to signify that attribution chains should be
assembled. Assemble the chains, filter out middle nodes, and attach the
last visible node to the start as a proxy info

Bug: 158792096
Test: manual
Change-Id: I8fbd8f438c62b28fd90039440e86224c624dea79
2021-06-23 12:12:15 -07:00
TreeHugger Robot
97d85c8aef Merge "Remove Intent.ACSD from KEYCODE_SEARCH action in-app" into sc-dev am: 8890ec0d54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15027753

Change-Id: I3d8df7b1d0e174a5b6078183ea131b3c8cd6fd45
2021-06-23 18:36:04 +00:00
TreeHugger Robot
8890ec0d54 Merge "Remove Intent.ACSD from KEYCODE_SEARCH action in-app" into sc-dev 2021-06-23 18:16:15 +00:00
Dmitri Plotnikov
5be4b3e526 Deprecate BatteryStatsHelper and BatterySipper
Remaining clients of BatteryStatsHelper and BatterySipper should switch
over to BatteryStatsManager.getBatteryUsageStats()

Bug: 191877985
Test: N/A
Change-Id: Icb55e574a3d91bc6bef716e6724b352ef3d426b3
2021-06-23 10:17:00 -07:00
Siim Sammul
421a6874ee Collect binder latency data even when device is charging / device state
is unknown.

Test: unit test
Bug: 180584913
Change-Id: I2e4234b764e4341cea54172309d1f804a7cd5a88
2021-06-23 15:59:44 +00:00
Jeff DeCew
9d5906690f Merge "Don't crash the notification bind if the icon fails to resolve." into sc-dev am: ccb14ac813
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15017666

Change-Id: I1240b2c0089b9b816cfd80b1d4efe4f4e910f73f
2021-06-23 14:28:15 +00:00
Jeff DeCew
ccb14ac813 Merge "Don't crash the notification bind if the icon fails to resolve." into sc-dev 2021-06-23 14:26:09 +00:00
Egor Pasko
ff6ac69e69 Allow app zygote preload to retain files across fork
The bug proposes to 'move' the /proc/self/fd/ readlink/stat/etc checks
performed by the FileDescriptorAllowlist from before-fork to an earlier
stage.

The original aim was to allow the app zygote Preload hook to open
ashmem/memfd read-only regions to save more RAM (around 5MiB on aarch64)
via sharing more across processes. Potentially other files/sockets can
be opened - the app zygote takes responsibility of managing file
descriptor access controls across its own processes. App Zygote Preload
does not run 3rd party code.

Unfortunately a straightforward move of the checks to
just-before-preload has disadvantages:
* opens more codepaths for potential accidental misuse (the zygote
  accepts commands between preload and fork, there are valid usecases
  for extending these commands)
* this way FileDescriptorAllowlist would need to support more file
  descriptor types (sockets and maybe pipes), which is not needed now
  because these FDs are closed right before forking

The solution proposed here is to:
1. Determine the set of file descriptors open before preload
2. Run the preload hook
3. Determine FDs opened by the hook and allow them to remain open across
   fork
4. Hypothetical new attempts to preload (if ever supported) will not
   affect the allowed FDs - the preload will be able to toss its own FDs
   the way it wants, but not open the new-new ones

Bug: 184808875
Test: Manual: unreleased Chrome patch: while in app zygote preload,
      create ashmem region, passes it to 'untrusted_app' (=browser
      process), and call mmap(2) on it.
Change-Id: Ie302eabca83a0e4f409cb131e4308b73e5f6a580
Merged-In: Ie302eabca83a0e4f409cb131e4308b73e5f6a580
2021-06-23 12:59:32 +00:00
Nikita Ioffe
e1dfa92bf1 Merge "Rename partner-apex-allowlist to vendor-apex-allowlist" into sc-dev am: b3db287943
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15054865

Change-Id: Ibfc6079f6ecd4fc3fbc0784b91f32aefae2c838e
2021-06-23 10:59:46 +00:00
Nikita Ioffe
b3db287943 Merge "Rename partner-apex-allowlist to vendor-apex-allowlist" into sc-dev 2021-06-23 10:47:38 +00:00
Bryan
3249562ace Changes to how we notify widget restore participants of new ids am: f66eab85a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002452

Change-Id: I5d3dda11c941914d0b6099755657b7b164fcced5
2021-06-23 09:51:30 +00:00
Bryan
f66eab85a0 Changes to how we notify widget restore participants of new ids
As part of widget restore, we need to notify participants (hosts &
providers) of the mapping between ancestral and new widget ids.
Prior to this change, this was done at the end of system restore
and after each restore-at-install of unbundled apps.

There were two issues with this:
1) We would try to notify not-yet-installed participants at the end of
system restore and then *not* try again when they were installed.
2) We relied on PACKAGE_ADDED broadcasts to know which participants were
installed, but these are delivered asynchronously and not guaranteed
to be processed before the restoreFinished call.

After this change, we:
1) Only notify participants that are actually installed
2) Use receipt of the PACKAGE_ADDED / CHANGED broadcast to trigger
notification of any restore participants that are added or changed
*after* system restore completes.

2 is safe because by the time PackageManager sends the package
added / changed broadcasts, the app data restore has been completed,
and the app has been killed if needed.

Bug: 162057170
Test: Manual restore of Keep widget via cloud and d2d
Change-Id: I51dec33d09b62faba6d7c7daacd718a3c0682f7d
2021-06-23 09:24:09 +00:00
Ahaan Ugale
d8d3204412 Merge changes from topics "cc-composing-update", "cc-merge-equals" into sc-dev am: 5d42257561
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14994799

Change-Id: I4f539b81c5396c2c44738dd41fcc928e172b938e
2021-06-23 05:46:49 +00:00
Ahaan Ugale
5d42257561 Merge changes from topics "cc-composing-update", "cc-merge-equals" into sc-dev
* changes:
  ContentCapture: Don't ignore events with changed composing/selection span
  ContentCapture: Notify when Composing region changes.
2021-06-23 05:05:19 +00:00
Dmitri Plotnikov
7b1b070a32 Merge "Fix Bluetooth power accounting after a BT crash" into sc-dev am: cfc8359f34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15055646

Change-Id: I189d02f2a0b756953d54f8826babd895a77b5b31
2021-06-22 21:22:41 +00:00
Dmitri Plotnikov
cfc8359f34 Merge "Fix Bluetooth power accounting after a BT crash" into sc-dev 2021-06-22 21:19:55 +00:00
Mark Renouf
1c59307803 Merge "Fixes long screenshot landscape and split window bugs" into sc-dev am: db27afd2b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15066724

Change-Id: I02ba1308636e9ac1b87cbb34b0177c35155370d7
2021-06-22 19:33:46 +00:00
Nikita Ioffe
d204005ac3 Rename partner-apex-allowlist to vendor-apex-allowlist
Also rename corresponding field and getter in SystemConfig.java, and add
new ALLOW_VENDOR_APEX flag to control what partitions can specify
allowed vendor APEXEs (so far: /product, /oem and /vendor).

Bug: 189274479
Test: atest FrameworksServicesTests:SystemConfigTest
Change-Id: I680090d7a1237cb95c1aa4ea3975c50d06b35fcc
2021-06-22 19:06:48 +01:00
Dmitri Plotnikov
1beb4fcdbd Fix Bluetooth power accounting after a BT crash
Bug: 191488536
Test: Use BatteryStatsViewer to take a note of BT usage time
      $ adb shell killall com.android.bluetooth
      Use BatteryStatsViewer to verify that BT usage time is going up
Change-Id: I8438f19bb4bd6365da6d582fb7347f0a2cbddc1c
2021-06-22 10:51:34 -07:00
Mark Renouf
1c996ad287 Fixes long screenshot landscape and split window bugs
Fixes incorrect view transform in ViewRenderer

The tranform was mapping to on-screen coordinates, where
in-window position is needed.

Bug: 183045126
Bug: 189289758
Bug: 189235588

Test: manual, long screenshot the bottom app in split window mode
Change-Id: Ibaa9987b229f9e8ec0a1002ee84d797ca6026fb9
2021-06-22 17:16:01 +00:00
Nikita Ioffe
6b4a60cc21 Merge "Add sys config to handle apexes that are allowed to be updated" into sc-dev am: 23403fdc99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14843816

Change-Id: Ia1be8595d22d4946c0b6c9af9725a23df6b46dbd
2021-06-22 15:11:11 +00:00
Sergey Volnov
dc52e50c3d Merge "Implement preriodic trusted process restarting for hotword detectors." into sc-dev am: 56686819a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14679832

Change-Id: I746f8771183b3b0bcea3746410334f94a5cdfd3e
2021-06-22 15:08:06 +00:00
TreeHugger Robot
3979ee87a8 Merge "Do not canonicalize overlay config test paths" into sc-dev am: 890daeb051
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908371

Change-Id: Idfd0b5a0d27dbaca145454258c60cfe09faf4dc9
2021-06-22 14:59:46 +00:00
Nikita Ioffe
23403fdc99 Merge "Add sys config to handle apexes that are allowed to be updated" into sc-dev 2021-06-22 14:15:41 +00:00
Sergey Volnov
56686819a8 Merge "Implement preriodic trusted process restarting for hotword detectors." into sc-dev 2021-06-22 13:33:08 +00:00