Move most of the logic of the Settings' volume panel to a SystemUIDialog
to make the dialogs consistent with other system dialog.
Bug: 202262476
Test: manual build and launch the new dialog.
Change-Id: Ic27dcca77072dee2b78827e1eb58c28022b47265
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
- App language has already landed, so this flag can be removed.
Bug: b/209775925
Test: Maunal test passed.
Change-Id: Ie3a03ff5d86ab40b210dd26452133b81dbe595df
Merged-In: I6345bfb726234c1dd33dda02d87ca9868725c73c
- App language has already landed, so this flag can be removed.
Bug: b/209775925
Test: Maunal test passed.
Change-Id: I6345bfb726234c1dd33dda02d87ca9868725c73c
Bug b/214031645 has all IC reviews approved and the feature has been
merged and tested for more than 3 months. Hence removing the feature
flag.
Bug: 214031645
Test: SettingsTest, SystemUITests
Change-Id: I12b4d60ffc76c20e0964d8e222b13907009b0cd7
Merged-In: I12b4d60ffc76c20e0964d8e222b13907009b0cd7
Bug b/214031645 has all IC reviews approved and the feature has been
merged and tested for more than 3 months. Hence removing the feature
flag.
Bug: 214031645
Test: SettingsTest, SystemUITests
Change-Id: I12b4d60ffc76c20e0964d8e222b13907009b0cd7
Add NtpTrustedTime.forceRefresh(Network). If a component that uses
NtpTrustedTime is monitoring network connectivity, it should probably
provide the network to be used, otherwise there is a non-obvious
relationship between the network being monitored and the network
actually used.
Only one user of NtpTrustedTime is updated here as the other,
GnssLocationProvider / NtpTimeHelper, is going to be refactored in an
upcoming commit. Leaving it using the forceRefresh() method that doesn't
take a parameter is not a regression.
Bug: 222295093
Test: atest core/tests/coretests/src/android/util/NtpTrustedTimeTest
Test: Treehugger
Change-Id: I51db528d06359c33335c874aca524f5adee3f3a7
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
Add support for multiple NTP servers in NtpTrustedTime. The algorithm to
select the server is documented in comments in that class. Tests have
been updated accordingly.
This commit changes config.xml, removing (string) config_ntpServer and
replacing it with (string-array) config_ntpServers. It also modifies
command line and settings behavior.
Bug: 223365217
Test: atest frameworks/base/core/tests/coretests/src/android/util/NtpTrustedTimeTest.java
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/
Test: atest cts/tests/tests/os/src/android/os/cts/SystemClockSntpTest.java
Test: adb shell settings put global ntp_server "ntp://time.google.com\|ntp://time.android.com"
Test: Inspection: adb shell dumpsys network_time_update_service
Test: Inspection: adb shell dumpsys time_detector
Change-Id: I5e19a4d82c9771448940b9f1db1689f21508667b
Further refactoring to support adding multiple NTP servers in a later
commit. The logic for multiple servers will be added to forceRefresh()
later.
This commit also contains some refactoring to support improved testing
of NtpTrustedTime.forceRefresh(). Tests for the existing behavior have
been added here.
As part of this change, SntpClient / NtpTrustedTime /
NetworkTimeUpdateService have also been extended to pipe information
about the IP address of the NTP server used to obtain the time back to
the NetworkTimeUpdateService for improved logging / debugging support.
Bug: 223365217
Test: atest frameworks/base/core/tests/coretests/src/android/util/NtpTrustedTimeTest.java
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/
Test: atest cts/tests/tests/os/src/android/os/cts/SystemClockSntpTest.java
Test: Inspection: adb shell dumpsys network_time_update_service
Test: Inspection: adb shell dumpsys time_detector
Change-Id: Ia0f13e2c8cbd102d677797b745414d8ab5fa1eba
Refactoring changes to make it easier to support NTP configuration that
contains multiple NTP servers to try. As part of this change, the NTP
server configuration is being changed from a simple hostname to a URI in
the form ntp://<host>[:port]. This is a local scheme introduced for this
commit for this purpose and not (currently) an official, registered IANA
URI scheme.
Settings parsing in NtpTrustedTime retains support for the simple
hostname-only form to avoid introducing incompatibilities when devices
upgrade and have settings values from earlier releases. All other cases
(config.xml, commandline) are updated here to only support the new URI
form as these don't have backwards compatibility guarantees.
A later commit will add:
+ The settings / config changes to support a list of URIs in the format
introduced in this commit, i.e. in place of the single one supported
today.
+ The server request loop / server stickiness need to support multiple
servers.
Switching to a URI over a simpler encoding scheme means:
1) Not having to deal with parsing awkward host + port cases, like IPv6
addresses which contain colons, e.g. "[:::1]:1234" (these are used in
in our tests).
2) Opens up the possibility of future protocols like NTS via a different
URI scheme, and future parameterization of NTP server config with
query params, paths, or similar.
3) Easy delimiting of lists later using a whitespace character like
space, which will be encoded when part of a URI. This can be used for
extending settings parsing to support multiple, space-delimited
configs as settings code doesn't support multi-value settings out of
the box (unlike config / commandline cases, which are comparatively
easy).
This commit contains a new OWNERS file for NtpTrustedTimeTest. The file
has been populated with ownership information for TypedValueTest using
information from the OWNERS for the code under test.
Ignore-AOSP-First: The OWNERS change relates to a file landing
internally
Bug: 223365217
Test: atest frameworks/base/core/tests/coretests/src/android/util/NtpTrustedTimeTest.java
Test: atest cts/tests/tests/os/src/android/os/cts/SystemClockSntpTest.java
Change-Id: I3afbd04659b4e4ee336619ea5ac6db7588057d6e
Switch NetworkTimeUpdateService to using TimeDetectorInternal instead of
the binder API.
The NetworkTimeUpdateService runs in the system server, so it does not
have to use binder to communicate with the time_detector.
Also update NetworkTimeSuggestion to include uncertainty so that it
contains all the information needed for future usecases associated with
GnssLocationProvider.
Bug: 219693030
Bug: 222295093
Test: atest services/tests/servicestests/src/com/android/server/timedetector/
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Test: atest core/tests/coretests/src/android/app/timedetector/
Change-Id: I4665da76429bc333b34769fc362221581472690e
Move network time logic out of AlarmManagerService in preparation for
a future refactoring. The TimeDetectorService is now a better home for
functionality associated with time signals, as it should receive most
time signals from various sources so it can determine whether the
device's system clock needs to change.
Although the TimeDetectorService is not currently informed every time
the NtpTrustedTime obtains a new time, it should be in future after
further work in later commits.
This change modifies the logic in SystemClock to match the GNSS time
logic in the same class, i.e. rather than calculating the "current time"
in the system server and then sending it over binder (introducing a
delay), the latest information needed to compute the time is sent to the
client, which then calculates the current time.
Bug: 219693030
Bug: 222295093
Test: atest services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
Test: atest cts/tests/tests/os/src/android/os/cts/SystemClockSntpTest.java
Test: Treehugger
Change-Id: I80ea52877352122b52ac54daed8b092f3cc18e02
This flag will allow/restrict intent redirection to/from clone profile.
This is to ensure that framework is not impacted by intent redirection
till we are ready to launch.
The default is false, once ready to launch we would set it true and
eventually remove it.
The flag can be modified through Settings>System>Developer
options>Feature
flags>settings_allow_intent_redirection_for_clone_profile.
Bug: 236221777
Test: tested this by flashing the device along with intent redirection
code.
Design Document: go/intent-redirection-blue-doc
Change-Id: I98d57ef6ff3883b423ada7b3d567425720dc5665
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