472099 Commits

Author SHA1 Message Date
Mike Ma
892ccd9bd5 Optimize memory usage in incidentd
EncodedBuffer is used a lot in incidentd. EncodedBuffer uses malloc
internally to acquire memory. Frequently creating and destroying
EncodedBuffer creates memory fragmentation, leading to high memory
usage after taking an incident report.
Also fixes a few other places with lots of malloc/free operations.

This change:
* Creates a pool of EncodedBuffer in incidentd. The saving is
significant. It reduces EncodedBuffer creation from 3 per section to
3 per report.
* Replaces malloc with mmap inside EncodedBuffer. mmap is guaranteed
to be mem page aligned, so there will be no mem fragmentation after
destroying EncodedBuffer.
* Replaces new with mmap inside TombstoneSection
* Forks a process to execute LogSection, because liblog malloc & free
significant amount of memory

Result:
PSS before taking a report: 1295 KB
PSS after taking a report: 1336 KB

Bug: 150311553
Test: heapprofd
Change-Id: I83bd9c969b751c80b2f42747020799bd85d8aae6
2020-03-23 18:46:58 -07:00
Santiago Etchebehere
9c750b3084 Merge "Send a command to the wallpaper when re-applying it" into rvc-dev 2020-03-24 01:46:29 +00:00
Yuhan Zhao
4b767ff2ab Fixing the bug where secondary lockscreen intent is sent to the admin receiver but no the service.
Bug: 150866056
Bug: 136085151
Test: atest KeyguardUpdateMonitorTest
Change-Id: I27a739f74d3049baa6d40815b9eb72c62e6b0acd
2020-03-23 18:41:39 -07:00
Lucas Dupin
a8dfb52c0f Merge "Fix display fade-out animation" into rvc-dev 2020-03-24 01:37:47 +00:00
TreeHugger Robot
14f33ae83e Merge "Native API Council asked that we remove the C++ class from the public header." into rvc-dev 2020-03-24 01:35:40 +00:00
Ben Lin
d00392385d PIP resize: Set starting orientation correctly.
This used to be always true as landscape, which is not always the case.

Bug: 147361175
Test: Manual
Change-Id: I02f057bb963a76ad9691e7d83bc145e94df1f9f0
2020-03-23 18:01:49 -07:00
Taran Singh
aef529a7cc Fix IME hide state
Insets API notifies IME when it's hidden. however, IMMS never
really received these state changes. Using requestHideSelf() makes sure
IMMS is in-sync.

Fix: 151980214
Test: manually using the steps in bug

Change-Id: I7f6098a61a5942795ffd33a60329e4dd5fb5d6cb
2020-03-24 00:43:42 +00:00
François Gaffie
75702566e4 Fix regression on voice call default volume
This CL fixes regression introduced by aosp/586122.
The fallback of default volume uses a temporary max volume which may
not be valid. (-1).
This CL uses the up to date AudioSystem.DEFAULT_STREAM_VOLUME instead.
This happens only if no "ro.config.vc_call_vol_default" property defined.

Bug: 152079599
Test: Ensure "ro.config.vc_call_vol_default" is not defined &&
    dumpsys audio && ensure VOICE CALL default volume (aka for device 40000000)
    is not zero.

Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Change-Id: I8937e54a61df196da8c2578f0a581b63dea34caa
Merged-In: I8937e54a61df196da8c2578f0a581b63dea34caa
2020-03-24 00:31:48 +00:00
Lucas Dupin
d9af6311e9 Avoid duplicate text on keyguard indication
It's possible that the transient indication will say "Charged" and the
power indication will be the same. In those cases they should not be on
top of each other.

Test: plug device, press power to wake-up
Fixes: 151181410
Change-Id: I15a6ab799a655ef84e7c8d5229b2d9cf4d8597fc
2020-03-23 17:30:15 -07:00
TreeHugger Robot
393c9121ce Merge "Hide CellularBatteryStats#getTxTimeMillis." into rvc-dev 2020-03-24 00:09:05 +00:00
Makoto Onuki
48b68ffe6e Merge "Reconfigure stub libraries to do less work." into rvc-dev 2020-03-23 23:53:44 +00:00
Chris Tate
968e9edbd2 Merge "Revert "Revoke 'always' web handler status when not autoverifying"" into qt-qpr1-dev 2020-03-23 23:42:14 +00:00
Lyn Han
e139557805 Remove bubble from stack by key instead of icon
Fixes: 152251180
Test: manual - bubbles trimmed on overflow
Test: manual - normal bubble removal still works fine
Change-Id: I19b8fa54f28ae6c959354f4a3a7f4d0e8ed70d44
2020-03-23 16:25:29 -07:00
Vishnu Nair
84d1c3c618 Merge "Revert "Revert "RootViewImpl: Fix measure size hint for WRAP_CONTENT windows""" into rvc-dev 2020-03-23 23:25:21 +00:00
TreeHugger Robot
ffdb6361b8 Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-03-23 23:23:14 +00:00
David Su
87d6a79f2f frameworks/base/wifi/tests: Run mts-wifi on AOSP builds
This is a temporary workaround for mts-wifi to
run on AOSP builds, since on those devices the
Wifi package name is `com.android.wifi` and not
`com.google.android.wifi`.

