Commit Graph

104690 Commits

Author SHA1 Message Date
Zimuzo Ezeozue
d371efcfb2 Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev am: efbc3f2d5e
Original change: undetermined

Change-Id: I82ce2d45bc194420d34866483b5b1af06f27563c
2020-06-02 10:49:53 +00:00
Zimuzo Ezeozue
efbc3f2d5e Merge "Support apps sharing file:// URIs with the camera API" into rvc-dev 2020-06-02 10:45:33 +00:00
Martijn Coenen
f1e067d713 Merge "Use killProcessGroup when killing app zygote." into rvc-dev am: 0a8ef2b45f
Original change: undetermined

Change-Id: I0a57b8a8826601ebe3cc44100d910a78206d5912
2020-06-02 07:08:42 +00:00
Martijn Coenen
0a8ef2b45f Merge "Use killProcessGroup when killing app zygote." into rvc-dev 2020-06-02 06:54:46 +00:00
Remi NGUYEN VAN
5b29efdc11 Merge "Allow TRANSPORT_TEST ethernet networks" into rvc-dev am: fcd1fd8f26
Original change: undetermined

Change-Id: Ida76ccf2f5b99f77c17ae3ff732e7f56a1676306
2020-06-02 00:25:06 +00:00
Remi NGUYEN VAN
fcd1fd8f26 Merge "Allow TRANSPORT_TEST ethernet networks" into rvc-dev 2020-06-02 00:06:21 +00:00
TreeHugger Robot
4b706dd16b Merge "Remove additional sf transaction when constructing a leash" into rvc-dev am: 1b2dfb04c8
Original change: undetermined

Change-Id: Iaa73fe7a929c787108f3544f9fa929159704f1ca
2020-06-01 23:55:05 +00:00
TreeHugger Robot
1b2dfb04c8 Merge "Remove additional sf transaction when constructing a leash" into rvc-dev 2020-06-01 23:41:12 +00:00
Evan Rosky
eabcec5bf2 Merge "Use boundsChangeTransaction to improve split-screen enter/exit" into rvc-dev am: 82352f9db8
Original change: undetermined

Change-Id: I6099328a91c2c357c98a3951d129638ca2e49242
2020-06-01 23:17:32 +00:00
Evan Rosky
82352f9db8 Merge "Use boundsChangeTransaction to improve split-screen enter/exit" into rvc-dev 2020-06-01 22:55:20 +00:00
TreeHugger Robot
925463ba53 Merge "[wm] Introduce meta-data tag (android.supports_size_changes)" into rvc-dev am: 247144d4a2
Original change: undetermined

Change-Id: Ie4936b525b5756fb6c4970dfb3bc5ccc18ec871f
2020-06-01 21:48:28 +00:00
TreeHugger Robot
247144d4a2 Merge "[wm] Introduce meta-data tag (android.supports_size_changes)" into rvc-dev 2020-06-01 21:37:21 +00:00
Steven Thomas
39bdd7a712 Merge "Clarify FRAME_RATE_COMPATIBILITY_* params" into rvc-dev am: 061dec3e8d
Change-Id: If1a746fbbdaf56bee564a42675ca48de8ad48b51
2020-06-01 20:58:34 +00:00
Steven Thomas
061dec3e8d Merge "Clarify FRAME_RATE_COMPATIBILITY_* params" into rvc-dev 2020-06-01 20:44:30 +00:00
Zim
c7496a3a62 Support apps sharing file:// URIs with the camera API
The camera API, MediaStore.ACTION_IMAGE_CAPTURE requires apps to pass
a content:// URI with write permissions to the camera. Unfortunately,
apps haven't been doing this and we only started hitting problems in R
for two reasons:
1. The FileUriExposedException that should crash apps when they try to
share file:// URIs acroos binder is skipped. This is because, the
image_capture intent is passed across binder as a field in a
ChooserActivity Intent and the child intents are not checked for
file URI exposed
2. Prior to R, when camera gets a file:// URI, camera issues a file
open(2) in its process. This open(2) succeeds because the camera had
write_external_storage permission which gave it write access to all
files on external storage

Now, camera targets R and (2) fails because camera does not have write
access to files owned by other apps. To workaround, we do the
following in the apps process when it targets < R:
a. When we detect a file:// URI for the camera in an Intent, we create
the file on disk if it is not already created.
b. Scan the file to insert it in the database and retrieve a
content:// URI
c. Replace the file:// URI with the content URI in the image_capture
intent

