473688 Commits

Author SHA1 Message Date
Eric Laurent
a9fd7bc05c SoundTriggerHelper: improve in call behavior
Fix 3 issues in SoundTriggerHelper when a call is active:
1) Do not actually load a sound model when recognition start is requested
but disabled because of and active call or any other reason. Previously
we were loading the sound model even if actual start was deferred until
enabled.
2) Allow to start recognition while disabled: the recognition start
request is stored as pending and will be executed when enabled again.
3) Process call state change with enough delay when call ends to allow
time for the HAL to process the call disconnect notification before re
enabling pending recognitions.

Also remove assumption on valid model handle values.

Test: repro steps in b/152723355
Bug: 152723355
Change-Id: Id46ae8c285426ed2ace8a6d80478fecb98f4ec33
2020-04-06 13:58:50 -07:00
Max Tauro
6f6446bd6d CarSystemUIModule/CarSystemUIRootComponent public
Made CarSystemUIBinder and CarSystemUIRootComponent public to allow
injection in AAECarSystemUI

Bug: 152991117
Test: Treehugger passes
Change-Id: Ica3ac2a61e009c687d4afb847d132a8a0d4fd5eb
2020-04-06 13:50:58 -07:00
Sergey Nikolaienkov
19984f1a56 Merge changes from topic "mic-disclosure" into rvc-dev
* changes:
  Empty audio_recording_disclosure_exempt_apps list
  Account for mic fgs in AudioRecordingDisclosureBar
2020-04-06 20:41:15 +00:00
TreeHugger Robot
7a851ba728 Merge "SurfaceView: Use BLAST transaction when visibility changes." into rvc-dev 2020-04-06 20:31:47 +00:00
Derek Sollenberger
d3e9eecf5b Don't update the genID for an immutable bitmap
AndroidBitmap_unlockPixels is the only way to release the ref on
pixels acquired using AndroidBitmap_lockPixels.  Apps that lock an
immutable bitmap therefore are forced to call unlock pixels. Prior
to this CL the unlock would update the GenID of the bitmap and also
print a warning that the app was modifying an immutable bitmap. After
this CL the bitmap's GenID will not be updated and no warning will be
printed.

As a result, apps that were using the NDK to allow them to mutate
immutable bitmaps will break without getting a warning message.

Test: hwui_unit_tests
Bug: 150823341
Change-Id: Ie5e5cf86a7a83d53c179c9b3cf9be1a0566cfd93
2020-04-06 20:26:49 +00:00
chaviw
51e4c2f25d Move DimLayer to Root if translucent window and not multi-window
When the first window in a Task opens, the Task will animate to enter
instead of the app with the introduction of hierarchal animations. This
causes problems if the first window is translucent and has a dim since
the dim layer will animate with the Task instead of fading in.

To prevent that, we can move the dim layer to a higher up level in the
hierarchy, but still maintain the relative Z order. We still place the
dim at the Task level if the Task is non translucent or if the Task is
in multi-window mode. We find the root task and check if it's translucent.
If so, it will find the Dimmer object for the next level up in the
hierarchy and create the dim layer at that level instead of the Task.
If the Task is not translucent, we add the dimmer to the Task level.

Since the dim layer is at the display level, translucent Tasks don't
behave correctly when swiping to recents. When the dim layer was
parented to the Task, the dim layer would animate with the Task when
swiping up to recents. In this change, the dim layer will fade out if
placed on the display level when swiping to go to recents.

Test: Open assistant and see dim layer fade in
Test: Open translucent app with dim layer. Swipe to recents
Fixes: 148938447
Change-Id: I6e275b778da4cb7aeda3b3483a14f5f9d2796e44
2020-04-06 13:23:55 -07:00
Hongwei Wang
6e68af5e6b Update bounds on shelf/ime adjustment during transition
setShelfHeight can be called during the transition from fullscreen to
PiP, in which case, we simply update the destination bounds on the
animator.

Bug: 135529229
Test: manually enter/exit PiP
Change-Id: Id7ca6a1ed136765361305ee2832f204d9e594fd4
2020-04-06 13:17:58 -07:00
Robert Carr
c2301b7d14 BLAST: Descriptive adapter layer names
Otherwise the bug reports are starting to look pretty
weird.

