Commit Graph

3639 Commits

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

Change-Id: I5e59b8549df348c181cd3b72311798a5d7602a67
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 21:03:54 +00:00
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
Cole Faust
a1eb8cf128 Merge "Fix array-related errorprone warnings" 2022-08-30 18:03:01 +00:00
Treehugger Robot
1ac9f9f922 Merge "Add dirtectories and OWNER files" am: 37310607aa am: 44028380e1 am: 5a543f5ac0 am: 87eb7a2711 am: cfdb4292fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193497

Change-Id: I92ab20adb7645261b3663175bc0519fd7c84f3fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 20:49:40 +00:00
Treehugger Robot
cfdb4292fa Merge "Add dirtectories and OWNER files" am: 37310607aa am: 44028380e1 am: 5a543f5ac0 am: 87eb7a2711
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2193497

Change-Id: If1f13e509ddca2603de692d433ae6c554dc81359
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 20:30:52 +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
Chloris Kuo
b5c3bf5638 Merge "Add new intent to open NAS detail settings page in NAS app." into tm-qpr-dev am: 235ce54b78
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19719514

Change-Id: I636e201479940226d8b8a0280d3c99e2ab87c343
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 22:59:01 +00:00
Chloris Kuo
235ce54b78 Merge "Add new intent to open NAS detail settings page in NAS app." into tm-qpr-dev 2022-08-24 22:37:57 +00:00
Chloris Kuo
f99fd3c87e Add new intent to open NAS detail settings page in NAS app.
Bug: 231492005
Test: manually on local device
Change-Id: I87361b640c5fc7b258e3e807e14baeab52a66953
Merged-In: I87361b640c5fc7b258e3e807e14baeab52a66953
2022-08-24 19:50:12 +00:00
Joanne Chung
140dff9b49 Merge "Fix toolbar announce wrong text." into tm-qpr-dev am: 3292a30a1c am: ff672bc4db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19632605

Change-Id: Ib9ed18b9de38598e639a526fdb3d63dd39751cc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 05:57:41 +00:00
Joanne Chung
ff672bc4db Merge "Fix toolbar announce wrong text." into tm-qpr-dev am: 3292a30a1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19632605

Change-Id: If97f639c018bec3bcdb7e66b4e0d6b5b0848eadd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-24 01:12:26 +00:00
Joanne Chung
3292a30a1c Merge "Fix toolbar announce wrong text." into tm-qpr-dev 2022-08-24 01:07:32 +00:00
Chloris Kuo
d748cfddaf Merge "Add new intent to open NAS detail settings page in NAS app." 2022-08-23 18:35:18 +00:00
Reema Bajwa
827821d058 Add dirtectories and OWNER files
Change-Id: I8c6cf6632696f128e1cc68e3850448a33c3d79f3
2022-08-23 18:15:22 +00:00
Daniel Kim
1c307b4ee5 Revert^2 "Add proximity state to the HotwordDetectedResult" am: aa972f2c88
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19619189

Change-Id: Ia20d28254c35ede309ac0887d5747aad13371c3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-20 01:55:19 +00:00
Daniel Kim
7811c2b731 Merge changes from topic "hotword_qpr" into tm-qpr-dev
* changes:
  Revert "Revert "Refactor ProximityUpdateCallbackInternal to inte..."
  Revert^2 "Add proximity state to the HotwordDetectedResult"
2022-08-20 01:30:46 +00:00
Joanne
53d6f568ec Fix toolbar announce wrong text.
This is a regression during refactor toolbar code, we don't intent
to announce the toolbar popup window so we should not set content
description for the container.

Bug: 239563674
Test: manual. Turn on talkback and make sure the announce is correct
and the behavior is the same
Test: atest TextViewIntegrationTest pass for local/remote
Test: atest TextViewActivityTest pass for local/remote
Test: atest SuggestionsPopupWindowTest pass for local/remote

Change-Id: I6e30d2f6d9a2c4905b702c25655fe5e4eb7de5d5
2022-08-19 13:42:24 +00:00
Chloris Kuo
b2c2d1aa17 Add new intent to open NAS detail settings page in NAS app.
Bug: 231492005
Test: manually on local device
Change-Id: I87361b640c5fc7b258e3e807e14baeab52a66953
2022-08-18 14:17:30 -07:00
Mady Mellor
2a1fdce412 Merge "Add a method in IDreamManager to check if dreaming OR in dream preview" into tm-qpr-dev am: 3448c2fe1c am: dfe71854c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19603443

