Commit Graph

16608 Commits

Author SHA1 Message Date
TreeHugger Robot
b374cdc56a Merge changes I5bdc1f46,Idd24fd51 into sc-dev am: cfe4767b40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15113790

Change-Id: Ie084b6cf7847debdbb29b95d69d765686fa3a207
2021-06-30 22:17:02 +00:00
TreeHugger Robot
cfe4767b40 Merge changes I5bdc1f46,Idd24fd51 into sc-dev
* changes:
  Sharesheet style updates
  Update Edit icon.
2021-06-30 22:00:33 +00:00
Dmitri Plotnikov
bea4bac02c Merge "Fix boot time BatteryStats reset failure" into sc-dev am: ebf77ebc51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15128655

Change-Id: I4681840e210a25d27ecb03ff30da088721f2fc8b
2021-06-30 19:12:17 +00:00
Dmitri Plotnikov
ebf77ebc51 Merge "Fix boot time BatteryStats reset failure" into sc-dev 2021-06-30 18:53:20 +00:00
TreeHugger Robot
6611a10a66 Merge "Pause watchdog monitor for incfs native lib extraction" into sc-dev am: 920e1fd7a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15147287

Change-Id: I41be5812173b379543da8d777673da3e7ce519a0
2021-06-30 18:27:00 +00:00
Dmitri Plotnikov
bcd46f1ed4 Fix boot time BatteryStats reset failure
We need some services to create a battery stats snapshot
captured at the time of battery reset.
The issue is that if the battery stats reset occurs during boot,
before the system is ready, those services may not be prepared.

The fix is to postpone battery stats reset until after the
system server is ready.

Also, we will now reset the stats if battery got partially charged
and discharged repeatedly without ever reaching the full charge.
This will prevent battery sessions from going on forever and
overflowing internal data structures.

This CL partially reverts 0ed84f1263

Bug: 192252233
Test: run PowerOnOffTest#testPowerOnOff repeatedly
Change-Id: Ib486e4caeeac7c933288c3a1055259c05f45c6c8
2021-06-30 17:07:58 +00:00
Yurii Zubrytskyi
337f73edc9 Pause watchdog monitor for incfs native lib extraction
Native library extraction potentially takes much longer time for
Incremental installations vs the regular ones: each page can
wait for up to 10s (adb) or 100ms (non-adb), adding up to the
full watchdog timeout of 1 min and triggering a reboot.

This CL pauses Watchdog for the thread that's running extraction
to make sure we don't try to fix a hanging single installation
with killing the OS.

Bug: 191166673
Fixes: 191166673
Test: atest package manager and incremental suites
Change-Id: I9c4c24f305e079f346a76b64d4841cdbd58734fa
2021-06-29 16:21:12 -07:00
TreeHugger Robot
6ccd19fdbe Merge "Add global app op restrictions" into sc-dev am: 0ac141c3ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080961

Change-Id: I15d98bfee0038471c434151e65082deca1dbad43
2021-06-29 20:07:54 +00:00
TreeHugger Robot
0ac141c3ba Merge "Add global app op restrictions" into sc-dev 2021-06-29 19:53:50 +00:00
Orion Hodson
8e8cb4cb1f Merge changes from topic "system-server-images" into sc-dev
* changes:
  Fix JNI error
  Revert^2 "Zygote: Load system server code early"
2021-06-29 16:05:36 +00:00
TreeHugger Robot
49a82950f5 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: I755f05ab20fd1d2c907640b359975bc0814b6736
2021-06-29 00:30:04 +00:00
TreeHugger Robot
9c8441c8af Merge "Disable the BatteryUsageStatsStore feature" into sc-dev 2021-06-29 00:25:22 +00:00
Evan Severson
1d096f209d Add global app op restrictions
Instead of managing across all users we can restrict globally and fast
fail if the restriction is set

Test: atest CtsSensorPrivacyTestCases
Bug: 191016260
Change-Id: Ida1a2d1734b7e3d40818485062bec0f96270bc4b
2021-06-28 22:22:59 +00:00
TreeHugger Robot
2b6aa32125 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: Ie389509f9365d08d7750295b45be14cdd001edd1
2021-06-28 19:24:18 +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
Alison Cichowlas
fc7069c169 Update Edit icon.
Bug: 186719466
Test: icon only, manually verified
Change-Id: Idd24fd51fcd5f3b986889bc16bf0eb05507d7ff0
2021-06-25 19:50:34 -04:00
Mark Renouf
db211ddf76 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: I78cb8c1e7f50168e80a3e6cadd1e2c9a0d023b16
2021-06-25 15:08:32 +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
07aae99572 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: I96717cda6045b2cb1f2e87b7bcdee8922e967bf9
2021-06-25 11:16:29 +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
Orion Hodson
3d5d8f4f01 Merge "Revert^2 "Zygote: Load system server code early"" am: 8be0de5892 am: 387a79c188
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1744478

Change-Id: Ia6efbecfc4a2d5eea62b254049572de8a5c52e8e
2021-06-25 09:32:02 +00:00
Siim Sammul
26e17305ff 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: I32ba75f264624570c4eff5b74db72e11a6f71fbf
2021-06-25 09:16:41 +00:00
Orion Hodson
8be0de5892 Merge "Revert^2 "Zygote: Load system server code early"" 2021-06-25 09:09:01 +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
c16e0ac3ed 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: Ic2f48cfd7a940ad20530160df4f1dbae8b9d1957
2021-06-24 20:24:34 +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
Orion Hodson
d0d23f5a2b Revert^2 "Zygote: Load system server code early"
This reverts commit 6be3b0e117.

Bug: 180949581
Test: atest odsign_e2e_tests
Change-Id: I7a7dd5b475af4502dc9671d2dce02ee3673ddf81
2021-06-24 20:09:56 +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
vichang
406a312719 Merge "Revert "Refactor StructCapUser{Header,Data} and StructLinger for API review"" am: 789d83065b am: 820ca1a14c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1744717

Change-Id: I6d71a3320fa5d4b772a5f5e9fe7223dda92d73ba
2021-06-24 15:32:55 +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
f45efd5cf7 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: Ib2b00c45b45cba9b4311fb20a925f48955c80eb8
2021-06-23 21:38:02 +00:00
Nate Myren
f811370bf1 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: I9e6f201a7fe728ad4f1b914ac206467fac7f6769
2021-06-23 21:37:39 +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
35da44cdac 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: I418692861a8c286d9a08818d752aeec657fae4bd
2021-06-23 20:18:47 +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
aafa98aebd 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: I362b33f1688ed42e3cb3f7cea3a4bd6955790a40
2021-06-23 18:35:26 +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
Victor Chang
9a285e79f3 Revert "Refactor StructCapUser{Header,Data} and StructLinger for API review"
Revert the class rename in master as discussed in http://b/183513856#comment19,
because the API has landed Android S.

This reverts the commit fa36bdff9f

Bug: 183513856
Test: m droid
Change-Id: I38bd8b7a9dad85d993dd432ab8f72995a23550fc
2021-06-23 17:31:35 +01: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
aa44e50297 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: I94feee2f0c28f30068381a1475fc9745f912edc6
2021-06-23 14:27:09 +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
a025e488d1 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: I7cf96b51c0e21b2ec83900cf3380bcd5647c798a
2021-06-23 10:58:43 +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