Bug: 152663327
Bug: 152780239
Test: Existing tests pass
Change-Id: I890ae7dba9cbb104e55b2bd46ee0356914cf95fa
2020-04-06 13:14:15 -07:00
Victor Hsieh
af9cf6b793 Also load fs-verity cert from /system/etc/security/fsverity/
Bug: 153112812
Test: call the API from new CTS test working in progress
Change-Id: I1c339c66059d5a2bf4dec5c9082458e2e95c965f
2020-04-06 13:10:01 -07:00
Rob Carr
0e22967d6c Merge "SurfaceView: Ensure we don't fill unused BLAST Transaction." into rvc-dev 2020-04-06 20:02:13 +00:00
Patrick Baumann
339ba0f87d Fixes AppsFilterTest
This change fixes the AppsFilterTest#testWhoCanSee to properly validate
/ assert. The initial commit used a mistakenly created local method to
"assert" instead of the intended hamcrest assert method. Oops.

Test: atest AppsFilterTest
Bug: 143534210
Change-Id: Ibd2de769d63a166f225e2bec75d27eaff2343ee9
2020-04-06 12:50:08 -07:00
Mady Mellor
12c9095480 Fix NPE when bubble being dragged out
Test: manual - expand stack and drag / fling each bubble
               down to dismiss
Bug: 153359638
Change-Id: Iae43e102a95c8f83617b51d7fcc989ebe0730741
2020-04-06 12:29:07 -07:00
Alex Buynytskyy
1d89216eac Appops permission monitoring for GET_USAGE_STATS.
This makes sure DataLoader won't be able to obtain read logs once user
denies access.

Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: Ibbb74933b4ef0dd8f5fe27732743e5820b8ee4dc
2020-04-06 12:22:49 -07:00
Vinit Nayak
50c80277ce Use existing content resolver
See b/153347449 for possible
future changes

Fixes: 153338799
Change-Id: I1cc918742ded98d44adfd44b5e6e247f2b71b6a7
2020-04-06 12:22:48 -07:00
Bernardo Rufino
78f5d83ac8 Wire user info and use user context for text toasts
Text toasts don't currently support multi-user. This CL prepares toasts
for multi-user by wiring the user information from who requested the
toast (in the form of uid) to ToastUI, where text toasts are actually
rendered.

We go only as far as obtaining a new user-specific context for that user
and using that to construct the view. Actual support will come in future
CLs.

Bug: 151414297
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
      ToastWindowTest ToastUITest NotificationManagerServiceTest
      LegacyToastTest
Change-Id: I8c92453c6a2b73c31f9a41ca9ff463d194d4f44f
2020-04-06 20:20:09 +01:00
Susi Kharraz-Post
8bd0f532a3 Fix NPE for Open With ChooserActivity Logging Bug
Target is not populated for "Open With" processed by ChooserActivity.
Adding a null catch in the logger to return default intent.

Bug: 153335691
Test: manual testing and running ChooserActivityTests
Change-Id: Ib7477a9030d0244d33d74690c6aab8b03b88e1e3
2020-04-06 15:07:23 -04:00
David Su
7309ac6092 Merge "framework-wifi: Remove dependency on framework-telephony-stubs" into rvc-dev 2020-04-06 19:01:46 +00:00
TreeHugger Robot
6831d480e8 Merge "Wait for idmap service on current thread" into rvc-dev 2020-04-06 18:49:23 +00:00
shubang
0dc8394e31 Tuner API: set Frontend and Lnb info to TRM
Bug: 139308734
Test: mmm
Change-Id: I17e198e150b453fec6440264c15b10abc2856a11
2020-04-06 18:36:25 +00:00
Chavi Weingarten
a95d39274f Merge changes Id2b99e6d,I32f5469f,I922e3a56 into rvc-dev
* changes:
  Added test for isAnimating bug
  Override base isAnimating in WindowState
  Ignore specified animation types when checking isAnimating
2020-04-06 18:30:15 +00:00
Chavi Weingarten
ae1c541a6f Merge "Added displayPosition in LogicalDisplay" into rvc-dev 2020-04-06 18:29:05 +00:00
Fiona Campbell
29dce0f0a9 Make PowerManagerService use float for brightness
Change the override brightness values to use float instead of an int in
PowerManagerService.

Bug: 150671605

Test: WmTests:RootWindowContainerTests
FrameworksServicesTests:PowerManagerServiceTest
CtsOsTestCases:android.os.cts.PowerManagerTest
FrameworksCoreTests:android.os.PowerManagerTest

Change-Id: I97e97e1500dac7f8beb112812d1347fa420afbf7
2020-04-06 19:28:55 +01:00
Winson Chung
d2fb07e4f6 Revert "Keep task hidden until task appeared"
This reverts commit cbd8793a441bc828ec22dda09145134da7105818.

Reason for revert: b/153273664
Bug: 153273664

