When bubbles are expanded or if the user dismisses the notification, the
notification associated with the bubble is suppressed from the shade, but
still technically active / in active notification list because of the
bubble.
We already have a concept of this with isNotificationSuppressed on
BubbleMetadata, this just ensures that the flag is properly updated when
the state changes in System UI. This allows other things showing
notifications (e.g. long press on launcher app icon -> see notifs) to
hide or show notifications consistently with the rest of system ui.
I'm re-using the flag that apps may set to suppress notifications when
they send a bubble that is foreground, since its the same concept.
When this flag state changes a new update is sent with the flag
adjusted.
Added a notification delegate method to communicate the suppression changes
back to NoMan. This is piped through a listener set on Bubble objects.
Test: atest NotificationManagerTest NotificationTest NotificationManagerServiceTest
Bug: 131926652
Bug: 144352570
Change-Id: I25e86849858cdfe2fb81ab51b1ff09980bf70944
This CL does following updates for the ConnectivityUtil class:
1. Remove the current profile check from location permission
check since it's not related to location permission check.
2. Makes all the checking functions to static to avoid memory
allocation
3. Rename the class from util to checker.
Bug: 148180968
Bug: 148232681
Bug: 148233000
Test: atest FrameworksNetTest
Change-Id: Ibf8879fe7dbcecdf766b959cb052d4d825b9b24c
- Move TraceBuffer to sysui-accessible package, and make it generic
to support both lite and nano proto callers
- Expose shell command to start/stop sysui tracing
Bug: 144854916
Test: atest TraceBufferTest
Change-Id: Id117024d943f148a91631fd9fcae1fd70fca8ab5
In order to do that, NotificationManager now calls
StatusBar.showToast(), which is in SystemUI. StatusBar then calls a new
component, ToastUI, which is responsible for rendering the toast. The
code for rendering the toast was extracted from the Toast class, so it
should behave identically.
Also refactored the code a bit on NotificationManagerService, creating
two children of ToastRecord (one for custom, other for text toasts).
The change is gated in Toast class in this CL, but it's also gated on
the system server, so apps can't circumvent the background block.
Bug: 128611929
Bug: 144754526
Test: atest android.widget.cts.ToastTest
Merged-In: Id0021cdc6f72f41b55ff1c5a4f09ae7687586460
Change-Id: Id0021cdc6f72f41b55ff1c5a4f09ae7687586460
The CarStatsPuller class is not needed because CarStatsService will now
directly register the VMS_CLIENT_STATS puller with StatsManager.
Test: m -j
Bug: 148123503
Change-Id: Icd46af829c8f559315f72feab1eda3b687c57148
Bug: 142537267
Bug: 142538125
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Test: manually share with personal and work apps from both
the personal and work profiles.
Change-Id: Icdda0e760898d895f69befa963d14c370374d1a1
Shadows are generated on PiP and Freeform windows by setting an
elevation on the window's DecorView. The elevation is passed back
to wm as surface insets to generate a large enough surface for the
client to draw its content and render shadows around it.
This cl introduces a new settings which overrides the setElevation
call in DecorView and sets a shadow on the task surface. The
elevation of the DecorView and the surface insets will remain unset.
Add a surface crop to the task surface so we have proper bounds
to draw shadows.
Test: go/wm-smoke
Bug: 136561771
Change-Id: Icc45e4fac3d495df5272d2e5f37163b9e7caeb4c
Add a method to screenshot helper that allows the caller to provide the
bitmap to be treated as a screen shot.
First use Overview can provide a task snapshot to use as a screenshot.
Test: update tests, local
Bug: 145297320
Change-Id: I4d21906212797bf394094d7a29208be02a6bfd7e
Currently both tabs are disabled under the
ENABLE_TABBED_VIEW flag until other issues are fixed.
Things this CL does:
- Add personal and work tab if there is a work profile on device
- Load the sharesheet/intent resolver targets when we
open the relative tab, and only load it the first time
- Always first show the tab for the current profile, e.g. for
work profile we show the work tab first
- Disable ViewPager manual swiping
- Remove resolver list horizontal dividers
- Always show the current profile's last opened app
recommendation
Tests are in the follow-up CL.
Bug: 142537267
Bug: 142538125
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Test: manually share with personal and work apps from both
the personal and work profiles.
Change-Id: Ie02c6b1d46b30facc9f1b04691cbcdd4e06b0fa9
This commit adds the fields required to support IKEv2/IPsec VPNs. Other
fields will be reused where possible.
Bug: 143221465
Test: Compiles, new tests written for parcel/unparcel, encode/decode
Change-Id: I4c0e8fb934e75548424a15bbfb35c2ea9a3a57bc
dumpProto() currently does not dump any processes unless "dumpsys
cpuinfo" is called first, because we did not call buildWorkingProcs
in dumpProto().
Bug: 146086163
Test: Build and dumpsys cpuinfo --proto
Change-Id: I992eff6f429397424165277b7145cef295571982
Added ability for AlwaysOnHotwordDetector to support async enrollment
performed outside of support detected through KeyphraseEnrollmentInfo.
Bug: 147159435
Test: tested enrollment and availability is updated when enrolling
outside of KeyphraseEnrollmentInfo
Change-Id: Ia5d71e90c062ac100d4c6df760acf0d41920853e
Since we have a better approach of fitting content instead of
setting them on the layout params
(Window.setContentOnApplyWindowInsetsListener), we can now
simplify forcing of filling the screen:
Instead of clearing the fit types when the private flag is set, we
unset the types and straight out reject any params when the client
would like to fit.
Test: DisplayPolicyTests
Bug: 118118435
Change-Id: I845e6b1c81e29ab66a770891d03c62a32418e8cc
For testing, this feature can be enabled per-application with
adb shell am compat 135754954 <app.name>
Bug: 135754954
Bug: 147147490
Test: malloc() returns tagged pointer with the feature enabled
Change-Id: I067b4ba6f5fbfcb8287f0cc07d17978dbe708806
The suspending app can specify if they want to unsuspend the app on
neutral button tap. This needs to be done by the system so as to
maintain continuity of the users activity tasks.
The system then also needs to communicate to the suspending app when
such an unsuspend has taken place so it can keep any of its internal
data consistent with the current state.
Test: atest FrameworksServicesTests:PackageManagerSettingsTests
atest FrameworksServicesTests:SuspendDialogInfoTest
atest GtsSuspendAppsTestCases:SuspendPackagesTest
Bug: 134962563
Change-Id: I587b2643eb41519b82b8e2b371a466a9fb650d4b
For cases where we can't show images, show "Image inserted" text instead. This will happen for work profile notifications, and for notifications that don't use MessagingStyle.
Test: Updated unit tests for NotificationRemoteInputManagerTest to use new RemoteInputHistoryItem structure, and to ensure support for URIs and mime types. Manual testing to ensure images appear in notification history for MessagingStyle notifications under the primary user, and that "Image inserted" appears for work-profile and non-messaging notifications.
Change-Id: I254b579aa710337039a7def6880f14a61bbd4d53
When root-level content containers fit insets, they used to just
apply and consume the entire system insets. However, with the new
Inset APIs, and with deprecating ADJUST_RESIZE IME flag, we want
to give apps an easy way to customize this behavior.
For that, we introduce Window.setOnContentApplyWindowInsetsListener
that returns what kind of margins/padding should be applied and
what should be dispatched to the content views. This is essentially
a replacement for SYSTEM_UI_FLAG_LAYOUT_* as well as
SOFT_INPUT_ADJUST_RESIZE: It allows apps to choose which insets
should be handled on the window level vs view level.
For that, we mark the window decor views as
FRAMEWORK_OPTIONAL_FIT_SYSTEM_WINDOWS, in order to distinguish the
case when support library calls makeOptionalFitSystemWindows(). This
is because of two reasons:
- We don't want the listener to be invoked twice.
- We can not do the compat ping-pong between onApplyWindowInsets
and fitSystemWindows. This is because during the ping-pong, the
result of the OnContentApplyWindowInsetsListener would be lost.
However, we still need to do the compat ping-pong for
ActionBarOverlayLayout in the support library (until that gets
migrated to use onApplyWindowInsets), so we have this separate
dispatching path that only gets used for framework optional
fitting views.
Test: WindowTest
Bug: 118118435
Change-Id: I4b514addd9e094163062d651972f85615b4a35db
It takes time from when IME is requested to the time when IME is ready
to be shown. When its ready to be shown, we need to make sure that
window that requested IME is still the IME target in DisplayContent. The
only realistic way of knowing originating window is passing windowToken
from IMM API.
Bug: 111084606
Test: CtsInputMethodTestCases
Change-Id: Ia49e23dd077d264a58d28a7b8acffde54b7db187
Also adds InstanceIdSequence infrastructure for generating them, and
fakes for testing.
Bug: 144022566
Test: atest SystemUiTests
Change-Id: Iac524f50a177a77224711585d5127b8f5bb280f1
1. Fix that magnification has different access format from others into setting provider.
- Replace String with ComponentName
2. Remove legacy png and replace it with vector drawable.
3. Revise strings.
4. Fix that shouldn't remove legacy target item when software button triggered.
Bug: b/147389656
Test: manual test
Change-Id: I733959702b2d520f73a759ec90a20b39193a417b