Change-Id: I225c0ae9494b996f13631b0c8723da735ea64637
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 19:46:56 +00:00
Mady Mellor
dfe71854c4 Merge "Add a method in IDreamManager to check if dreaming OR in dream preview" into tm-qpr-dev am: 3448c2fe1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19603443

Change-Id: I003dde1065c5d16c44bd63d7693b593d157fe47e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 19:25:56 +00:00
Mady Mellor
3448c2fe1c Merge "Add a method in IDreamManager to check if dreaming OR in dream preview" into tm-qpr-dev 2022-08-17 18:51:28 +00:00
Joanne Chung
cf488547e4 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d am: 20dbe919b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Idabdc7d36d30c014d383163a2e01c51fa76bbf9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 13:51:33 +00:00
Joanne Chung
20dbe919b1 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Ie4da503e5f569625c807bef1a194764cb5e133fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:08:55 +00:00
Joanne Chung
9e263e643d Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev 2022-08-16 10:00:57 +00:00
Tiger Huang
f114085baa Merge "Introduce IWindowSession#relayoutAsync" into tm-qpr-dev am: 81ae41092e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19194952

Change-Id: Iec4854d8c93a0e58a588d0483833b99a1ec38455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:04:33 +00:00
Tiger Huang
3712433349 Introduce IWindowSession#relayoutAsync
IWindowSession#relayoutAsync is similar to IWindowSession#relayout, but
the former is an oneway method which just sends the layout attributes to
the server. Since the client can compute its own window frame, it just
needs to send attributes to the server without getting blocked for
receving the window frame.

In somes cases, the client still needs to obtain things from the server.
Such as:

- When view visibility is changed. The client maybe not be able to
  receive the latest insets state while it is INVISIBLE or GONE. In this
  case, the client needs to obtain the frame and the insets state. Also,
  the client need to obtain the surface control when it becomes VISIBLE.

- When the insets state is stale but the config is up-to-date. This can
  happen when WindowProcessController sends the new config to the client
  before WindowState does. In this case, the client needs to obtain the
  window frame from the server.

- When the position and the size of the frame are both changed. This
  will trigger a BLAST sync, and the client needs to obtain the sync seq
  ID.

For cases above, the client needs to call the original relayout method.

Bug: 161810301
Bug: 175861051
Test: Seamless rotation, fixed rotation, and regular rotation.
Merged-In: Ifb365789fa08103773fd3180e486ba1d92042fc5
Change-Id: Ifb365789fa08103773fd3180e486ba1d92042fc5
2022-08-16 12:49:31 +08:00
Tiger Huang
885fba406b Merge "Introduce IWindowSession#relayoutAsync" 2022-08-16 03:14:33 +00:00
Daniel Kim
aa972f2c88 Revert^2 "Add proximity state to the HotwordDetectedResult"
Reverting the previous revert commit which was merged to resolve the
broken tests. Adding a fix to the broken tests by surrounding
mAttentionManagerInternal with null checks.

dbe5ad1a72

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Change-Id: Ife5fb9220518a32a89494217f56932f290cce5f3
Merged-In: Ife5fb9220518a32a89494217f56932f290cce5f3
2022-08-15 22:45:55 +00:00
Daniel Kim
e601349c0f Revert^2 "Add proximity state to the HotwordDetectedResult"
Reverting the previous revert commit which was merged to resolve the
broken tests. Adding a fix to the broken tests by surrounding
mAttentionManagerInternal with null checks.

dbe5ad1a72

Test: atest CtsVoiceInteractionTestCases, atest CtsVoiceInteractionTestCases:android.voiceinteraction.cts.AlwaysOnHotwordDetectorTest#testAlwaysOnHotwordDetector_startRecognitionWithData -- --abi x86_64
Change-Id: Ife5fb9220518a32a89494217f56932f290cce5f3
2022-08-13 00:59:42 +00:00
Joanne Chung
9325f9b97e Fix system toolbar doesn't use correct theme.
The toolbar should set the theme to the app's theme. Because the
service cannot get the application context, we should pass this
information from application to service.

Bug: 218833400
Test: manual. Use light/dark theme for app, the toolbar shows with
the same theme
Test: atest TextViewIntegrationTest
Test: atest android.widget.TextViewActivityTest

Change-Id: I6d4e4e117c680ce57e760a87987059eded09b2bc
2022-08-12 16:54:34 +00:00
Mady Mellor
a652dac675 Add a method in IDreamManager to check if dreaming OR in dream preview
Currently there is no signal to identify that dreaming has started
from the 'preview' option in screen saver settings. This adds a
way to query IDreamManager for this state.

Bubbles needs a way to identify this so that they can hide when
the dream preview starts, otherwise it wouldn't be an accurate
preview.

