The recently added TextUtils.formatSimple() can efficiently format
simple strings, roughly 6.5x faster than using String.format().
This change starts using this new method in hot codepaths identified
from pprof traces, and this CL alone should reduce system_process CPU
usage by 0.24%. Linked bug has detailed pprof screenshots.
Bug: 170978902
Test: atest FrameworksCoreTests:android.text.TextUtilsTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ie5a21a24be6dfcdb29768fe235e20f050fc111c7
Expose the onEmergencyNumberListChanged method, which seems to have been
left hidden inadvertently when introduced.
Add a new version of onOutgoingEmergencyCall that supplies a
subscription ID and deprecate the old one. Along with this, send
emergency call events from any subscription to all listeners regardless
of which subscription the listener specified.
Test: atest CtsTelecomTestCases:OutgoingCallTest
Bug: 162647577
bug: 165660452
Change-Id: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
Merged-In: Ia0e10bfb3376ff82d03a6dbc4bf71c22b0ace366
This reverts commit 69475be847.
Also reverts commit Iaf8e2c075f188df95c68824b71362629c6adabfc.
Reason for revert: Trying again but will submit with new tests
BUG: 165841645
Test: atest NexusLauncherOutOfProcTests
Test: atest LauncherAppsSingleUserTest
Test: atest LauncherAppsMultiUserTest
Test: atest LauncherAppsProfileTest
Test: atest LimitAppIconHidingTest
Change-Id: I5ed5871ccddefbd922b3aa3ee4c1ad53cc0bfa9b
* changes:
Apply fixes for EfficientStrings.
Apply fixes for EfficientStrings.
Apply fixes for EfficientStringsChecker.
Apply fixes for EfficientCollections.
Trivial refactor for consistent naming.
Expand formatSimple() to support widths.
Refinement of EfficientStringsChecker.
Also adds support for 'inverted' icons.
Test: atest SystemUITests
Test: manual testing of numerous notification configurations
Change-Id: I6fd9aeec9f5971495d514add2bbb30b50db7d3c1
Introduce a new class SurroundingText and a new API in InputConnection
to support retrieving surrounding text as an atomic request.
SurroundingText is the class for wrapping the text and sggestion info.
InputConnection#getSurroudingText() will return an SurroudingText object
if the protocol is supported.
Test: atest FrameworksCoreTests:SurroundingTextTest
Test: atest CtsInputMethodTestCases:BaseInputConnectionTest
BUG: 167947745
Change-Id: I2eb9ef5ba61a0e033007089da80f81548108621e
Refactoring to avoid paying the cost of extra StringBuilder that are
quickly disposed.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Icd914a63cdadf8123c1e5a5073f85245f0791f0b
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.
Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
Drop-in replacements suggested for inefficient collections. Also
annotate a handful of places where we're unable to update.
Bug: 155703208
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I48b600508df8160ac9b40fea7afca974b2c972f6
This dependency is fictitious: hidl manager actually contains a static
copy of hidl base for convenience. Separate libraries were created
later (e.g. android.hidl.manager-java-shallow) in order for users of
these libraries to specify the exact deps they need.
Fixes: 170710203
Test: boot and check logs
:) adb logcat | grep android.hidl.manager-V1.0-java.jar
10-21 00:42:53.173 328 328 D ApplicationLoaders: Created zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
10-21 00:43:17.322 329 329 D ApplicationLoaders: Created zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
10-21 00:43:31.920 2250 2250 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
10-21 00:43:38.884 2847 2847 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
10-21 00:43:41.010 2923 2923 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
10-21 00:43:42.146 3044 3044 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.hidl.manager-V1.0-java.jar
Change-Id: I024a1b16570bdceb7bef5b2e718c65155c675b4a
* changes:
Use WindowContext in GlobalScreenshot
scrollCapture: Avoid crash if host window doesn't exist
Refactor names of internal scrollcapture interfaces
Decrease the frequency with which BatteryStats collection is done
due to wakelocks in order to decrease the total CPU time used by
BatteryStats collection.
Bug 168254386
Test: local build + boot
Change-Id: I508bbc10b1f3891252f0618b457b1fc0e653c868
Renames to better align with use and existing naming patterns.
Using 'connection' to avoid confusion as to control flow or
roles. (A connection is direct from SystemUI --> App process)
IScrollCaptureClient -> IScrollCaptureConnection
IScrollCaptureController -> IScrollCaptureCallbacks
Test: atest FrameworksCoreTests:ScrollCaptureConnectionTest \
FrameworksCoreTests:ScrollCaptureTargetResolverTest \
ScrollCaptureTest
Change-Id: I9afd33109f6718b61d172ce3e4b3bb5d71a2897e