This works because, the system will ensure the camera is granted write
access to the content URI.

Test: Manual
Bug: 156336269
Change-Id: I4849ff5e806a8207650ff7534846c36ecdc6d3c0
2020-06-01 20:33:52 +01:00
Evan Rosky
3613854d1b Use boundsChangeTransaction to improve split-screen enter/exit
Uses applySyncTransaction to synchronize all the surface
updates during split-screen enter/exit.

In Divider, all syncTransactions are serialized and runnables
can be posted to operate on the returned transactions so
they happen all at once.

This also required adding a "merge" functionality on
WindowContainerTransactions to handle racing between rotation
and other in-flight sync transactions (because they are
serialized, sometimes they got delayed).

Bug: 153579514
Test: Enter/exit split-screen and observe no flickers
Change-Id: I57df13489247f3c4fb3ca59efa26867a872e447f
2020-06-01 11:33:27 -07:00
Kevin Chyn
e4057a4997 Merge "Send callingUserId from AuthService -> BiometricServiceBase" into rvc-dev am: 20534dcc8d
Change-Id: Ida1abc50d53ffc7fd3963c7fc9f4cea6bbb079cc
2020-06-01 16:04:21 +00:00
Jeff Sharkey
07f0ad39dd Merge "Revert "Apps shouldn't be disabling StrictMode checks."" into rvc-dev am: c99a508218
Change-Id: Iebbfbe3a5545ca2b421ebb3ef07726bb8bec0e76
2020-06-01 16:03:54 +00:00
Kevin Chyn
20534dcc8d Merge "Send callingUserId from AuthService -> BiometricServiceBase" into rvc-dev 2020-06-01 15:57:00 +00:00
Jeff Sharkey
c99a508218 Merge "Revert "Apps shouldn't be disabling StrictMode checks."" into rvc-dev 2020-06-01 15:55:14 +00:00
Jeff Sharkey
3080fb7c9e Revert "Apps shouldn't be disabling StrictMode checks."
This reverts commit 14e961870a.

Reason for revert: satayev@
Bug: 156336269

Change-Id: Ic0d3a650156c06f58fce4c28157191f4497469f0
2020-06-01 15:54:41 +00:00
Kwangho Lim
2141f707b7 [wm] Introduce meta-data tag (android.supports_size_changes)
Introduce meta-data tag "android.supports_size_changes" which will indicated that an activity works well with size changes like display changing size.

Test: Manual - Run by adding metadata to the app running with SizeCompatMode.
Bug: 155041354
Change-Id: I0f358f63c9e14c63294275c0bfcd08744bee1108
2020-06-01 08:34:38 -07:00
Jeff Sharkey
f7b86769e3 Merge "Support getStorageVolume() for synthetic volumes." into rvc-dev am: fd71805e1c
Change-Id: I59c94cfff9f58b2fbbc1344019103f401fec2299
2020-06-01 14:38:27 +00:00
Jeff Sharkey
2101337142 Merge "Apps shouldn't be disabling StrictMode checks." into rvc-dev am: 4d96602de0
Change-Id: I5cee427c75ff965fd30861bbff1123b908a47306
2020-06-01 14:37:48 +00:00
Jeff Sharkey
fd71805e1c Merge "Support getStorageVolume() for synthetic volumes." into rvc-dev 2020-06-01 14:18:32 +00:00
Jeff Sharkey
4d96602de0 Merge "Apps shouldn't be disabling StrictMode checks." into rvc-dev 2020-06-01 14:16:54 +00:00
Remi NGUYEN VAN
53be2d08d3 Allow TRANSPORT_TEST ethernet networks
Ethernet networks using tap interfaces should have TRANSPORT_TEST so
they are not considered by network selection.

