Commit Graph

1940 Commits

Author SHA1 Message Date
Ilya Matyukhin
84438ca22b Enable RRS (FHD<->QHD) support for UDFPS
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
2022-04-20 21:15:14 +00:00
shawnlin
bcea9fd89e Support scaled cutout & roundedcorners when resolution is overridden
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
2022-04-20 10:03:19 +08:00
TreeHugger Robot
e9145245f5 Merge "Consolidate launch time change notifications." into tm-dev 2022-04-08 00:16:38 +00:00
Songchun Fan
6346fb8aa2 Merge "Revert "Revert "[AppsFilter] read-only interface for snapshots""" into tm-dev 2022-04-07 15:25:07 +00:00
Vania Desmonda
ec4b72b700 Enable feature flag to show "Turns on at bedtime" as a Schedule in Dark theme Settings page.
Bug: 218629025
Test: manual
Change-Id: I718c68f77f10015133e8b7a58ae3831ccf096ded
2022-04-07 10:50:25 +00:00
Songchun Fan
3def2802db Revert "Revert "[AppsFilter] read-only interface for snapshots""
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
2022-04-06 20:53:31 +00:00
Kweku Adams
09c0ede3bf Consolidate launch time change notifications.
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
2022-04-06 15:24:34 +00:00
Neil Fuller
a15a25cb0e Merge "Document a section of code" am: 7c37904142 am: 5859be6c51 am: 09eb6c1a4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2055047

Change-Id: Iee7b4a1a288e161a46be7e7a5b52fc318f4e868c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 16:29:18 +00:00
Neil Fuller
5859be6c51 Merge "Document a section of code" am: 7c37904142
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2055047

Change-Id: I9b8c0c90ba6877fa509e82d502cdf660fa4020d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 15:55:20 +00:00
Neil Fuller
eab42d9fe0 Document a section of code
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
2022-04-05 11:50:38 +01:00
Songchun Fan
2e06c6008e Revert "[AppsFilter] read-only interface for snapshots"
This reverts commit 8cb3e6aac9.

Reason for revert: boot time regression

Change-Id: I5e6dc8e80d33256cf7dd8c0d5f1415373fba9048
2022-03-31 23:02:21 +00:00
Songchun Fan
8cb3e6aac9 [AppsFilter] read-only interface for snapshots
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
2022-03-28 23:57:08 +00:00
Kholoud Mohamed
a8e9aa390d Merge changes from topic "apiFeedback" into tm-dev
* 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
2022-03-19 06:30:43 +00:00
kholoud mohamed
b7aedc6f3d RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
2022-03-19 00:22:17 +00:00
Neil Fuller
ad7b8429d0 Merge "Add the ability to configure NTP port for tests" am: 72e04a7dc2 am: 53d21a8591 am: 0fa758c3b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030083

Change-Id: Ib22fde6cf8bfba028d286647b10b1d2885d78c9d
2022-03-18 12:49:40 +00:00
Neil Fuller
0fa758c3b8 Merge "Add the ability to configure NTP port for tests" am: 72e04a7dc2 am: 53d21a8591
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030083

Change-Id: Ia24fc0a73f74756a8b764961f5ac6023f478f327
2022-03-18 12:28:29 +00:00
Neil Fuller
72e04a7dc2 Merge "Add the ability to configure NTP port for tests" 2022-03-18 11:48:29 +00:00
Felipe Leme
0369e491d5 Merge changes from topic "presubmit-am-67f791696fed41829026111e0282dce4" into sc-v2-dev-plus-aosp am: 88bf26bf37
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17144854

Change-Id: I4a1089ed2fde054b5879bfc1ace06f4cfa719544
2022-03-17 15:24:28 +00:00
Neil Fuller
187c975af9 Add the ability to configure NTP port for tests
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
2022-03-17 11:36:19 +00:00
Tom Hsu
e81d58ebb1 Merge "Revert "[Panlingual] Turn off switch flag for BETA1"" into tm-dev 2022-03-16 02:36:29 +00:00
Tom Hsu
7a489fc6fc Revert "[Panlingual] Turn off switch flag for BETA1"
This reverts commit 1dbedd57ba.

Reason for revert: turn on it back for Dogfood user

