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
This used to be always true as landscape, which is not always the case.
Bug: 147361175
Test: Manual
Change-Id: I02f057bb963a76ad9691e7d83bc145e94df1f9f0
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
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
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
Fixes: 152251180
Test: manual - bubbles trimmed on overflow
Test: manual - normal bubble removal still works fine
Change-Id: I19b8fa54f28ae6c959354f4a3a7f4d0e8ed70d44
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
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
Display was not turning off animated in some occasions, due to a
wrong variable being used.
Test: atest DozeScreenStateTest
Fixes: 152246123
Change-Id: I5e6f32566d74f67476018b01013fc177702311a7
- 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
am skip reason: Change-Id I2bc2008e49de5a66641ecdbd8e5354dfa647269d with SHA-1 c9afa38f97 is in history
Change-Id: I7a7b61af41419bd722b055af2e3b41f673c17992
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
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
This should resolve an issue with the network being cut from the
service after periods of inactivity
Bug: 152218915
Test: manual
Change-Id: Ife28c1de75959afab6ea969c14780cfd0de48b3b
- 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
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