Bug: 151836001
Test: continuous runs
Change-Id: I11baae67e10638acd8c24ae0fab92e5b2bfca6e4
2020-03-23 16:14:54 -07:00
Taran Singh
0485041305 Fix floating IME visibility
Floating IME now applies final visibility

Test: Manually using steps in bug
Fix: 151953095
Change-Id: Id611e4bac22e9663d04e260794ea0f621d7b7e29
2020-03-23 15:58:39 -07:00
Eino-Ville Talvala
174fd34cba Merge "Camera: Improve docs for getOutputMinFrameDuration" into rvc-dev 2020-03-23 22:55:22 +00:00
Lucas Dupin
59dc371fed Merge "Set dark theme flag when initializing with Color" into rvc-dev 2020-03-23 22:49:37 +00:00
Ben Lin
f603b27000 Reset the scaling when finalizing resize.
Bug: 147361175
Test: Manual
Change-Id: Ia640ead2ee439013866d86934314e0a7262cad7d
2020-03-23 15:39:07 -07:00
Santiago Etchebehere
85ef2fddce Send a command to the wallpaper when re-applying it
We don't set a wallpaper component again if it's the one
already set, so we're now sending it a command notifying
of this in case the wallpaper needs to reload or apply
settings.

Bug: 147677688
Test: atest WallpaperManagerServiceTests
Change-Id: If65671287ba3270933b75771a8c1c65c5ff0216a
2020-03-23 15:37:39 -07:00
TreeHugger Robot
75141af0c2 [automerger skipped] Merge "Import translations. DO NOT MERGE" into qt-qpr1-dev am: fb389b2724 -s ours
am skip reason: subject contains skip directive

Change-Id: I901e5d367b92a88ad2d24712e298cf073c30c709
2020-03-23 22:27:15 +00:00
Amit Mahajan
9bfde0e1fd Hide CellularBatteryStats#getTxTimeMillis.
Will be re-exposed as SystemApi in S.

Test: TH
Bug: 152247297
Change-Id: Ifb87676fa5afd2720dd09f36f3ff67c1b215b676
2020-03-23 15:15:17 -07:00
TreeHugger Robot
fb389b2724 Merge "Import translations. DO NOT MERGE" into qt-qpr1-dev 2020-03-23 22:11:06 +00:00
Lucas Dupin
ed5634d9d6 Fix display fade-out animation
Display was not turning off animated in some occasions, due to a
wrong variable being used.

Test: atest DozeScreenStateTest
Fixes: 152246123
Change-Id: I5e6f32566d74f67476018b01013fc177702311a7
2020-03-23 14:52:26 -07:00
TreeHugger Robot
4f53d72e52 Merge "Add unit test for ClosedSubscriberGroupInfo" into rvc-dev 2020-03-23 21:50:07 +00:00
Jorim Jaggi
22488d31bb Performance optimizations for new insets
- Prevent unnecesary dispatchApplyInsets caused by legacy system
also requesting inset changes
- Make insetsModified oneway. It's safe to do so because we
absolutely don't care about interleaving with other WindowSession
methods.
- Do not trigger layout if nothing relevant has changed
- Only trigger requestFitSystemWindows if state actually changed

Test: Systrace. Automated perf test will be added
Bug: 151865131
Change-Id: I24944875e739e4a74606e3a02bbf14585c1c13db
2020-03-23 22:31:52 +01:00
Michael Groover
6d4c98513b Merge "Add method to clear out SubscriptionInfo#getCardString" into rvc-dev 2020-03-23 21:31:42 +00:00
TreeHugger Robot
5258155ade Merge "Controls UI - Remove BIND_WAIVE_PRIORITY" into rvc-dev 2020-03-23 21:29:32 +00:00
Ruchir Rastogi
875a90282a Merge "Wrap StatsDimensionsValue over structured parcel" into rvc-dev 2020-03-23 21:20:24 +00:00
Bill Yi
a1905e9153 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I8521dc885039e601be78d95fe8a3926194170cef
2020-03-23 14:09:59 -07:00
TreeHugger Robot
8faccab86e Merge "Fix flaky important people sort test" into rvc-dev 2020-03-23 20:53:03 +00:00
Bill Yi
f89b4d00a1 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I5634e87a7f723605ed863253fc26f13d13189b20
2020-03-23 13:51:03 -07:00
Vladimir Marko
82f2060f55 Merge "Add permitted_packages to framework-wifi." into rvc-dev 2020-03-23 20:43:18 +00:00
TreeHugger Robot
2ca22c9805 Merge "Controls UI - Move 'add controls' to popup menu" into rvc-dev 2020-03-23 20:29:38 +00:00
TreeHugger Robot
c3d7200b6a [automerger skipped] Merge "Parcel only the canonical Uri.Part representation, not both." into qt-qpr1-dev am: 7a9c03e529 -s ours
am skip reason: Change-Id I2bc2008e49de5a66641ecdbd8e5354dfa647269d with SHA-1 c9afa38f97 is in history