Test: atest CaptivePortalApiTest FrameworksNetTests
Bug: 156319532
Original-Change: https://android-review.googlesource.com/1317238
Merged-In: I0d9477977c88aa055625ab4046577a41e76b05ff
Change-Id: I0d9477977c88aa055625ab4046577a41e76b05ff
2020-06-01 01:43:32 +00:00
Julia Reynolds
a990428b2c Merge "Add method for Settings" into rvc-dev am: 829ac140f8
Change-Id: Ib59f5b6a6370afdd3ff1da748c8df9e7931f6934
2020-05-31 19:08:20 +00:00
Julia Reynolds
829ac140f8 Merge "Add method for Settings" into rvc-dev 2020-05-31 18:57:41 +00:00
Charles Chen
c1ee356ca6 Merge "Fix get display from display context derived context not working" into rvc-dev am: 13e3568567
Change-Id: Ibdb1cea64d43db5b54b5905ee544b6e374fe60ff
2020-05-30 06:51:42 +00:00
Charles Chen
13e3568567 Merge "Fix get display from display context derived context not working" into rvc-dev 2020-05-30 06:35:35 +00:00
Charles Chen
e22c4cb3c6 Fix get display from display context derived context not working
In ContextImpl, we checked the flag "mIsAssociatedWithDisplay" to
identify if a context can access a display or not. The flag wasn't
passed from outer context, and it leads to an issue that context
which created from #createConfigurationContext from display context
failed to obtain display instance.

This CL passes mIsAssociatedWithDisplay from outer context and
also add test to verify the behavior.

fixes: 157719118
Test: atest ContextTest ContextAccessTest

Change-Id: Ibeb2a08c75f90304e12dcf99293c84409c5eea34
2020-05-30 12:46:59 +08:00
Jason Hsu
5684903daa Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev am: dac6071aca
Change-Id: I3d6e8487e506b7d5e29926a1df1b505b3bed2242
2020-05-30 01:12:24 +00:00
Jason Hsu
dac6071aca Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev 2020-05-30 01:06:23 +00:00
Yara Hassan
6dd5caab66 Add finish() method to DataShare Read and Write Adapters am: dc699fb8ce
Change-Id: I747217a8f7808a9dec4d5fb03daeeaec0bc107a8
2020-05-29 23:50:57 +00:00
Ahaan Ugale
4d8efece25 Merge changes from topic "Data Share Sender Crash" into rvc-dev
* changes:
  Handle sender's crash in Data Share API
  Add finish() method to DataShare Read and Write Adapters
2020-05-29 23:32:48 +00:00
Kevin Chyn
5433cd4070 Send callingUserId from AuthService -> BiometricServiceBase
Since authenticatorIds are collected from AuthService, which is
system_server, we need to get the callingUserId before the code
enters system_server, which clears calling identity.

Test: 1) Set up work profile, install BiometricPromptDemo
      2) Enroll work profile fingerprint
      3) Open work profile version of BiometricPromptDemo
      4) Create biometric-bound keys and authenticate with fingerprint
      Before this change, key was unusable. After this change,
      the key can be used

Fixes: 157486161
Change-Id: I4ec89b9cb13caff397b1a1acd844962736290040
Merged-In: I4ec89b9cb13caff397b1a1acd844962736290040
2020-05-29 23:21:57 +00:00
Ahaan Ugale
8ea92c81c6 Merge "AF Inline: Notify the registered AutofillCallback, also fix filtering." into rvc-dev am: 7f3570724d
Change-Id: I4eaa905731ee7f8d64d41ec3c53f1477b1840a63
2020-05-29 23:07:47 +00:00
Ahaan Ugale
7f3570724d Merge "AF Inline: Notify the registered AutofillCallback, also fix filtering." into rvc-dev 2020-05-29 23:03:44 +00:00
TreeHugger Robot
31701635b9 Merge "Fixed how ShellCommand show exceptions." into rvc-dev am: 725f9cea7f
Change-Id: Ie0cdf3140be6c0ca170f3f23fdfab7afd08fa48e
2020-05-29 23:01:13 +00:00
TreeHugger Robot
725f9cea7f Merge "Fixed how ShellCommand show exceptions." into rvc-dev 2020-05-29 22:58:03 +00:00
Vishnu Nair
06cff30935 Remove additional sf transaction when constructing a leash
The leash needs to be visible on creation otherwise when reparenting
the leash, the leashed layer may be hidden for a moment. This is because
Transaction#show can be deferred but Transaction#reparent cannot.

This change adds a layer flag to allow creating effect layers without
a color fill so we can avoid an additional sf transaction.

