Commit Graph

104288 Commits

Author SHA1 Message Date
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
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
Julia Reynolds
829ac140f8 Merge "Add method for Settings" into rvc-dev 2020-05-31 18:57:41 +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
dac6071aca Merge "Fix talkback did not speak out ReplacementSpan's content description." into rvc-dev 2020-05-30 01:06:23 +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
7f3570724d Merge "AF Inline: Notify the registered AutofillCallback, also fix filtering." into rvc-dev 2020-05-29 23:03:44 +00:00
TreeHugger Robot
725f9cea7f Merge "Fixed how ShellCommand show exceptions." into rvc-dev 2020-05-29 22:58:03 +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
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
Julia Reynolds
0c45c6e8ff Add method for Settings
Test: manual
Bug: 156033178
Change-Id: I3c334c6697e9bc13451faa0c0df1cdbdc3eaf6ea
2020-05-29 19:37:56 +00:00
TreeHugger Robot
61d46be2c2 Merge changes from topic "controls_config" into rvc-dev
* changes:
  Controls UI - Allow seeding for multiple apps
  Controls UI - Support seeding for up to 6 structures
2020-05-29 18:12:43 +00:00
Ryan Mitchell
d32418a72a Merge "Install system app in greatest priority partition" into rvc-dev 2020-05-29 18:05:31 +00:00
Benedict Wong
c5401ef015 Merge "Add RequiresFeature annotations for IKEv2 VPN profiles" into rvc-dev 2020-05-29 17:17:10 +00:00
TreeHugger Robot
d220529254 Merge "Add DPC restriction for INTERACT_ACROSS_PROFILES to javadoc." into rvc-dev 2020-05-29 13:22:27 +00:00
Matt Pietal
1f7c8174f0 Controls UI - Support seeding for up to 6 structures
Limit to 36 controls: 6 structures with up to 6 controls per structure

Fixes: 153606605
Test: atest ControlsControllerImplTest

Change-Id: Ieddceda4a0902e4b42208680c7a77ee03514a16c
2020-05-29 08:15:35 -04:00
Alex Kershaw
4da9c2097d Add DPC restriction for INTERACT_ACROSS_PROFILES to javadoc.
Fixes: 157229284
Test: Javadoc only
Change-Id: I21f6276ba08e62c1f17a279241838fdbd352c8d8
2020-05-29 12:43:08 +01:00
TreeHugger Robot
9aa8852510 Merge "Fix transition return issues when more than 1 level depth" into rvc-dev 2020-05-29 04:32:46 +00:00
Nicholas Ambur
779a8966f5 Merge "add SoundTrigger TestApis" into rvc-dev 2020-05-29 03:17:09 +00:00
Benedict Wong
29d6412115 Add RequiresFeature annotations for IKEv2 VPN profiles
This change adds the @RequiresFeature annotation to Ikev2VpnProfile
Builder methods, and checks before provisioning VPN profiles.

Bug: 156681625
Test: New tests added, passing.
Change-Id: I125d8fbe5d67fb877ad7d0636c007cb3e1a9f59b
Merged-In: I125d8fbe5d67fb877ad7d0636c007cb3e1a9f59b
(cherry picked from commit e84a17dd17)
2020-05-28 19:07:29 -07:00
Jeff Sharkey
88818fe7b2 Support getStorageVolume() for synthetic volumes.
The MediaStore.VOLUME_EXTERNAL volume is a synthetic collection of
all currently mounted storage volumes, so if someone wants to find
the underlying StorageVolume for one of these Uris, we need to query
to resolve the real volume name.

Bug: 153664437
Test: atest android.provider.cts.MediaStoreTest
Change-Id: I7b28ba3bfd5b7a4cc577830940de4a2e1cbd1932
2020-05-28 19:18:40 -06:00
Hai Zhang
3562068af9 Add test for permission APEX.
Bug: 152055112
Test: atest PermissionApexTests
Change-Id: I4201501d586fe62df7a04d0e2da955d6d873d3df
2020-05-28 16:19:07 -07:00
Ryan Mitchell
d4e7f93df5 Install system app in greatest priority partition
On Pixel 2 devices, /product is a symlink to /system/product. The
product partition has a higher partition precedence than the system
partition so the app should be installed as a system app on the product
partition.

This change also unifies methods for checking whether a file is within
a partition so we will paths will always be canonicalized before the
check.

Bug: 152522330
Test: update system app in system/product/privapp, uninstall updates,
      verify that the app was scanned as privileged
Change-Id: I646a5f293b977a78daa2102b73f1d3122f774a2a
2020-05-28 16:06:30 -07:00
Evan Rosky
4911db037b Merge "Add boundsChangeTransaction for Task pending mode change" into rvc-dev 2020-05-28 22:28:06 +00:00
Jeff Sharkey
14e961870a Apps shouldn't be disabling StrictMode checks.
Since Android N we've helpfully guided apps towards using content://
Uris when sharing data, but some obstinate apps have tried bypassing
these helpful checks.  Since we're finally changing the storage model
in Android R, we really to communicate strongly that apps must be
using content://, and these methods should not be used.

Bug: 156336269
Test: manual
Change-Id: Id8707ecb51f3a24747b4c84d86c70591fb5f7ffc
2020-05-28 15:34:11 -06:00
Hongwei Wang
3da602b640 Merge "Set isInPictureInPictureMode earlier" into rvc-dev 2020-05-28 20:41:43 +00:00
Evan Rosky
0c86ced0aa Add boundsChangeTransaction for Task pending mode change
This associates a surfaceflinger bounds change with a task's
surface provided that task will become organized by the end
of a WindowContainer transaction. Without this, there's no
way to synchronize a new frame due to bounds-change with
said bounds-change if the bounds-change is a result of
changing windowing-modes (and thus becoming organized).