Change-Id: Ic3a0778e896afd5e3fdbc234a5b3521257222dcd
2020-04-06 18:17:21 +00:00
TreeHugger Robot
6846155403 Merge "DO NOT MERGE Remove permission guard on getTestProviderCurrentRequests()" into rvc-dev 2020-04-06 18:13:27 +00:00
Ytai Ben-tsvi
b42d1a5a0f Merge "Add capture state to soundtrigger_middleware dump" into rvc-dev 2020-04-06 18:13:19 +00:00
Fiona Campbell
b533ef703b Merge "Pass DisplayDeviceConfig to AutomaticBrightness" into rvc-dev 2020-04-06 18:03:51 +00:00
Sergey Nikolaienkov
3d51a3a8e9 Empty audio_recording_disclosure_exempt_apps list
Empty audio_recording_disclosure_exempt list (moving content to an
overlay)

Bug: 152559914
Test: make
Change-Id: I0d165ce2b96c9e71b8ca0587f5917cfd9cc29649
2020-04-06 19:46:26 +02:00
Sergey Nikolaienkov
d07dc4d4cc Account for mic fgs in AudioRecordingDisclosureBar
Take into account foreground services of type 'microphone' in
AudioRecordingDisclosureBar - watch processes that run such fg services
and treat them as so they are already recording.

Bug: 152364373
Test: make, run audio recording app
Change-Id: I7961ad332d5741a12f029dcc95e909572f30ad05
2020-04-06 19:45:52 +02:00
Anton Hansson
91440b9249 Merge "Stop system server depending on the stubs of itself" into rvc-dev 2020-04-06 17:28:10 +00:00
arangelov
ce7d4a623c Show sharesheet with 1 personal app and >0 work apps with WP off
Previously we would autolaunch in this case, as
getResolversForIntentAsUserInternal didn't return any apps for
the work profile when it's off. This change adds the
MATCH_DIRECT_BOOT_AWARE and MATCH_DIRECT_BOOT_UNAWARE
flags to the PackageManager#queryIntentActivitiesAsUser call.

Test: manual
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Fixes: 153338971

Change-Id: Iedf10d54953b94393c78d6357ce7e5216f3ba261
2020-04-06 18:22:33 +01:00
Curtis Belmonte
fc294e8603 Merge "Improve a11y for BiometricPrompt credential view" into rvc-dev 2020-04-06 17:06:09 +00:00
TreeHugger Robot
bc445710f5 Merge "Controls UI - Rename 'quick controls'" into rvc-dev 2020-04-06 16:57:32 +00:00
Tiger Huang
9808c60f53 Create input consumer only when nav bar is hidden by client
INPUT_CONSUMER_NAVIGATION could be created if navigation bar was hidden
no matter who made it invisible. If navigation bar is hidden by server,
we should not create the input consumer. Otherwise, there will be no
chance to dismiss it.

Fix: 152800955
Test: 1. Run automotive emulator.
      2. Click the textbox in Map on home screen to show soft keyboard.
      3. Check if the soft keyboard can be touched.
Change-Id: Id5af6f9f3512abc187f0fdfe883f264b35a95476
2020-04-07 00:41:22 +08:00
Chris Tate
7f7dff7268 Merge "Revert "Revoke 'always' web handler status when not autoverifying"" into rvc-dev 2020-04-06 16:39:03 +00:00
TreeHugger Robot
e234ca4a9c Merge "Import translations. DO NOT MERGE" into rvc-dev 2020-04-06 16:31:35 +00:00
Heemin Seog
e50fc87c70 Merge "Allow nav bar to consume touch events based on configuration" into rvc-dev 2020-04-06 15:52:58 +00:00
Lorenzo Colitti
879c0eb013 Refactor the Nat464Xlat function for simplicity.
This makes the code easier to understand by making state
transitions more explicit. It also makes it easier to address a
TODO to turn the class into a StateMachine.

This should be an exact no-op refactoring. The current cases
covered by the code (all mutually exclusive) are:

1. requiresClat && !isPrefixDiscoveryStarted
   Action: startPrefixDiscovery()
   Equivalent to IDLE && requiresClat, because
   isPrefixDiscoveryStarted returns true for every state except
   IDLE.

2. requiresClat && isPrefixDiscoveryStarted && shouldStartClat
   Action: start()
   Equivalent to DISCOVERING && shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but start() does nothing if mState is
   STARTING or RUNNING.

3. requiresClat && isPrefixDiscoveryStarted && !shouldStartClat
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !shouldStartClat,
   because isPrefixDiscoveryStarted is true in DISCOVERING,
   STARTING, and RUNNING, but stop() does nothing if mState is
   not STARTING or RUNNING.

4. !requiresClat && isStarted
   Action: stop()
   Equivalent to (STARTING or RUNNING) && !requiresClat,
   because isStarted() is only true in STARTING and RUNNING.