Fixes: 157646690
Test: go/wm-smoke
Test: atest SurfaceFlinger_test
Change-Id: I3d8a4f4820d7b8fb05daab697c25cff8def612c1
2020-05-29 21:59:24 +00:00
TreeHugger Robot
7a4f041cc0 Merge "Add test for permission APEX." into rvc-dev am: e40b321ee6
Change-Id: I0a80d2a14510a7cea9ce1beb49d887815656a185
2020-05-29 21:47:30 +00:00
TreeHugger Robot
e40b321ee6 Merge "Add test for permission APEX." into rvc-dev 2020-05-29 21:40:19 +00:00
Yara Hassan
dc699fb8ce Add finish() method to DataShare Read and Write Adapters
The finish() method is used to clear hard references after
the data copy has ended. This fixes a bug where the references are cleared before onError() is attempted to be called.

Test: CTS tests in followup CL
Bug: 157136368
Fixes: 157136368
Change-Id: If924fe388762831af90579e6b00bdf223230e203
2020-05-29 14:35:13 -07:00
felipeal
283e3c388d Fixed how ShellCommand show exceptions.
Prior to this change, it was duplicating the exception. Example:

$ adb shell cmd car_service create-user --flags 4444 --timeout 100 --hal-only Dude

Exception occurred while executing: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
java.lang.IllegalArgumentException: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
	at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:69)
	at android.car.userlib.UserHalHelper.toVehiclePropValue(UserHalHelper.java:503)
	at com.android.car.hal.UserHalService.createUser(UserHalService.java:339)

Now it's showing the failed command instead:

Exception occurred while executing 'create-user --flags 4444 --timeout 100 --hal-only Dude':
java.lang.IllegalArgumentException: new user flags mismatch on existing users on {.requestId = 2, .newUserInfo = {.userId = 11, .flags = 0x115c}, .newUserName = Dude, .usersInfo = {.currentUser = {.userId = 11, .flags = NONE}, .numberUsers = 3, .existingUsers = [{.userId = 0, .flags = 0x9}, {.userId = 10, .flags = ADMIN}, {.userId = 11, .flags = NONE}]}}
	at com.android.internal.util.Preconditions.checkArgument(Preconditions.java:69)
	at android.car.userlib.UserHalHelper.toVehiclePropValue(UserHalHelper.java:503)
	at com.android.car.hal.UserHalService.createUser(UserHalService.java:339)

Test: manual verification
Bug: 150408921

Change-Id: I42221fbe2410770b0755c32d16620acc71d8d5d2
2020-05-29 21:21:56 +00:00
Winson Chung
376ac8a830 Merge "Mirror task visibility on task org leash" into rvc-dev am: 1298d2b760
Change-Id: Icbc53a4b5e4b0f63fcf01c8dd5fc8511add40c89
2020-05-29 21:18:16 +00:00
Ahaan Ugale
974c3114dc AF Inline: Notify the registered AutofillCallback, also fix filtering.
This is missing notifications on the suggestions being hidden/shown
while filtering, but that is a bit harder to solve as we have to pipe
this state back from AutofillInlineSessionController. (although, I'm not
certain we even want this behavior, however it is inconsistent with the
dropdown behavior for now)

See bugs linked for what is fixed for filtering (some are not marked as
fixed as they still might need cts tests).
The main change is to make the privacy protection mechanism a bit
smarter - it now only applies to text-matching based logic.

Fix: 157763435
Fix: 156930859
Bug: 155517211
Bug: 157762527
Test: atest CtsAutoFillServiceTestCases:DatasetFilteringInlineTest \
  CtsAutoFillServiceTestCases:InlineFilteringTest \
  CtsAutoFillServiceTestCases:DatasetFilteringDropdownTest
Test: atest android.autofillservice.cts.inline
Change-Id: Icf94e21ba0df3b15a32454038772967cc1f6da79
2020-05-29 14:12:27 -07:00
Winson Chung
1298d2b760 Merge "Mirror task visibility on task org leash" into rvc-dev 2020-05-29 21:06:03 +00:00
Winson Chung
14a657c944 Mirror task visibility on task org leash
- Depending on the navigation mode, the task is either visible or not
  when entering PIP, and if it is not visible, initially hide the leash
  so that SysUI can control it's visibilty to prevent a flash

Bug: 156941210
Test: Introduce artificial delay on sysui taskAppeared() and verify that
      we don't see the task when entering pip in gesture nav (and that
      it still works in 3 button)

Change-Id: I291afd209af118ac178f8a6421d7df25974315f0
2020-05-29 21:05:37 +00:00