Bug: 240510360
Test: manual - (with the CL on top of this), have some bubbles and
      trigger dream preview, observe that the bubbles hide.
Change-Id: I5f67a8c793970ada05a010c8d36fd4a47b3f8565
2022-08-11 17:27:57 -07:00
Daniel Kim
dbe5ad1a72 Revert "Add proximity state to the HotwordDetectedResult"
Revert submission 17936037-hotword_proximity

Reason for revert: https://buganizer.corp.google.com/issues/242223069
Reverted Changes:
If8c23a9c6:Refactor ProximityUpdateCallbackInternal to interf...
Ib0ad1da25:Verify that proximity key is added to the hotword ...
I71e9d3da9:Add proximity state to the HotwordDetectedResult

Change-Id: I6b79d9400671362dd63be1e2a0d05280003587d3
2022-08-11 22:00:59 +00:00
Tiger Huang
355c6ed16b Introduce IWindowSession#relayoutAsync
IWindowSession#relayoutAsync is similar to IWindowSession#relayout, but
the former is an oneway method which just sends the layout attributes to
the server. Since the client can compute its own window frame, it just
needs to send attributes to the server without getting blocked for
receving the window frame.

In somes cases, the client still needs to obtain things from the server.
Such as:

- When view visibility is changed. The client maybe not be able to
  receive the latest insets state while it is INVISIBLE or GONE. In this
  case, the client needs to obtain the frame and the insets state. Also,
  the client need to obtain the surface control when it becomes VISIBLE.

- When the insets state is stale but the config is up-to-date. This can
  happen when WindowProcessController sends the new config to the client
  before WindowState does. In this case, the client needs to obtain the
  window frame from the server.

- When the position and the size of the frame are both changed. This
  will trigger a BLAST sync, and the client needs to obtain the sync seq
  ID.

For cases above, the client needs to call the original relayout method.

Bug: 161810301
Bug: 175861051
Test: Seamless rotation, fixed rotation, and regular rotation.
Change-Id: Ifb365789fa08103773fd3180e486ba1d92042fc5
2022-08-10 19:54:39 +08:00
Daniel
2bd78dee3a Add proximity state to the HotwordDetectedResult
HotwordDetectionConnection will interact with AttentionService to
receive updated proximity state. Then it will fill the
HotwordDetectedResult returned from Hotword service to set
proximity state.

Bug: 214395649
Test: atest CtsVoiceInteractionTestCases
Change-Id: I71e9d3da999cda2d9b17e3abc900fa42e4364c90
2022-08-08 22:42:23 +00:00
TreeHugger Robot
c7e39d86d0 Merge "Fixed VIMS to postpone ASSISTANT rule change on pre-created users." into tm-qpr-dev am: 9e9bd1e401
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19500510

Change-Id: I9701dfc031e362e1b7d1d10a05bdbd146171f3c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 09:35:03 +00:00
Felipe Leme
88f2307219 Fixed VIMS to postpone ASSISTANT rule change on pre-created users.
RoleService should not be calling onRoleHoldersChanged() on
pre-created users, but that behavior cannot be changed because its
implemented by a system app, and pre-created users APIs are hidden.

To test it:

$ adb shell pm create-user --pre-create-only  --guest
Success: created user id 12

$ adb shell pm create-user --guest ElGuesto
Success: created user id 12

$ adb shell cmd user list --all -v
4 users:

0: id=0, name=Driver, type=system.HEADLESS, flags=ADMIN|INITIALIZED|PRIMARY|SYSTEM (running)
1: id=10, name=Driver, type=full.SECONDARY, flags=ADMIN|FULL|INITIALIZED (running) (current)
2: id=11, name=null, type=full.SECONDARY, flags=FULL|INITIALIZED (pre-created)
3: id=12, name=ElGuesto, type=full.GUEST, flags=EPHEMERAL|FULL|GUEST|INITIALIZED (converted)

$ adb shell am switch-user 12

$ adb shell dumpsys voiceinteraction |egrep '(mBound|implementation)'
  mBound=true mService=android.service.voice.IVoiceInteractionService$Stub$Proxy@77da1bc

$ adb shell cmd voiceinteraction show

Test: see bove
Bug: 216141085
Bug: 226201975

