Commit Graph

3476 Commits

Author SHA1 Message Date
Bryce Lee
fac4ecd370 Merge "Unbind from overlay before checking attached." into tm-dev am: d5e4503c74 am: e56b19ea82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17574386

Change-Id: Iaa8c6c8bcd7ec8ceb36cc9c3ce5af6779b0c888c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 02:50:25 +00:00
Bryce Lee
410b5a6f98 Unbind from overlay before checking attached.
Currently, DreamService#finish exits early if the window is not
attached. The unbind from the dream overlay service follows this
condition. As a result, it is possible that the service is not
unbound if the window was never attached. This changelist addresses
This potential connection leak by having the unbind precede the
check.

Fixed: 227498355
Test: manual
Change-Id: I7a73258cea5219bea96f4de3b90b4b5a66478fde
2022-04-04 14:57:13 -07:00
Jack Yu
1abcb9c5eb Merge "Updated the owners" am: c22f798040 am: d7659e6014 am: 0d9d376b45 am: 2f0440e4fe am: df347720bf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052239

Change-Id: Ic178f8c17d8f42bccac21d1e738aabe1e91bb16e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 06:37:15 +00:00
Jack Yu
2f0440e4fe Merge "Updated the owners" am: c22f798040 am: d7659e6014 am: 0d9d376b45
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052239

Change-Id: I2b0f3ca4b76ca656dde769ae1b26a9fe6a83d870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 06:06:57 +00:00
Jack Yu
d7659e6014 Merge "Updated the owners" am: c22f798040
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052239

Change-Id: Icf59b227d3b37ba84874d9452b16762b47603649
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 05:40:33 +00:00
Nicholas Ambur
b7acc5c21f Merge changes from topic "multi-detector"
* changes:
  add equals for AlwaysOnHotwordDetector
  add support for multiple keyphrase detectors
2022-04-01 21:21:57 +00:00
TreeHugger Robot
c1bb516cdd Merge "Add tracing to wallpaper local colors" into tm-dev am: 20514d4e5e am: 58ecb6ae66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17539905

Change-Id: Ie9bcefe95d3c3f9c7e2876d0624539e061a16878
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 18:04:17 +00:00
TreeHugger Robot
20514d4e5e Merge "Add tracing to wallpaper local colors" into tm-dev 2022-04-01 17:30:41 +00:00
Jack Yu
7750d9fa9f Updated the owners
Updated the owners to the latest telephony and
telecomm team members.

Test: Build
Bug: None
Change-Id: I3a456b168ec24199413e42c5fa615ecf285af79b
2022-04-01 16:46:46 +00:00
Jay Aliomer
43cd27258f Add tracing to wallpaper local colors
Bug: 221495444
Test: N/A
Change-Id: Ia72308eef6bfa08523dd6cb7653b047cade86f7b
2022-04-01 10:07:27 -04:00
Nicholas Ambur
1b51fafb7e add equals for AlwaysOnHotwordDetector
Test: atest VoiceInteractionMultiDetectorTest
Bug: 193232191
Change-Id: I1bb258c6660cc83f67f5f765fd7aca0b7dce9fdc
2022-03-31 22:33:57 -07:00
Nicholas Ambur
d4c79f5f8e add support for multiple keyphrase detectors
This change allows for the active VoiceInteractionService to create any
number of unique DSP-based AlwaysOnHotwordDetectors in parallel. This
change also allows for a SoftwareHotwordDetector to be created alongside
the DSP-based detector(s).

When a implementation of VoiceInteractionService has a target SDK lower
than Android T SDK version, there is no behavior change, and the
application will only be able to use a single HotwordDetector at a given
time.

Test: atest VoiceInteractionSystemApiTest
Bug: 193232191
Change-Id: I4bc7211884d2d63dc7fcda059384f3a8233a41a8
2022-03-31 22:16:55 -07:00
TreeHugger Robot
176754243b Merge "update HotwordDetector exception throws" 2022-04-01 00:08:26 +00:00
Simran Basi
ab7ee498bc Merge "Delete attribute useTargetActivityForQuickAccess." into tm-dev 2022-03-31 18:26:52 +00:00
Nicholas Ambur
d7f42e085f update HotwordDetector exception throws
A few updates to throwing exceptions in AOHD:
- overrideAvailability throws exception when overriding to ENROLLED
  state without an enrolled model