This also records the original Task that a bounds-change
transaction was associated with along with the transaction.
This is needed anytime tasks are nested (eg. with home
task or with split-screen tasks).

Bug: 153579514
Test: See test entry for end of commit chain
Change-Id: If14ea07eca17ef9146537d5aae7122dd7c2dc045
2020-05-28 12:58:35 -07:00
Hongwei Wang
e37b84d19e Set isInPictureInPictureMode earlier
Per https://developer.android.com/guide/topics/ui/picture-in-picture
After app requests enterPictureInPictureMode and receives onPause
callback, it will continue playback if isInPictureInPictureMode is true.

However, with ag/11273366, isInPictureInPictureMode will now return true
after the new configuration is dispatched to app, which happens after onPause.
This may cause app, following the guidance, to cease playback in PiP mode.

Fixes this by setting the internal mIsInPictureInPictureMode earlier
right in enterPictureInPictureMode

Video: http://go/recall/-/aaaaaabFQoRHlzixHdtY/fVRqG7UWoKkQQhFxPkzcUt
Bug: 156924033
Test: manually enter PiP from Twitch
Change-Id: I8e0865076fcb756cfa5db39901f460ab5ad69b99
2020-05-28 11:41:39 -07:00
TreeHugger Robot
aaec0d4ac3 Merge "Generate ACTION_CANCEL event when screen turned off by proximity sensor." into rvc-dev 2020-05-28 18:35:08 +00:00
Louis Chang
77db95ce85 Merge "Revert "Only add divider when it need to show"" into rvc-dev 2020-05-28 14:45:46 +00:00
TreeHugger Robot
9cf7941324 Merge "Insets: Allow animations when setting SYSTEM_UI_LAYOUT_* flags" into rvc-dev 2020-05-28 14:14:15 +00:00
Adrian Roos
2e2631572a Insets: Allow animations when setting SYSTEM_UI_LAYOUT_* flags
Test: atest android.server.wm.WindowInsetsAnimationTests#testAnimationCallbacks_withLegacyFlags
Fixes: 155955734
Change-Id: Idb35218abb4e17688bfb985abb97ae739a60136b
2020-05-28 14:33:38 +02:00
Jeff Chang
6d834d86fb Fix transition return issues when more than 1 level depth
d85bed510, Adding support for cross-task hero transition, When running
cross-task, only play the enter animation, but the judgment for start
exit transition with shared element is broken. For the case on the issue,
when the exit transition completes, the activity is on the top of task,
it is not allowed to execute return transition.

This CL modifies the condition to allow the return transition. For start
exit back transition, the isReturning is always true. We can use it to
decide if it is allowed to play the return transition.

Bug: 137838129
Test: atest ActivityTransitionTest
      Manual testing on ApiDemos with Activity transition

Change-Id: Iaa6a875dbe305f6356887616b797dc45e76a4b56
2020-05-28 18:00:43 +08:00
Maciej Żenczykowski
b2603a3193 NetworkStats: apply464xlatAdjustments - don't remove CLAT_UID
This should no longer be needed after all the cleanups.

Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I289d935f84b616ed857ef4c5a7427d57c282d00c
Merged-In: I289d935f84b616ed857ef4c5a7427d57c282d00c
2020-05-28 02:44:20 -07:00
Maciej Żenczykowski
d09cef39c5 NetworkStats: apply464xlatAdjustments - remove useBpfStats parameter.
Test: atest NetworkStatsTest NetworkStatsFactoryTest
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0121a4ac7ee824adc5930bab786d550b2f00b05b
Merged-In: I0121a4ac7ee824adc5930bab786d550b2f00b05b
2020-05-28 02:44:10 -07:00
Louis Chang
bf1a597b20 Revert "Only add divider when it need to show"
This reverts commit 91bba497c3.

Reason for revert: unblock wm presubmit

Fix: 157629296

Change-Id: I04fd8b79de025d7c531ac03218a7590e6a32e1be
2020-05-28 09:43:53 +00:00
Maciej Żenczykowski
d1dd2f9cf3 NetworkStats - no need for xt_qtaguid clat bw fixups
This is due to the previous addition of the ip6tables raw PREROUTING
drop rules for incoming ipv6 clat traffic pre-translation to ipv4.

Since we no longer double account, we no longer need these fixups.

Test: atest bpf_module_test clatd_test libbpf_android_test libnetdbpf_test
  netd_integration_test netd_unit_test netdutils_test
Bug: 150738490
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ia171b7797cdc99367064d0649bf1293c71579941
Merged-In: Ia171b7797cdc99367064d0649bf1293c71579941
2020-05-28 02:43:22 -07:00
Tony Huang
8acb04e235 Merge "Only add divider when it need to show" into rvc-dev 2020-05-28 04:26:37 +00:00
TreeHugger Robot
f37b09335f Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev 2020-05-28 00:23:16 +00:00
TreeHugger Robot
5bc3e56a51 Merge "Ensure Java code verifies hinge angle sensor is wakeup" into rvc-dev 2020-05-27 23:54:07 +00:00
Songchun Fan
f2a6af4b8a Merge "[incremental] respect extractNativeLibs in native lib config" into rvc-dev 2020-05-27 22:17:23 +00:00