Commit Graph

21656 Commits

Author SHA1 Message Date
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
TreeHugger Robot
09ff886960 Merge "Workaround to dump error log instead of exception" into sc-v2-dev am: 0eeab2b04d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16489361

Change-Id: I110dce293d0dae9088b9ba3826d0a3421bb50beb
2021-12-17 16:19:27 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
Hui Wu
27399689e6 Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d am: 8c7f2f8695
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: I6727e0357235c69d2c5a75c69081a3699167f1d2
2021-12-16 21:08:01 +00:00
Hui Wu
8c7f2f8695 Merge "Adding owners in cloudsearch packages" am: d628edb425 am: f921b4b76d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925161

Change-Id: I60c619f8c1275b22e069aa256b1569c1efe9eebe
2021-12-16 20:44:09 +00:00
Hui Wu
d628edb425 Merge "Adding owners in cloudsearch packages" 2021-12-16 19:33:49 +00:00
Chilun
77ed8e5724 Workaround to dump error log instead of exception
This is a short-term workaround to dump error log instead of throwing
the exception to unblock the test.

Bug: 209744518
Test: build pass
Change-Id: I2ece3b9d85edc1ae43038e6f69b35f59b160a3dd
(cherry picked from commit f8fc1326f7)
2021-12-16 16:04:29 +00:00
Junyu Lai
2d6a82665f Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232 am: a562604531
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: I28b1bb91331bec61fcf54f84ece296e7ff1746d7
2021-12-16 11:32:19 +00:00
Junyu Lai
a562604531 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" am: 7fee9dd710 am: c270bbf232
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878043

Change-Id: I8d973c5e74e72621b4083b7389c5c5ca6f37de60
2021-12-16 11:17:15 +00:00
Junyu Lai
7fee9dd710 Merge "[MS03] Remove ServiceNotFoundException hidden API usage" 2021-12-16 10:42:15 +00:00
Hui Wu
fa11d35357 Adding owners in cloudsearch packages
Bug: 210528288
Test: not needed as this is a meta file change
Change-Id: I6bbf9f350639ed53edb1643c937c8c55702ff254
2021-12-16 00:03:19 +00:00
Jeff DeCew
4ec4414a08 Fix expanded fully custom view showing wrong chevron state am: 3b3e39f627
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16445238

Change-Id: Idbbbb6a66a2d3a30e73f81c6c48cea072d82b94f
2021-12-13 18:16:31 +00:00
Treehugger Robot
208d820e96 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da am: 2755887938
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I7605f8332f30f88036be92af0fcb7aa986a7dfb8
2021-12-13 16:07:03 +00:00
Treehugger Robot
2755887938 Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964 am: f9ed5725da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I70d0ad84b306d15e890cca70ac31eb711ebba198
2021-12-13 15:52:37 +00:00
Jeff DeCew
3b3e39f627 Fix expanded fully custom view showing wrong chevron state
Fixes: 206045893
Test: post fully custom notification from Notify2-SC and check expanded chevron
Change-Id: I97db4f9a5cb207d03d1370fa267f630f355c1bf4
2021-12-13 15:30:33 +00:00
Treehugger Robot
f9ed5725da Merge "Register NSD service from ConnectivityFrameworkInitializerTiramisu" am: 6a8b9f3964
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1899035

Change-Id: I658096512da1c4eaa6b60691f6f226b86adb44fe
2021-12-13 15:29:43 +00:00
Riddle Hsu
b6a1d36a9a Reduce cost of WindowTokenClient config change am: 778c95ce7c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16439833

Change-Id: I61df558230334d1fb9279c69ac91a106f3daec25
2021-12-13 13:29:17 +00:00
Riddle Hsu
778c95ce7c Reduce cost of WindowTokenClient config change
The SizeConfigurationBuckets was used to avoid activity relaunch
by insignificant configuration change. Because WindowTokenClient
doesn't have relaunch operation, it is unnecessary to use it.
Especially Resources#getSizeConfigurations() is a heavy invocation,
which may create hundreds of temporal Configuration when calling it
in system server.