- APIs no longer throw runtime exceptions when it could be due to
  system server modifying the detector state without the caller's
  knowledge. In cases where a RuntimeException was thrown, a checked
  exception is thrown instead.

Bug: 226355112
Test: atest AlwaysOnHotwordDetectorTest
Test: atest AlwaysOnHotwordDetectorSystemApiTest
Change-Id: Id6884a325a1cd79f1cc880f370a0a97e4ab0ec04
2022-03-31 10:48:16 -07:00
TYM Tsai
b0e4d5d743 Merge "Make TextView do not show IME when fill dialog popup" into tm-dev am: e6ae224102
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16984943

Change-Id: I3b892e4a120719e572908df4569d655addab38f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-31 14:14:21 +00:00
TYM Tsai
e6ae224102 Merge "Make TextView do not show IME when fill dialog popup" into tm-dev 2022-03-31 14:09:17 +00:00
Scottie Biddle
e30d9986f1 Delete attribute useTargetActivityForQuickAccess.
In practice, the value of this xml attribute is always going to a
function of  whether or not getTargetActivityPendingIntent() is null--
when a QuickAccessWalletService sends us a PendingIntent, we will use
that instead of the SystemUI card switcher activity.

If the PendingIntent is null, we then fall back to our old behavior:
* If the wallet is not currently showing any cards, launch the activity
  specified by getWalletIntent() (this is hardcoded in XML metadata).
    * If the wallet is currently showing cards, launch the SysUI
      switcher activity.

Test: atest CtsQuickAccessWalletTestCases --retry-any-failure
Test: atest QuickAccessWalletControllerTest
Fixes: 218860062
Change-Id: I62f7ca507ebce29b03d6ce76bccaa6d736720a86
Merged-In: I4cfaa5b6035499c47a0ed8b1a4a5f3e1f0f50860
2022-03-30 23:28:49 +00:00
Scottie Biddle
305cfcea77 Delete attribute useTargetActivityForQuickAccess.
In practice, the value of this xml attribute is always going to a
function of  whether or not getTargetActivityPendingIntent() is null--
when a QuickAccessWalletService sends us a PendingIntent, we will use
that instead of the SystemUI card switcher activity.

If the PendingIntent is null, we then fall back to our old behavior:
* If the wallet is not currently showing any cards, launch the activity
  specified by getWalletIntent() (this is hardcoded in XML metadata)
    * If the wallet is currently showing cards, launch the SysUI
      switcher activity

Test: atest CtsQuickAccessWalletTestCases --retry-any-failure
Test: atest QuickAccessWalletControllerTest
Bug: 218860062
Change-Id: I4cfaa5b6035499c47a0ed8b1a4a5f3e1f0f50860
2022-03-30 11:05:02 -07:00
Yuri Lin
4776ee474e Merge "Write ZenPolicy conversation settings out to XML" into tm-dev am: 1a9c4a2a3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17355880

Change-Id: Ie8fe22e7901c178b238a2dd6d437f1417054992f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 19:47:03 +00:00
Yuri Lin
f4853ae012 Write ZenPolicy conversation settings out to XML
because apparently we weren't doing that before

Bug: 223453030
Test: ZenModeConfigTest
Change-Id: Ied8f9120881d04987d38b8dc6364f864331a29f0
2022-03-28 16:04:49 +00:00
Tiger Huang
72bb62d920 Merge "Send InsetsState to the client via IWindow#resized" into tm-dev am: 5b19a1584a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17352245

Change-Id: Icb1133a84c150eaa292b63b97ba2b65b88d6b005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 04:14:45 +00:00
Tiger Huang
5b19a1584a Merge "Send InsetsState to the client via IWindow#resized" into tm-dev 2022-03-26 03:50:44 +00:00
Sharon Su
affee4a5e1 Merge "Update WallpaperEffectsGeneration api, including annotations on data classes and allow the same uid process to call returnCinematicResponse API." into tm-dev 2022-03-25 17:05:09 +00:00
Ayush Sharma
9f080a0345 Fix security hole in GateKeeperResponse am: 5d2176df69 am: 25356fba35 am: 936c9f03ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343385

Change-Id: I22d92503039e830328e6a22a724aeb1286730108
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 13:06:56 +00:00
Ayush Sharma
936c9f03ea Fix security hole in GateKeeperResponse am: 5d2176df69 am: 25356fba35
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343385

