Optimize is an important job for AppSearch to work properly.
It could collect garbage and release resources. Without it, the garbage
resource will last forever and the device's space will be fulled up by
zombie documents.
The algorithm to trigger optimize is:
1: Query garbage resource info after a batch of mutation operations.
2: Only trigger optimize if there are enough resource could be released.
The behavior exists in AppSearch Jetpack for a while and working properly
for our Jetpack dogfooders.
Bug: 175255572
Test: FrameworkOptimizeStrategyTest
Test: AppSearchConfigTest
Test: AppSearchImplTest
Change-Id: Ib7ae475cc035d1b69969df1e22ac409895e0e3fa
The inProgress/paused inProgress arraymaps should be null when empty.
However, if they are not, the code should handle this gracefully.
Test: presubmit
Fixes: 191392370
Change-Id: I7cddd5ff5452611cb067b1c77ea85dd534b360da
Lone calls to System.gc() generally don't do anything.
Runtime.getRuntime().gc() would force a GC, but it would be ineffective
without waiting for reference processing and finalization to complete.
Adding the runFinalization() call implicitly makes the preceding GC call
effective.
Bug: 183912710
Test: Treehugger
Change-Id: I0f4806b8e3f9ca898eb7ea1b1c8de14aa94e2646
Merged-In: I0f4806b8e3f9ca898eb7ea1b1c8de14aa94e2646
Bug: 193176503
This reverts commit 99ebd95ef1.
Reason for revert: Recent flakiness as mentioned in b/193176503.This cl was merged in build:7532561. Any test failures post this build shows exception linked to CameraMetadataNative.Reverting this cl to find and fix the issue.
Change-Id: If9fe3ce69f013b842a47745d976942aa71dfb8f6
Using BrightnessSynchronizer introduced an epsilon value in the
comparison. This meant it was possible for brightness changes to never
reach min or max if they were made in sufficiently small steps. Given:
1) The need to reach both min and max brightnesses.
2) The increased resolution of brightness controls on devices.
3) The desire to make the framework as independent as possible of
brightness resolution.
we no longer allow for an epsilon delta.
Fixes: 191935286
Test: manual
Change-Id: Ie4872fa81aa6f23799cd6b4dfdbfd2a61ec6ce7a
1. Only allow HDR if HDR takes up more than 50% of the screen.
2. Scale normal brightness range to HDR levels. To do this, we now keep
the normal brightness range when HDR is enabled and scale the brightness
value to the higher HBM range. This allows HDR to scale as it did
previous as well as function as expected when automatic-brightness is
off.
3. Add more logging to HBMController dumpsys.
Bug: 187804126
Bug: 188479946
Bug: 189384189
Test: atest com.android.server.display
Change-Id: I515a9ee7ca16bcf8070b1cdab09943b68f038949
The ongoing external vibration should be muted via
IExternalVibrationController and the service should not
set external control on the vibrator more than once.
Fix service to mute ongoing external vibration at the time it's
cancelled and to skip calls to setExternalControl when it's already set.
Fix: 193127756
Test: VibratorManagerServiceTest
Change-Id: If61f5fd2c41dc6d15655d9ce537c858caaf530c6
With this change, a long screen shot flow generates only
the following log entries:
D Screenshot: ScrollCapture: connected to window [com.example/.ExampleActivity]
D Screenshot: onCaptureStarted
D Screenshot: end()
I Screenshot: Completed: LongScreenshot{w=1080, h=5339}
Tags covered:
LongScreenshotActivity
Screenshot
ScrollCaptureConnection
ScrollCaptureInternal
ScrollCaptureViewSupport
ScrollCaptureController
ViewRenderer
Bug: 190399332
Test: observe logcat during long screenshot
Change-Id: Ia2b018224897ad1ca153967ff9f60340a64f4815