Change-Id: Ia95824d51d13efc4a1d8d7884ab6408850ed0dec
2022-03-15 03:38:05 +00:00
Tom Hsu
8ff9100be6 Merge "[Panlingual] Turn off switch flag for BETA1" into tm-dev 2022-03-10 07:22:58 +00:00
tom hsu
1dbedd57ba [Panlingual] Turn off switch flag for BETA1
Bug: 223726519
Test: make
Change-Id: I6d426032bb0163d9467a8ece2ff77d0318423769
2022-03-10 06:05:23 +00:00
Presubmit Automerger Backend
6b38ba998e [automerge] Changes TimingsTraceLog and TimingsTraceAndSlog to be less spammy. 2p: bd3271d162
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17144854

Bug: 223642864
Change-Id: I7362998367d1a3b052eec3242eb51bff2106d421
2022-03-10 03:16:01 +00:00
Felipe Leme
bd3271d162 Changes TimingsTraceLog and TimingsTraceAndSlog to be less spammy.
Also adds unit tests for TimingsTraceAndSlog.

Test: atest FrameworksMockingCoreTests:TimingsTraceLogTest FrameworksMockingServicesTests:TimingsTraceAndSlogTest

Bug: 223642864

Change-Id: I3a2b259fca7c4fbab08bc4212d850fee3ac2f037
2022-03-09 19:15:01 -08:00
Tsung-Mao Fang
cf700d9e1f Rename back button to navigate up button
Also some minor wording changes.

Test: Rebuild apk
Bug: 219000314
Change-Id: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
Merged-In: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
2022-03-07 08:47:17 +00:00
Neil Fuller
e11b563c88 Merge "Make NTP config configurable from cmd" am: 271dfbe8df am: 5c576e6d48 am: 24753d5b6f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2007272

Change-Id: I0c4861e06ad9d91a8d5c2722cec442d391453464
2022-03-04 12:49:55 +00:00
Neil Fuller
24753d5b6f Merge "Make NTP config configurable from cmd" am: 271dfbe8df am: 5c576e6d48
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2007272

Change-Id: I84439877d8ade20e17f92acd1fb70034ca69da34
2022-03-04 12:30:16 +00:00
Neil Fuller
5c576e6d48 Merge "Make NTP config configurable from cmd" am: 271dfbe8df
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2007272

Change-Id: If16a743fc61890fd9e64856edc3bd8ccc9a4dd46
2022-03-04 12:08:06 +00:00
Neil Fuller
030a692189 Make NTP config configurable from cmd
Enable NTP failure / timeout testing by providing an ability for testers
to change the NTP configuration. Also improve debugging information from
dumpsys and logs.

Testing:

adb shell cmd network_time_update_service set_server_config --hostname localhost
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false>

adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service set_server_config --hostname localhost --timeout_millis 1000
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false, but faster>

adb shell cmd network_time_update_service set_server_config --hostname localhost --timeout_millis 10000
adb shell dumpsys network_time_update_service
adb shell cmd network_time_update_service force_refresh
<observe false, but slower>

adb shell cmd network_time_update_service set_server_config
adb shell cmd network_time_update_service force_refresh
<observe true>

Bug: 213393821
Test: See above
Change-Id: Ic66c7fabe0b42a3d5c86f8b85f17096bf64a8209
2022-03-03 15:40:33 +00:00
Neil Fuller
624a892191 Merge "Command-line interface: NetworkTimeUpdateService" am: 8ac370e63f am: 7b559562f7 am: f12a783920
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2002571

Change-Id: I4c7d0a18bece446ccc828acfd3e70d91d74e902e
2022-03-02 14:35:26 +00:00
Neil Fuller
f12a783920 Merge "Command-line interface: NetworkTimeUpdateService" am: 8ac370e63f am: 7b559562f7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2002571

Change-Id: Ia2389b5e2018bc27a19e4a8bc057baaa37e544fe
2022-03-02 14:11:14 +00:00
Neil Fuller
7b559562f7 Merge "Command-line interface: NetworkTimeUpdateService" am: 8ac370e63f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2002571

Change-Id: I1cb528ea3740f8ac54a30f79c4b9aeb7abb6b229
2022-03-02 13:51:11 +00:00
Jason Chiu
924c4c438b Enable Settings Search surfacing full screen for large screen
Test: visual
Bug: 205079744
Change-Id: Ib5b9eb9728a8687255e227659c74e66cda6a9b90
2022-03-02 14:29:00 +08:00
Neil Fuller
b368bac149 Command-line interface: NetworkTimeUpdateService
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
2022-03-01 10:34:36 +00:00
Kanyinsola Fapohunda
4960c2be52 Merge "Add local logs to NetworkTimeUpdateService" am: 6bda795c2b am: 7e16f6e837 am: 3a94d5049b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1998851