Change-Id: I440c492f0199a89f61356c21cc0f0be8d0649199
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 12:54:22 +00:00
Ayush Sharma
25356fba35 Fix security hole in GateKeeperResponse am: 5d2176df69
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17343385

Change-Id: Iaa20c957e0944a9ce72c1584d93c352d7ffeee40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 12:35:07 +00:00
Tiger Huang
bc1d8093db Send InsetsState to the client via IWindow#resized
In some cases, the InsetsState and the window frame can be changed at
the same time (such as orientation changed). Reporting them separately
might produce incorrect insets.

When the window layout is moved to the client, it uses the configuration
and the InsetsState to compute the window frame. They need to be
reported together as well.

Bug: 161810301
Bug: 160732586
Test: atest ActivityRecordTests WindowStateTests
Test: Add logs to check if we dispatch the correct insets to apps while
      rotating the display.
Change-Id: I5c9f628eda40932def97c5caf968cb62db128e80
2022-03-25 12:39:18 +08:00
TreeHugger Robot
2fa6ae08d1 Merge "Update the GrantTrustResult to remove static factory method." into tm-dev am: bb497479ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17382974

Change-Id: I38d3772728f3467857bc6ab42c2b9b66df98a547
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 04:12:34 +00:00
TreeHugger Robot
bb497479ab Merge "Update the GrantTrustResult to remove static factory method." into tm-dev 2022-03-25 03:52:11 +00:00
TreeHugger Robot
ad0becc705 Merge "Client feedback: Fix javadoc mistake" into tm-dev am: ba57fccde4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17321744

Change-Id: I439e1145f76bcd5bddc05e670d256feb4a359a4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 02:47:29 +00:00
TreeHugger Robot
ba57fccde4 Merge "Client feedback: Fix javadoc mistake" into tm-dev 2022-03-25 02:43:08 +00:00
Mark Renouf
f7dffbe0b3 Merge "Remove permission token from startActivityAsCaller" into tm-dev am: fe4b81853e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17108066

Change-Id: I9c1029682eec0cb51f26b9724040a52e83b5bc86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 02:42:33 +00:00
Mark Renouf
fe4b81853e Merge "Remove permission token from startActivityAsCaller" into tm-dev 2022-03-25 02:32:08 +00:00
Sharon Su
bb146eff49 Update WallpaperEffectsGeneration api, including annotations on data classes and allow the same uid process to call returnCinematicResponse API.
Test: Manual test on device
Bug: 218570612
Change-Id: Ie12b570f1e6400ab9e289b882e5821921a609e0a
(cherry picked from commit 1611a8d1c5)
Merged-In: Ie12b570f1e6400ab9e289b882e5821921a609e0a
2022-03-24 23:08:08 +00:00
Dave McCloskey
c26e2e11a5 Update the GrantTrustResult to remove static factory method.
Bug: 226358933
Bug: 225231929
Test: atest TrustTests
CTS-Coverage-Bug: 213944235
Change-Id: I3d38a7df0bff3ef762579fa12bdfc68b6109f0fd
2022-03-24 11:04:02 -07:00
Tiger Huang
2c45fb8608 Merge "Introduce updateVisibility and updateLayout" into tm-dev am: 0797d97536
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17292204

Change-Id: Ia7f267a328fe65e7adc3390c8a6bc88ab87d48dd
2022-03-24 00:42:35 +00:00
Lucas Dupin
0a5a973b54 Merge "Asynchronously bind/unbind service" into tm-dev am: f4dbcd621f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17188342

Change-Id: I999a9cb5c0feeeeac1cb898e88301ddd0e8ae60d
2022-03-24 00:38:59 +00:00
Tiger Huang
0797d97536 Merge "Introduce updateVisibility and updateLayout" into tm-dev 2022-03-23 17:44:42 +00:00
Lucas Dupin
f4dbcd621f Merge "Asynchronously bind/unbind service" into tm-dev 2022-03-23 17:11:24 +00:00
Mark Renouf
05a2ef2647 Remove permission token from startActivityAsCaller
The call is protected by the signature permission
START_ACTIVITY_AS_CALLER. This will remove the need for additional data
to be passed from system server.

Bug: 222082547
Bug: 226354782
Test: atest ActivityTaskManagerServiceTests, atest ChooserActivityTest,
      manual testing