Merged-In: I12d9bb32e144ecf91ee4b452affea0dcea546127
Change-Id: I12d9bb32e144ecf91ee4b452affea0dcea546127
(cherry picked from commit 39acca1d72)
2022-08-03 16:03:02 +00:00
Ivan Chiang
6c8dafdd06 Merge "Use noteOpNoThrow instead of checkOpNoThrow in AssistDataRequester" 2022-08-03 07:13:55 +00:00
Felipe Leme
76273beffd Merge "Fixed VIMS to postpone ASSISTANT rule change on pre-created users." 2022-08-03 06:58:01 +00:00
Felipe Leme
39acca1d72 Fixed VIMS to postpone ASSISTANT rule change on pre-created users.
RoleService should not be calling onRoleHoldersChanged() on
pre-created users, but that behavior cannot be changed because its
implemented by a system app, and pre-created users APIs are hidden.

To test it:

$ adb shell pm create-user --pre-create-only  --guest
Success: created user id 12

$ adb shell pm create-user --guest ElGuesto
Success: created user id 12

$ adb shell cmd user list --all -v
4 users:

0: id=0, name=Driver, type=system.HEADLESS, flags=ADMIN|INITIALIZED|PRIMARY|SYSTEM (running)
1: id=10, name=Driver, type=full.SECONDARY, flags=ADMIN|FULL|INITIALIZED (running) (current)
2: id=11, name=null, type=full.SECONDARY, flags=FULL|INITIALIZED (pre-created)
3: id=12, name=ElGuesto, type=full.GUEST, flags=EPHEMERAL|FULL|GUEST|INITIALIZED (converted)

$ adb shell am switch-user 12

$ adb shell dumpsys voiceinteraction |egrep '(mBound|implementation)'
  mBound=true mService=android.service.voice.IVoiceInteractionService$Stub$Proxy@77da1bc

$ adb shell cmd voiceinteraction show

Test: see bove
Bug: 216141085
Bug: 226201975

Change-Id: I12d9bb32e144ecf91ee4b452affea0dcea546127
2022-08-02 12:57:59 -07:00
Jon Eckenrode
9991cfe392 Merge "Fixed typo in class description." am: 9f59ca049c am: 5376d1acc7 am: 4a1d3071ed am: 3f3bdc48c5 am: 47c3d18be2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168523

Change-Id: Ib7fa77b65cc7179d4586f4835316bef74ceba773
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 02:01:36 +00:00
Jon Eckenrode
47c3d18be2 Merge "Fixed typo in class description." am: 9f59ca049c am: 5376d1acc7 am: 4a1d3071ed am: 3f3bdc48c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168523

Change-Id: I4bee6fcddba7c4917816e38f59752fcc54fd398b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 01:35:55 +00:00
Jon Eckenrode
5376d1acc7 Merge "Fixed typo in class description." am: 9f59ca049c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2168523

Change-Id: Iacf41b70ef71e01a6427dcff7dfc742bce31f0ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 00:44:27 +00:00
Tiger Huang
ae9d2aa672 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d am: 3995c4d303
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: Ic48b954694b8d6cafce8b421dcbcd94f63793acc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:47:33 +00:00
Tiger Huang
3995c4d303 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: If3a51277578c31ba2c0e8c75341b33cd1f5cd9ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:23:15 +00:00
Jon Eckenrode
93b956e9c0 Fixed typo in class description.
Change-Id: I0c2afdd0a8c914854d96e27c924ee74af488e1e4
2022-07-28 14:53:47 +00:00
Wenhao Wang
b24224d9c2 Detail the REASON_LOCKDOWN docs
Bug: 231496716
Test: N/A
Ignore-AOSP-First: pending fix for a security issue.
Change-Id: I25294c75e3180d177b5e7259e12874ae27437c46
2022-07-27 22:05:57 -07:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.

Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.

This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.

This is also a step to enable the client to perform local window layout.

Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
      ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
2022-07-27 14:10:10 +08:00
Ivan Chiang
36e6fecf63 Use noteOpNoThrow instead of checkOpNoThrow in AssistDataRequester
To audit data access and verify the uid and package are consistent,
use noteOpNoThrow instead of checkOpNoThrow.

Bug: 187439908
Test: atest AssistDataRequesterTest
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsAssistTestCases
Change-Id: Ib48040b5b55be09958da4398f4d663908573568c
2022-07-18 05:55:59 +00:00
Andy Labrada
eb8161a0e0 Merge "SurfaceFlinger: Remove usage of window types to implement policy" 2022-07-08 23:15:53 +00:00
Alexus Allen
c87e1ce1f0 SurfaceFlinger: Remove usage of window types to implement policy
Java side for a new API, setFrameRateDefault, where policy implementation logic is made using setFrameRateDefault instead of checking window types.
Bug b/192291754
Test: manual

Change-Id: I3ff35dbe3551746b90448531dccec09d8355824c
2022-07-06 17:46:07 +00:00