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
Made CarSystemUIBinder and CarSystemUIRootComponent public to allow
injection in AAECarSystemUI
Bug: 152991117
Test: Treehugger passes
Change-Id: Ica3ac2a61e009c687d4afb847d132a8a0d4fd5eb
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
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
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
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
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
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
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
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
Empty audio_recording_disclosure_exempt list (moving content to an
overlay)
Bug: 152559914
Test: make
Change-Id: I0d165ce2b96c9e71b8ca0587f5917cfd9cc29649
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
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
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
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
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
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
system bars from being hidden by applications if true.
Bug: 149233545
Bug: 151820910
Test: atest InsetsPolicyTest, manual
Change-Id: I2bc610c8388200c47efcbfedf6f24fe867a696ec
Per feedback, changing name to 'device controls' from 'quick controls'
Bug: 153200907
Test: manual
Change-Id: I0b570469979dbe10d08d803c9f45b6b547611115
This reverts commit 8c56ac6b945e4050d56968e2adac673e052b772d.
Underlying issue has been fixed:
Test: InsetsControllerTest
Bug: 152071027
Change-Id: I2b80de7067bf688a6b36233b9a1e92e2cf31c148
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