5. !requiresClat && !isStarted && isPrefixDiscoveryStarted
   Action: leaveStartedState()
   Equivalent to DISCOVERING && !requiresClat, because
   the only state with isPrefixDiscoveryStarted and !isStarted
   is DISCOVERING.

Also, simplify case #5. In this case, calling leaveStartedState
is superfluous, because in the DISCOVERING state:
- There is no need to call unregisterObserver, since the observer
  is only registered when entering STARTING and is unregistered
  when going back to DISCOVERING or IDLE.
- mIface and mBaseIface don't need to be set to null because they
  are only set to non-null when entering STARTING and nulled out
  when going back to DISCOVERING or IDLE.

Bug: 126113090
Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
Change-Id: Ice536bcb269cc8b040c6e7a72c15d0bc8b5bd235
2020-04-06 15:46:38 +00:00
Lorenzo Colitti
0fb584ba6f Migrate to TetherOffloadRuleParcel in IpServer
The netd tethering offload IPCs are changing from taking a list
of primitives to taking a TetherOffloadRuleParcel. Modify their
only caller.

Bug: 140541991
Test: atest IpServerTest
Merged-In: I83718c80ef9d31199c87021b4dd5821717fd5ba5
Change-Id: I83718c80ef9d31199c87021b4dd5821717fd5ba5
2020-04-06 15:45:58 +00:00
Lorenzo Colitti
06dcc327c6 Rename the *Nat64Prefix to *Nat64PrefixFromDns.
This just a rename with no functional changes at all. It is
preparation for supporting getting the NAT64 prefix from the
RA.

Bug: 150648313
Test: covered by existing ConnectivityServiceTest and Nat464XlatTest
Merged-In: Ia9a09a708870827b1e4cf068f930fa9542dd116c
Change-Id: Ia9a09a708870827b1e4cf068f930fa9542dd116c
2020-04-06 15:45:14 +00:00
JianYang Liu
ae86b3f16d Updated InsetsPolicy to read config_forceShowSystemBars and prevent
system bars from being hidden by applications if true.

Bug: 149233545
Bug: 151820910
Test: atest InsetsPolicyTest, manual
Change-Id: I2bc610c8388200c47efcbfedf6f24fe867a696ec
2020-04-06 08:14:45 -07:00
arangelov
66ac428cf9 Add bottom padding to empty state screens.
Fixes: 153281721
Test: manual
Change-Id: Ia1aacd89d3e49c578a1b5a32ac5dd909f9f850b3
2020-04-06 15:51:53 +01:00
Jorim Jaggi
a775f45d85 Merge "Revert "Revert "Defer updating InsetsSource.mFrame while animating""" into rvc-dev 2020-04-06 14:27:16 +00:00
Fiona Campbell
51e6f8ff26 Merge "Remove exclude filter on PowerManger test mapping" into rvc-dev 2020-04-06 14:24:30 +00:00
TreeHugger Robot
672950aa30 Merge "Fix an issue that restricted package is not printed if it has no ... allowed packages." into rvc-dev 2020-04-06 14:19:29 +00:00
TreeHugger Robot
04e287816f Merge "Limit stage install to system and whitelisted packges only (1/2)" into rvc-dev 2020-04-06 14:16:25 +00:00
TreeHugger Robot
f241f95205 Merge "Controls UI - Marquee + dynamic column count" into rvc-dev 2020-04-06 13:35:40 +00:00
Matt Pietal
54170e0757 Controls UI - Rename 'quick controls'
Per feedback, changing name to 'device controls' from 'quick controls'

Bug: 153200907
Test: manual
Change-Id: I0b570469979dbe10d08d803c9f45b6b547611115
2020-04-06 09:23:09 -04:00
Abhijeet Kaur
a32954ec22 Merge "Remove a TODO as no work needs to be done" into rvc-dev 2020-04-06 12:36:11 +00:00
Jorim Jaggi
33a2183d4b Revert "Revert "Defer updating InsetsSource.mFrame while animating""
This reverts commit 8c56ac6b945e4050d56968e2adac673e052b772d.

Underlying issue has been fixed:

Test: InsetsControllerTest
Bug: 152071027
Change-Id: I2b80de7067bf688a6b36233b9a1e92e2cf31c148
2020-04-06 14:28:59 +02:00
Matt Pietal
5f478c7f39 Controls UI - Marquee + dynamic column count
Make the controls more legible across different displays.

1. Support marquee in the status field to support long strings
2. Adjust margins for different dp devices
3. Dynamically adjust the max number of columns based on fontScale and
screen width in dp

Bug: 152765942
Test: visual, use different display/font sizes

Change-Id: I72665f1164ff30e0a5746adb9fdc89f00edd35d4
2020-04-06 08:06:51 -04:00