Also fix leakage of SystemUiContext if it is detached, e.g. the
associated display is removed.

Bug: 207620458
Test: atest WindowContextControllerTest
Change-Id: I8388a2ab25f3deed2e29eb5636c4b2130f4f1b87
2021-12-13 18:52:54 +08:00
paulhu
474a8aaffc Register NSD service from ConnectivityFrameworkInitializerTiramisu
INsdManager is going to move into connectivity mainline module
and it will be not visible to SystemServiceRegistry after
migration done. Thus, use ConnectivityFrameworkInitializerTiramisu
to register NSD service instead.

ConnectivityFrameworkInitializerTiramisu will be implemented in
the framework-connectivity-tiramisu bootclasspath JAR, which need
to be separated from the S+ framework-connectivity bootclasspath
JAR to be only loaded by the module on T+. So its methods cannot
be in the same class as ConnectivityFrameworkInitializer.

Bug: 206702844
Test: atest FrameworksNetTests CtsNetTestCases
Merged-In: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
Change-Id: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
2021-12-13 15:33:03 +08:00
Junyu Lai
9d08a3ff2a [MS03] Remove ServiceNotFoundException hidden API usage
Since ServiceNotFoundException is not a system API. Remove
the unsupported interface which uses this exception.
This is safe since the method annotated with maxTargetSdk = R
and from dashboard it is not using by anybody.

Test: TH
Bug: 204830222
Change-Id: Ib8c0ce7b165732d24929851792d35371b90a5dfc
2021-12-13 06:26:07 +00:00
Treehugger Robot
4e59f54c9e Merge changes from topic "ms07-movestats" am: 942c713c9d am: 6d0a6803c9 am: f626e66561
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: I05affe3c40f5d41e5c6e0bdab8f6d0581c90209e
2021-12-10 19:35:43 +00:00
Treehugger Robot
f626e66561 Merge changes from topic "ms07-movestats" am: 942c713c9d am: 6d0a6803c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: Ieac82283e7f0a3cfdaceaff44bdabb3b21587c03
2021-12-10 19:20:32 +00:00
Treehugger Robot
6d0a6803c9 Merge changes from topic "ms07-movestats" am: 942c713c9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1895044

Change-Id: I85d704b09dac07e91b8400a2bbd15867e2b80d6d
2021-12-10 18:57:08 +00:00
Junyu Lai
d82296cf33 [MS08] Move NetworkStats files to f/b/package/ConnectivityT
NetworkStatsService is going to be moved into ConnectivityService
module. Move all related files to packages/ConnectivityT so that
it can be easily migrate these files to connectivity module
after clearing the hidden API usages.

Bug: 197717846
Test: TH
Change-Id: Iead00832b5eb7b1dc40a92027c5a14ae8316b16c
2021-12-10 16:11:08 +00:00
Riddle Hsu
36a3e25ada Merge "Reduce unnecessary overhead of SystemUiContext" into sc-v2-dev am: 7b7568a112
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16426618