Change-Id: I7a7b61af41419bd722b055af2e3b41f673c17992
2020-03-23 20:26:24 +00:00
Shuzhen Wang
69cf0fd599 Camera: Add visual samples for android.control.zoomRatio
To better document how android.control.zoomRatio works, add diagrams to
illustrate its relationship with scalerCropRegion.

Test: Build and read docs
Bug: 144780745
Change-Id: I90b93c4d516f6f1e2d427ed3d56e85b6c94befe8
2020-03-23 13:26:03 -07:00
TreeHugger Robot
87500a84a4 Merge "Make Log.isLogagble @FastNative" into rvc-dev 2020-03-23 20:25:39 +00:00
Dan Stoza
571a08feec Merge "Add <p> tags for PowerManager#getThermalHeadroom" into rvc-dev 2020-03-23 20:04:41 +00:00
TreeHugger Robot
7a9c03e529 Merge "Parcel only the canonical Uri.Part representation, not both." into qt-qpr1-dev 2020-03-23 20:04:30 +00:00
Ben Lin
ed8543b731 Merge "Scale the leash for PIP User-started resizing." into rvc-dev 2020-03-23 19:45:49 +00:00
Eino-Ville Talvala
585305da32 Camera: Improve docs for getOutputMinFrameDuration
The current text was misleading, since minimum frame duration of a
stream affects the aggregate minimum frame duration of a session
whether a stream is in use for a given request stream or not.

Test: Docs build
Bug: 147080626
Change-Id: Ic884cd0bb3ea184383944cb78e9713d6044b1959
2020-03-23 12:41:17 -07:00
TreeHugger Robot
82ccae20bb Merge "Fix security issue in DynamicRefTable::load." into qt-qpr1-dev am: 084cc32ce8
Change-Id: Ib684012f3e78e95468ec0210b0c339eaace580fb
2020-03-23 19:39:15 +00:00
Matt Pietal
94ff20fd28 Controls UI - Remove BIND_WAIVE_PRIORITY
This should resolve an issue with the network being cut from the
service after periods of inactivity

Bug: 152218915
Test: manual
Change-Id: Ife28c1de75959afab6ea969c14780cfd0de48b3b
2020-03-23 15:37:46 -04:00
tsaichristine
a3d2ed8cb2 (Part 3) Use new socket schema with statsd tests
Update last set of statsd tests to use new socket schema

Test: bit statsd_test:*
Bug: 149590301
Change-Id: I0fe2c219ad75813db54ff0cfbad50f55e29cb626
2020-03-23 12:23:26 -07:00
Svetoslav Ganov
09b9570862 Merge "Add APIs to move suggestions below/above window" into rvc-dev 2020-03-23 19:10:03 +00:00
TreeHugger Robot
084cc32ce8 Merge "Fix security issue in DynamicRefTable::load." into qt-qpr1-dev 2020-03-23 19:02:33 +00:00
Steve Elliott
5c42f4a03a Fix flaky important people sort test
Fixes: 152191781
Test: atest
Change-Id: If74d1711184056cf076cfc789797f20bd2280c78
2020-03-23 14:59:26 -04:00
Aurimas Liutikas
6bb95ad751 Reconfigure stub libraries to do less work.
- Stop generating api version XML file
- Stop reading api version XML file

Testing with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework

Before patch:
Run #1: 118.7 seconds
Run #2: 118.8 seconds
Run #3: 117.7 seconds
Average: 118.4 seconds

After patch:
Run #1: 107.8 seconds
Run #2: 106.5 seconds
Run #3: 108.3 seconds
Average: 107.5 seconds

Savings of 10.7 seconds (~9.2%)

Test: make framework
Bug: 151160048
Change-Id: Ie3a7e078844d1d1cac7976142e2069704d4c1545
Merged-in: Ie3a7e078844d1d1cac7976142e2069704d4c1545
2020-03-23 18:52:53 +00:00
Kweku Adams
62cef43ac2 Deprecate POWER_SAVE_MODE_CHANGING broadcast.
The internal POWER_SAVE_MODE_CHANGING broadcast is sent at the same
time as the POWER_SAVE_MODE_CHANGED broadcast. Since broadcasts are
asynchronous,there's no reason to have both, especially since it can
potentially lead to inconsistency, so we should simplify down to just
one. Mark the POWER_SAVE_MODE_CHANGING broadcast as deprecated in R and
unavailable to apps targeting R. We'll remove it in a future version.

Bug: 79580230
Test: Android builds
Test: atest BatterySaverReceiverTest
Change-Id: I70e20ce53b496a3dc88a1083c230334f53032d81
2020-03-23 11:51:46 -07:00