Commit Graph

1972 Commits

Author SHA1 Message Date
Cole Faust
9b3a5fc03b Merge "Fix array-related errorprone warnings" am: a1eb8cf128 am: 44f8576073 am: 91d6c5b564 am: 6a79ae2567
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2186016

Change-Id: I7052a1f7391ed6701fe0e1036c27368609032e35
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 20:44:00 +00:00
Jenhou (Alan) Huang
154a6a50b7 Merge "[VolumePanel] Move the Settings' volume panel into a SystemUIDialog" into tm-qpr-dev am: 16219f2ea4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19482609

Change-Id: I51953caf99f845431d7ceeb7fd102aef308b2837
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 05:43:38 +00:00
Alan Huang
e03186af0e [VolumePanel] Move the Settings' volume panel into a SystemUIDialog
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
2022-08-29 18:59:51 +00:00
Tom Hsu
618192c7b8 Merge "[Panlingual] Removed the feature flag of per app language." into tm-qpr-dev am: f2826d867b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19726345

Change-Id: I314ed0eac14c991ad32c2d48a19fe1cb4464192d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-29 04:09:03 +00:00
Tom Hsu
f2826d867b Merge "[Panlingual] Removed the feature flag of per app language." into tm-qpr-dev 2022-08-29 03:46:51 +00:00
Kedar Chitnis
27b1ba203e Merge "Remove feature flag SETTINGS_GUEST_MODE_UX_CHANGES" into tm-qpr-dev am: 6d61300d40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638347

Change-Id: I4a7707a16cd4c50e585259bf68ee014998023a5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-27 04:48:27 +00:00
Cole Faust
584140c83a Fix array-related errorprone warnings
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
2022-08-25 10:57:12 -07:00
tom hsu
e2900a6db6 [Panlingual] Removed the feature flag of per app language.
- App language has already landed, so this flag can be removed.

Bug: b/209775925
Test: Maunal test passed.
Change-Id: Ie3a03ff5d86ab40b210dd26452133b81dbe595df
Merged-In: I6345bfb726234c1dd33dda02d87ca9868725c73c
2022-08-24 08:03:17 +00:00
Kedar Chitnis
ba69f26dae Remove feature flag SETTINGS_GUEST_MODE_UX_CHANGES
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
2022-08-22 02:39:16 +00:00
Yi-an Chen
89e8a943d8 Merge "Add PbA branding to clipboard" into tm-qpr-dev am: 2b04393a1d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19152769

Change-Id: I5e965626328b0d60f67ff43094f38e28304287c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-25 16:25:47 +00:00
Yi-an Chen
2b04393a1d Merge "Add PbA branding to clipboard" into tm-qpr-dev 2022-07-25 16:08:26 +00:00
Binyi Wu
c236b0570d Merge "Create a feature flag for Clear Calling" into tm-qpr-dev am: 9c04c0ada9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18911004

Change-Id: I61616829d188fc0092c3e63c479c96c9fd86db51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 00:49:40 +00:00
Orion Hodson
35f78d9913 Merge "Document return values from android.util.Log logging functions" am: 07166bf3b1 am: c822b157e9 am: 198722c9ab am: 935cd289fe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2158819

Change-Id: Iba586ab55fc89ee28eaea318c2d152c82f63bba5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 23:49:07 +00:00
Orion Hodson
c822b157e9 Merge "Document return values from android.util.Log logging functions" am: 07166bf3b1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2158819

Change-Id: Ia50d0d1945460168b0e8699e3142d17c573905bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 22:33:42 +00:00
Orion Hodson
07166bf3b1 Merge "Document return values from android.util.Log logging functions" 2022-07-21 13:49:30 +00:00
Orion Hodson
762723f190 Document return values from android.util.Log logging functions
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
2022-07-20 08:57:23 +01:00
Yi-an Chen
edfc44079c Add PbA branding to clipboard
Bug: 213357911

Test: Manually on Raven
Change-Id: If9944393fe64c7f94a5be139a538833d91ae98fe
2022-07-19 13:52:13 -07:00
Jeff Sharkey
ad18b6f58c Merge changes from topic "jul15" am: 0e27faa039 am: 954431c4df am: fd0915aeec am: 70123a912d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2155659

