The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
Add a note about the return values from logging function since it was
asked in b/228523679.
Bug: 228523679
Fix: 228841312
Test: m
Change-Id: I39a3cad4ba10c4602e58ec9e88c7864ead4b9d85
As documented in art/runtime/jni/jni_internal.cc, ART has deviated
from the RI by using a 4-byte encoding instead of the 3-byte encoding
required by the JNI specification.
Some users are okay with this 4-byte encoding (where they control
both the reading and writing logic) but other users require
compatibility with the DataOutput/DataInput API contract, so this
change lets users request either behavior.
This change now exercises all tests in both 4-byte and 3-byte modes,
and exhaustively confirms that all valid code-points match the
DataOutput/DataInput contract when in 3-byte mode.
Benchmark results still show significant performance benefits when
using this 3-byte encoding over the upstream RI:
timeRead_Upstream_mean (ns): 5090068
timeRead_LocalUsing3ByteSequences_mean (ns): 1996032
timeRead_LocalUsing4ByteSequences_mean (ns): 1813250
timeWrite_Upstream_mean (ns): 3856276
timeWrite_LocalUsing3ByteSequences_mean (ns): 1632697
timeWrite_LocalUsing4ByteSequences_mean (ns): 886503
Bug: 236923096
Test: atest FrameworksCoreTests:CharsetUtilsTest
Test: atest FrameworksCoreTests:FastDataTest
Test: atest FrameworksCoreTests:XmlTest
Test: atest FrameworksCoreTests:BinaryXmlTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:FastDataPerfTest
Change-Id: Ibddd36410a0d4a909522de011f23a337b53d6889
The DisplayManager.getStableDisplaySize is not the right way to get the
size we want for screen decorations and display team is going to get rid
of it.
Instead, we use the maximum display size supported by the display as the
base size to define the cutout and rounded corner configs.
Also fixed a bug that DisplayCutoutBaseView didn't update the
shoudDrawCutout config when display change.
Bug: 230227839
Test: 1. On foldable device, fold and unfold the device and check if the
cutout is correctly drawn.
2. On device supporting multiple resolutions, switch resolution
between FHD & QHD and check if the cutout is correctly drawn.
Test: atest LocalDisplayAdapterTest DisplayCutoutTest
ScreenDecorationsTest RoundedCornersTest
DisplayCutoutBaseViewTest
Change-Id: I7a602b5abd7d6a21d17eae4f8e99414eaf765fa5
Previously, a fixed size buffer was allocated each time a call to
`computeSha256DigestForLargeFile` was made. This causes
undesirable performance issues. This change allocates a buffer
per apex/module-update session instead.
To fix this, that method is amended to take in a buffer passed
in by the caller instead.
To aid in the usage of this API, a new method called
`createLargeFileBuffer` is introduced to help callers allocate
a pre-determined buffer size to be passed into the SHA
computation method based on whether the device is low RAM
device or not.
Subsequent RSS benchmarking shows that this helps to
significantly lower the RSS high watermark (HWM) for
the `system_server` process into just noise.
Bug: 229137737
Test: Manual
Change-Id: I6d2d17353f999bd6cfb937cd5ae6e6925f1353ac
UDFPS position and assets are configured in pixels in native
resolution. This CL adds a mechanism to detect a runtime resolution
change and scale the UDFPS coordinates accordingly.
Bug: 223342274
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: Iaa1f3d633b50019d06bdecb5063490ad6eb11272
In current desgin, the confgis for cutout and rounded corner are based
on the original display size. If the display resolution is overridden,
cutous and rounded corners will be drawn in incorrect places with
incorrect size.
We should load the cutout & rounded corners with the orignal display
size and then scale the results with the display ratio which is
calculated by dividing current size with original size.
Bug: 209592558
Test: manual:
1. Go Settings-> Display-> Screen Resolution
2. Switch between FHD+ and QHD+
3. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: manual:
1. adb shell wm size 1080x2340
2. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: atest DisplayCutoutTest LocalDisplayAdapterTest
ScreenDecorationsTest RoundedCornerResDelegateTest
Change-Id: Iea42b73c0276b82983c1ddbce9455355afdc164d
This reverts commit 2e06c6008e.
Reason for revert: fixing the boot time regression
Provides a read-only interface that is used by computer and snapshots.
It fixes the data conflicts when AppsFilter is changed while a snapshot is
taken.
Test: atest AppsFilterTest
Test: atest com.android.server.utils.WatcherTest
Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter
BUG: 218411030
Change-Id: I06624ea79ff85160488a6c7863213b0c44fe2154
Track pending estimated launch time changes in a single Set so that we
avoid sending repeat notifications for a single package.
Bug: 227796747
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest FrameworksCoreTests:android.util.SparseSetArrayTest
Test: atest FrameworksMockingServicesTests:PrefetchControllerTest
Test: atest FrameworksMockingServicesTests:UserUsageStatsServiceTest
Change-Id: I671c97e4e4110d0a1c76a8f6400dfe8c1e5055dc
Document a section of code that prevents an NTP-related CTS test working
if the device is not connected to Wifi. The reason the code exists took
a little bit of research, so here it is.
Bug: 213393821
Test: Comment-only change
Change-Id: I0b5d9f298ef36e861f780a29fdf74f0226fa1567
Provides a read-only interface that is used by computer and snapshots.
It fixes the data conflicts when AppsFilter is changed while a snapshot is
taken. This requires a watchable class for SparseSetArray.
Test: atest AppsFilterTest
Test: atest com.android.server.utils.WatcherTest
Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter
BUG: 218411030
Change-Id: Ib9d13537b6cec911b2a189aea828e9baec650585
* changes:
RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
RESTRICT AUTOMERGE move device policy resource APIs to a separate class
RESTRICT AUTOMERGE hide device policy resources constants
Add the ability to configure NTP port for tests via the command line and
the associated plumbing / knock-ons.
In-progress CTS tests will run a fake NTP server on the device itself.
Binding to NTP's default port of 123 is restricted. Therefore, we need
to be able to override the port for tests.
adb shell cmd network_time_update_service set_server_config --port 9999
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe false>
adb shell cmd network_time_update_service set_server_config
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe true>
Bug: 213393821
Test: See above
Change-Id: I21e8b735fab268df0d617848b8a562f86560ad16
Also adds unit tests for TimingsTraceAndSlog.
Test: atest FrameworksMockingCoreTests:TimingsTraceLogTest FrameworksMockingServicesTests:TimingsTraceAndSlogTest
Bug: 223642864
Change-Id: I3a2b259fca7c4fbab08bc4212d850fee3ac2f037
Also some minor wording changes.
Test: Rebuild apk
Bug: 219000314
Change-Id: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
Merged-In: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
Initial command-line interface for NetworkTimeUpdateService for use in
tests.
To be joined by more commands as they are identified.
Bug: 213393821
Test: adb shell cmd network_time_update_service help
Test: adb shell cmd network_time_update_service clear_time
&& adb shell dumpsys network_time_update_service
Test: adb shell cmd network_time_update_service force_refresh
&& adb shell dumpsys network_time_update_service
Change-Id: I033764a7df9759e9fd4da0b0776f6535a574ff59