Change-Id: Ie3ff5a436caa8e6512382cee237f14795d4bc8ce
2021-12-10 03:18:41 +00:00
Riddle Hsu
45e4bcf994 Reduce unnecessary overhead of SystemUiContext
- Do not report change when initializing DisplayContent
  (DisplayContent#isReady() is false).
  This reduces boot time by dozen of milliseconds
  (RootWindowContainer#setWindowManager).
- Only create SystemUiContext if needed. Most of processes don't
  use it. This reduces many registrations (e.g. according to the
  number of processes, it maybe from ~60 to ~10), which involve
  binder/listener creation/invocation, especially the extra cost
  of dispatching configuration to the context which no one uses.
- Store token as IWindowToken to avoid object creation every time
  by asInterface.

Bug: 207620458
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Change-Id: I867e9f81116796c42048195406d74feccf4772d3
2021-12-09 16:51:28 +08:00
Wu Ahan
21df742dd4 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 51b874f628 am: f374966fd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375906

Change-Id: I6d9e94362504d6c8cf58c66c6729a19b28d5cead
2021-12-09 02:01:15 +00:00
Wu Ahan
f374966fd9 DO NOT MERGE: Decode the input of both setStream and setResource calls first am: 51b874f628
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375906

Change-Id: I181af4dcc8c850c9f610736e8fb0fab0f60b6012
2021-12-09 01:45:15 +00:00
Wei Sheng Shih
356f80679e Merge "Provide default splash screen style for Launcher and SystemUI." into sc-v2-dev am: 611d320a39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16338744

Change-Id: I238f0b674486f75dce539047b671c0e827289168
2021-12-08 04:01:07 +00:00
Wei Sheng Shih
611d320a39 Merge "Provide default splash screen style for Launcher and SystemUI." into sc-v2-dev 2021-12-08 03:55:35 +00:00
Wu Ahan
360a31df34 Merge "Decode the input of both setStream and setResource calls first" into sc-v2-dev am: c262621e01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16375868

Change-Id: I416db0a66902af55c3086b44f1366c07d6c3f4bf
2021-12-07 03:17:04 +00:00
Wu Ahan
51b874f628 DO NOT MERGE: Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 03:11:47 +00:00
Wu Ahan
f6a946bbcd Decode the input of both setStream and setResource calls first
The size of the input of both setStream and setResource may very big
that system server got oom while handling it, so we try to decode it
first before copying it to the wallpaper path, if the decoding fails, we
treat the input as an invalid input.

Bug: 204087139
Test: Manually set wallpaper, no PDoS observed.
Change-Id: I014cf461954992782b3dfa0dde67c98a572cc770
2021-12-06 02:51:18 +00:00
TreeHugger Robot
5330e7f8e4 Merge "Properly remove local color areas of callback" into sc-v2-dev am: eb57e090bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16332363

Change-Id: Ic1d9afedbb9b6dbfa85aa8671e7995b09bf3daf9
2021-12-01 22:08:49 +00:00
Jay Aliomer
2eaae4e670 Properly remove local color areas of callback
Refactored to system server to the repository pattern
added locks to the WallpaperManager

Fixes: 206632865
Test: manual
Change-Id: Icc73c18e34042ae48e338b03dc3e94fee5d6939d
2021-12-01 19:25:38 +00:00
Jordan Demeulenaere
9797237337 Refactor DialogLaunchAnimator and remove host dialog (1/2) am: c424d4801f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16346347

Change-Id: I2939d13b5d59405b2dcd45e5eac0ff936bfe1446
2021-12-01 13:43:40 +00:00
Jordan Demeulenaere
c424d4801f Refactor DialogLaunchAnimator and remove host dialog (1/2)
This CL is a refactoring of the DialogLaunchAnimator and a major change
in how it works internally.

Before this CL, when DialogLaunchAnimator.show(originalDialog, ...) was
called, it would create a fullscreen dialog (called hostDialog) to
which we would add the content view stolen from the originalDialog (that
would then be hidden). We would then run the launch animation in the
host dialog and listen for show(), hide() or dismiss() calls to the
originalDialog to know when we should show(), hide() or dismiss() the
hostDialog.

The main reason we did that was because there was no way to override the
dismiss() behavior of the originalDialog, which we need to do given that
we want to animate the dialog into the view that showed the dialog
before actually dismissing it.

This approach had multiple downsides:
 - We were showing the dialog content view inside a different window
   than the one in which it was created, therefore any change made to or
   any listener added to the originalDialog window was lost.
 - Code calling DialogLaunchAnimator.showFromView needed to know that
   their dialog content will be moved to another window, which is
   unexpected and can lead to subtle bugs.
 - We were waiting for 2 dialogs to be shown instead of 1 before being
   able to start the animation.

This CL does what we should have done since the beginning: it adds a
hidden API to Dialog so that we can override what happens when
Dialog.dismiss() is called. This allows the DialogLaunchAnimator to run
the exit animation into the view that triggered the dialog before
actually dismissing it. The only modification that
DialogLaunchAnimator.show(originalDialog, ...) now does to the
originalDialog is making its window fullscreen and inserting two views
between the originalDialog DecorView and its children. The first
inserted view is a fullscreen transparent background used to dismiss the
dialog when the user taps outside the dialog content. The second
inserted view is a View that we size and position the same way that the
DecorView was before we made it fullscreen, and to which we set the
originalDialog background. This view now serves as a "fake window" with
the same size, background and position as the original window
(DecorView).

This CL improves the time to start the launch animation by 20-25%
(measured in a totally unrigorous logcat way).

Bug: 193634619
Test: atest DialogLaunchAnimatorTest
Change-Id: If09eda7b06e83b3ed7714cec97afef08b3d9fd3e
2021-12-01 10:53:23 +01:00
wilsonshih
44f5e52d53 Provide default splash screen style for Launcher and SystemUI.
Previous the splash screen style can either be EMPTY or ICON, and need
to be set by new hidden API #setSplashscreenStyle, so the flag will
always be "EMPTY" for those 3rd party Launcher Apps which may have not
upgrade to targetSDK 31.
To correct the default behaivor for Launcher Apps, create a new
UNDEFINED style as default value for splashScreenStyle, and if the
value is UNDEFINED, determine the style by checking the launch source.

Test: Verify no change when default home is NexusLauncher.
Test: Set 3rd-party Launcher as default home, verify the splash screen
style should be ICON when launch app from Launcher.
Test: atest SplashscreenTests
Bug: 206746601

Change-Id: I105e2fcfc7a6ee8de7f442931cbeb4b6e517850d
Merged-In: I105e2fcfc7a6ee8de7f442931cbeb4b6e517850d
2021-12-01 01:40:11 +00:00
Makoto Onuki
9a6b5025ce Merge "ForegroundServiceDidNotStartInTimeException now has..." into sc-v2-dev am: b344d33561
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16288923

Change-Id: I3c126dd07f78fe8c464dcb7114ea2511925c72e4
2021-11-30 16:47:10 +00:00
Makoto Onuki
b344d33561 Merge "ForegroundServiceDidNotStartInTimeException now has..." into sc-v2-dev 2021-11-30 16:28:24 +00:00
Felipe Leme
210ec75126 Merge "Added AM APIs to get switch from / to user messages." into sc-v2-dev am: 7df16f2d42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16289546

Change-Id: I09e8d32e4f4f07918b9e4cd052c81e4237103231
2021-11-23 00:37:14 +00:00
Felipe Leme
7df16f2d42 Merge "Added AM APIs to get switch from / to user messages." into sc-v2-dev 2021-11-23 00:25:49 +00:00
Felipe Leme
4ce8bf537d Added AM APIs to get switch from / to user messages.
Test: adb shell dumpsys activity users|grep mSwitching
Fixes: 206873264

Change-Id: I1e5e3ab26c31bad8190037f22d4fbad2947d9d22
2021-11-22 22:11:22 +00:00
Charles Chen
cb89941f83 [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent am: 082403816a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16259164

Change-Id: I5f4fa53bdd66b01d491a7c1ac6dbac1e8ce2bc9e
2021-11-22 06:42:43 +00:00
Charles Chen
83d6490629 Merge "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent" into sc-v2-dev 2021-11-22 06:29:28 +00:00
TreeHugger Robot
3e7d377cf7 Merge "Javadoc changes for additional DPC-settable extras" into sc-v2-dev am: 34a0dd0d91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16197801

Change-Id: I3f896a4d5988510b72b1e3b6566ccff0f85e44f6
2021-11-19 09:55:25 +00:00
TreeHugger Robot
34a0dd0d91 Merge "Javadoc changes for additional DPC-settable extras" into sc-v2-dev 2021-11-19 09:38:28 +00:00
Beth Thibodeau
f784affa98 Merge "Check media session token type" into sc-v2-dev am: 313b9e923d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16250175

Change-Id: I99e4e1afb185a53f1b15c4a156b18f674b63520e
2021-11-18 23:58:18 +00:00
Beth Thibodeau
313b9e923d Merge "Check media session token type" into sc-v2-dev 2021-11-18 23:43:21 +00:00