Change-Id: I74ac017765d15984c0fa44744f23d5f541ccc1f2
2022-02-28 21:21:30 +00:00
Kanyinsola Fapohunda
3a94d5049b Merge "Add local logs to NetworkTimeUpdateService" am: 6bda795c2b am: 7e16f6e837
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1998851

Change-Id: I2b8f1b52565e59e87ba383a6cbf6f35257c8e10b
2022-02-28 13:11:15 +00:00
Kanyinsola Fapohunda
7e16f6e837 Merge "Add local logs to NetworkTimeUpdateService" am: 6bda795c2b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1998851

Change-Id: Iab9e06ca91d50bc156463fe11019c76950738173
2022-02-28 12:58:21 +00:00
Kanyinsola
faedb36fb7 Add local logs to NetworkTimeUpdateService
Bug: b/217357882
Test: Changes adds local logs. Existing unit tests still pass.
Change-Id: I2876a479c5219b6e4af6dfe25ba0942d82115ca5
2022-02-25 13:47:20 +00:00
Felipe Leme
6192421511 Improves DumpableContainer javadoc.
Test: n/a
Fixes: 220889663

Change-Id: I0d2fbd623d00ca44b5b2a84b7c6cc3b89edd4d63
2022-02-22 19:55:47 +00:00
Billy Lau
74b4af53ca Fix potential OOM issues when APEXs are too large.
On low RAM devices, there can be potentially OOM issues when
APEXs are too large, causing large buffers to be allocated when
computing the SHA256 digest of those APEX packages.

This change introduces the usage of DigestInputStream with
different buffer sizes according to the state of device (whether
it is a low ram device or not) to cap the memory usage.

Buffer size is currently derived experimentally at either 1kB or
1MB.

Bug: 217596264
Test: Manual.
Change-Id: I1964ef9d7047496a758c7f427910f116be89fc51
2022-02-16 14:16:19 -08:00
TreeHugger Robot
c212c6293b Merge "Create a feature flag for large screen design" 2022-02-15 09:27:57 +00:00
Xin Li
a6a261b1be Merge "Merge sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-14 17:30:12 +00:00
Neil Fuller
91d5781980 Merge "Switch "UTC time" to "Unix epoch time" (core)" 2022-02-14 17:21:43 +00:00
Treehugger Robot
26b0f4c136 Merge "Add OWNERS entries for Android time team" am: 5ec4a12947 am: 2187630b81 am: 232508395e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1984967

Change-Id: I24197111d353a36b7c9150e303a0c17610201e0d
2022-02-14 15:53:14 +00:00
Treehugger Robot
232508395e Merge "Add OWNERS entries for Android time team" am: 5ec4a12947 am: 2187630b81
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1984967

Change-Id: I66ca05bc759163ee12a10b2adad67f7b5300008b
2022-02-14 15:36:47 +00:00
Neil Fuller
e41149620d Add OWNERS entries for Android time team
Add entries for the files that the Android time team have to update
occasionally.

Bug: 218802673
Test: None
Change-Id: I1255ac04e91c37051bdf4f72acea5cae4aca99db
2022-02-14 10:17:34 +00:00
tom hsu
e3027052d1 [Pnalingual] Default open for panlingual
- Make UI show on the settings by default.
 - Remove icon of system language entry.

Bug: 219384592
Test: local
Change-Id: I0d6dff0461d3e8c5cdfe1329cdd6592dd053ea43
2022-02-14 12:22:38 +08:00
Neil Fuller
5990bc702c Switch "UTC time" to "Unix epoch time" (core)
This is more correct. Android devices, even under ideal conditions,
don't track UTC (which contains leap seconds and uses the SI definition
of a second) but use a clock based on Unix epoch time (no leap seconds,
but clocks may skip/stop or smear around leap seconds to ensure a fixed
number of second increments per calendar day when leap seconds are
applied to UTC).

Bug: 218802673
Test: Compile only
Change-Id: I0c557e2231f87ea1b99e3935f79af15bccf91da4
2022-02-11 13:22:05 +00:00
Tsung-Mao Fang
f7a3f3540e Create a feature flag for large screen design
In Android T - large screen device, we're going to hide the back button for
all secondary layer pages in the Settings app.

Bug: 219000314
Test: See flag in developer page.
Change-Id: I8a8151cd4a534bc1707e1dd19398acf9a2b5fe9d
2022-02-11 20:44:56 +08:00