Changes in shared code with ListView implementation seem to have
had negative side effects with Telegram. Revert the old onScrollRequested
implementation for now.
Bug: 189475409
Test: Verify gaps missing from telegram long screenshots
(and they don't run out of tiles)
Change-Id: Iff81293c6ec34bf3e024e930fe61ba9a1fd95b7b
Querying RPM stats on device with a large number of StateResidency info
can take a long time. Move the query to outside of the BatteryStats
lock to reduce the chance of lock contention.
Bug: 185970842
Test: atest android.cts.statsd.validation.ValidationTests#testPartialWakelock
Change-Id: I1c69b3f9c071e5d758cf4b22855c4b0ec221a5cf
using selected profile PackageManager.
Test: test on local device
Bug: 175240616
Fixes: 179798044
Change-Id: I30728705dbc60d0506b7d20a16bcc8f1eed9b6d0
(cherry picked from commit 0e4b75a215)
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.
* reportPerceptibleAsync
* removeImeSurfaceFromWindowAsync
Reason for revert:
We need more time to understand its performance implications.
[1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
b9590fa1e1
[2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
5a5648dcb5
[3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
d833f0dab4
[4]: I646ef4ae0570aae1812ea267f309441fdec6938d
38fd020616
[5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
4a820ccc41
[6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
0a32fd21ef
[7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
c4663ba6a9
[8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
f226a79fee
[9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
5e2d9f271d
Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
Previously, PhoneWindow will add the light flag for the bar if it is
specified light in theme. It won't remove the light flag if the theme is
not light. The previous logic in PhoneWindow#generateLayout assumes the
decor view was newly created.
However, the decor view can be reused from the preserved window. This
happens if the activity is recreated. So if the previous activity was in
a light theme and the newly created activity is in a dark theme, we
should clear the light bar flags added in the previous activity.
Fix: 174502412
Test: 1. Set Dialer (Phone) to dark theme from Dialer's display options.
2. Clear app data from Dialer's app info.
3. Open Dialer again and see if the color of system bars are
normal.
Change-Id: I3ea61322e4c3cfe26981e23792f42ab0b9a1e217
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
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
Settings will also call startLegacyVpn() to bring up Ikev2 VPN,
so it's needed to add a vpn type check in startLegacyVpn().
Otherwise, UnsupportedOperationException will be thrown when
Settings tries to bring up Ikev2 VPN.
Bug: 191937302
Bug: 188749090
Bug: 189808606
Test: 1. make gts && gts-tradefed
2. run gts --module GtsNetworkStackHostTestCases
Change-Id: I752c39bd1bf953a11bdf62e6f02f99f48fef23c4
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
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
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
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
Remaining clients of BatteryStatsHelper and BatterySipper should switch
over to BatteryStatsManager.getBatteryUsageStats()
Bug: 191877985
Test: N/A
Change-Id: Icb55e574a3d91bc6bef716e6724b352ef3d426b3
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
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
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
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
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