Change-Id: I6d5cc1577c71cf60fe16c62d5523cfb5c3a10468
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:20:04 +00:00
Jeff Sharkey
954431c4df Merge changes from topic "jul15" am: 0e27faa039
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2155659

Change-Id: Ie949e0bb40967581190f7b98bb5005bab19cb7fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 19:12:28 +00:00
Jeff Sharkey
c6b3699b63 Offer explicit 3-byte vs 4-byte modified UTF-8.
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
2022-07-19 10:36:37 -06:00
Your Name
16da9e4652 Create a feature flag for Clear Calling
Test: manual

Bug: 236074207
Change-Id: I53f682fa63a6614037e966b5d8cc724d420dc065
Merged-In: I53f682fa63a6614037e966b5d8cc724d420dc065
2022-07-19 13:13:56 +00:00
Shawn Lin
7c604236cc Merge "Replace DisplayManager.getStableDisplaySize with max Display.Mode" into tm-dev am: 15cb562bcd am: 02c07a76ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18485561

Change-Id: Ifab44e33ac17ab673954019236b74f1fe4bfa4e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 04:11:22 +00:00
Shawn Lin
0f7cc0128b Replace DisplayManager.getStableDisplaySize with max Display.Mode
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
2022-05-21 14:56:30 +00:00
TreeHugger Robot
f106d488b3 Merge "[SparseSetArray] optimize copy constructor" into tm-dev am: 79286a97fd am: d014ec92b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18415062

Change-Id: I4980b014251db3e48abcaab916a9adf8fd60e0da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:15:05 +00:00
Songchun Fan
c0ac1d37d5 [SparseSetArray] optimize copy constructor
BUG: 232347307
Test: atest android.util.SparseSetArrayTest
Change-Id: Ie046f557098ddc168b86523700cc06feede97e5e
2022-05-16 19:26:05 +00:00
TreeHugger Robot
f22ab3d69b Merge "[Panlingual] Add a flag to control opt-in/out" into tm-dev am: aaf912305b am: 4219739b2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18161842

Change-Id: If9a7264ad2373f9acb9e67cb7ef2ed20e516620b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:40:30 +00:00
tom hsu
94af43295c [Panlingual] Add a flag to control opt-in/out
Bug: 231396734
Test: local
Change-Id: Ia07ff3ce3202b5017533cca39418085c1e43882e
2022-05-04 15:00:06 +08:00
TreeHugger Robot
803cd793af Merge "Reuse a same buffer per session instead of reallocating each time." into tm-dev am: ccf6f21ad8 am: d5009ae598
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17946676

Change-Id: Ifb9098c2a1c45772ba2358d9fd53ffff5a619d6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:51:05 +00:00
Billy Lau
53abe6077d Reuse a same buffer per session instead of reallocating each time.
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
2022-04-29 15:27:50 -05:00
Ilya Matyukhin
c5cf864de3 Merge "Enable RRS (FHD<->QHD) support for UDFPS" into tm-dev am: 559244bd5e am: fa923feadb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17844871

Change-Id: Ie175e9d5065f6489a854cf94a4c4f556b777cb24
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 06:34:36 +00:00
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
Shawn Lin
5981e3255a Merge "Support scaled cutout & roundedcorners when resolution is overridden" into tm-dev am: 88ed5ca17a am: 6de716209c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17232290

Change-Id: Ia48552185059896889298a96f14963660a755771
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 18:38:13 +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
Kedar Chitnis
c60e7c4119 Guest mode updates to resolve privacy concerns in guest mode
- Add API in IUserManager to allow setting ephemeral user flag
- Implement and export this API in UserManagerService and UserManager
- Set guest as ephermal by default when createGuest in UserManager is called
- Handle guest user switching in UserSwitcherController for the case
  of dynamic change of ephemeral state
- Add persistant notification when in guest mode to indicate
  - if guest session is new or previously used.
  - if guest session will be cleared on exit or not
- Add buttons in persistant notification to reset or exit guest
- Add flags to enable/disable this feature

Bug: 214031645
Screenshots: go/ephemeral-guest-b-214031645-ux
Test: Manual test using sunfish, atest SystemUITests, atest SettingsRoboTests

Relands ag/16545010 after resolving post submit issues

Revert "Revert "Guest mode updates to resolve privacy concerns in guest mode""
This reverts commit dd5c440802.

Change-Id: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
Merged-In: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
2022-04-14 09:47:35 +00: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