Change-Id: I94f34a68e390569ec14dfebb1902a7c30558864f
2022-03-23 14:55:01 +00:00
TreeHugger Robot
49d28c5a9c Merge "[DO NOT MERGE] Remove the Client Suggestions APIs" into tm-dev 2022-03-23 07:25:35 +00:00
TYM Tsai
8f502801e1 Make TextView do not show IME when fill dialog popup
Make to show fill dialog only if IME is not showing. And if the field
will show fill dialog, ignore to show ime when clicks on the field.

Bug: 210926084
Test: Manual
  launch sample and click on password field -> show fill dialog
  click on username field (no fill dialog) -> show fill UI and IME
  IME is showing and click on password field -> show fill UI
Test: atest android.autofillservice.cts.dialog.LoginActivityTest
Test: atest android.widget.cts.EditTextTest
Change-Id: I6080510d87c50969d85fd9ed746ceba7e3c1c685
2022-03-23 15:02:12 +08:00
Ayush Sharma
5d2176df69 Fix security hole in GateKeeperResponse
GateKeeperResponse has inconsistent writeToParcel() and
createFromParcel() methods, making it possible for a malicious app to
create a Bundle that changes contents after reserialization. Such
Bundles can be used to execute Intents with system privileges.

We fixed related issues previously for GateKeeperResponse class, but
one of the case was remaining when payload is byte array of size 0,
Fixing this case now.

Bug: 220303465
Test: With the POC provided in the bug.
Change-Id: Ida28d611edd674e76ed39dd8037f52abcba82586
Merged-In: Ida28d611edd674e76ed39dd8037f52abcba82586

(cherry picked from commit 46653a91c3)

Change-Id: I486348c7a01c6f59c952b20fb4a36429fff22958
2022-03-23 06:38:03 +00:00
TYM Tsai
613a8733c6 Client feedback: Fix javadoc mistake
Bug: 226053830
Test: make sdk
Change-Id: I97665d80f49a5d7adce9905623f659400f735f88
2022-03-23 01:06:45 +08:00
Tiger Huang
db407ef12d Introduce updateVisibility and updateLayout
This is a step to let the client layout its window locally. The ultimate
goal is to reduce the jank while laying out the window.

With the new AIDL methods, we can divide IWindowSession.relayout into:

- IWindowSession#updateVisibility (synchronized binder call)
  - To get or update the surface
  - To fetch the latest factors about window-layout
  - Only called when the view visibility is changed

- WindowLayout#computeFrames (local function call)
  - To compute the window frames

- IWindowSession#updateLayout (one way binder call)
  - To report the result of layout to the server

In this way, if the view visibility is not changed, the UI thread of
the client won't be blocked by the binder call during relayout.

The local layout project won't be done in a single CL. In order not to
break the existing logic, this CL introduces a flag: LOCAL_LAYOUT. The
flag will be enabled when the logic of local layout is ready.

Bug: 161810301
Bug: 175861051
Test: presubmit (no behavior change)
Change-Id: Ic4b2fc78a318f3a68e1ef8a35d8f3ab705856702
2022-03-22 23:42:47 +08:00
Lucas Dupin
1ad640ba13 Asynchronously bind/unbind service
Context#bindService can take unreasonably long to execute, causing API
clients to miss frames.

Test: atest TestQuickAccessWalletService
Test: atest QuickAccessWalletControllerTest
Fixes: 218323803
Change-Id: If0278a531b4eb07aad713986315118ac91337b0b
2022-03-21 18:20:16 -07:00
TYM Tsai
0871d02822 [DO NOT MERGE] Remove the Client Suggestions APIs
Bug: 224871426
Test: atest CtsAutoFillServiceTestCases
Change-Id: I178e0443278383120d9e6e3321ec96be8e5705c1
2022-03-22 00:21:12 +00:00
Nicholas Ambur
f71e9ef488 Merge changes from topic "startrecognition-data"
* changes:
  add AlwaysOnHotwordDetector availabilty test API
  expand AlwaysOnHotwordDetection.startRecognition
2022-03-21 22:53:30 +00:00
Dave McCloskey
089538fb92 Merge "Changes to support reducing noise in active unlock notifications." into tm-dev am: c5a7ed29de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17244181

Change-Id: Ic3a4c3707c1b874558ec3d996f6a00ba000d6dc1
2022-03-21 19:36:57 +00:00