This event occurs when the user clicks through to modify notification
interruptiveness. Also add test for logging.
Bug: 121380248
Test: atest SystemUITests and manual verification
Change-Id: I5d1876ce79188a457f264eb71f8bd5709944483b
To measure the CTR of smart suggestions in notifications we need to log
when smart suggestions become visible. With this CL we add a
notification location log tag to know where a notification is displayed.
In this way we know which smart suggestions are shown in a heads-up
notification vs. the notification shade.
Bug: 120767764
Test: atest SystemUITests
Test: manually ensure notification surface is logged when a heads-up or
a notification in the shade is shown (and expanded).
Change-Id: Ia738f17ee6c47147b44639657dd0c1c352b4f314
Plugins might be initialized before the StatusBar service is ready.
This means that #setForcePluginOpen might be called before #add.
Test: atest StatusBarWindowControllerTest
Change-Id: I99a220521272a2348ecece4c4581e7c82fa79490
Fixes: 123051520
To know from what UI location a notification was expanded we here pass
the location of the notification through
onNotificationExpansionChanged().
Bug: 120767764
Test: atest SystemUITests
Test: atest NotificationManagerServiceTest
Change-Id: I20612f5a88cf987f434392ae7a004d3ee3098998
This is in preparation for adding more logic related to docked state.
Bug: 122301289
Test: Used adb to switch between custom clock faces.
Change-Id: I0a13ef4e5894df1280a04c5a9df8bbed8054557b
In order to keep the same action to wake up device when docked, it
should enable double tap sensor even though the setting is off.
The miss-touch can be ignored when docked.
Bug: 123057133
Test: atest SystemUITests
Change-Id: I67dec8b3ae51f46c50570eaec0250c1aa1dc8bb9
Keep surface size large enough to draw the image.
When we shrink for small image, we still maintain its aspect ratio.
Fix: 123108383
Test: atest ImageWallpaperTest
Test: manual verify aspect ratio not changed after rotate.
Test: manual put a small image as wallpaper and see surface size won't
grow too much.
Change-Id: Icf3bc4a3129d9aecba2b57c620f378b9d9d7374b
For system (assistant) generated smart replies we want to ensure the
replies don't seem biased (see example [1]). Therefore we here add an
experiment flag that determines the minimum number of replies N to show
in a notification. If we can't fit N replies into the notification we
remove all replies from that notification (i.e. we show zero replies).
[1] Example of biased replies:
Message: "Hi, how are you?"
Replies: "Good", "Great!", "Bad"
using only one reply here ("Good") might be seen as biased.
Bug: 120779592
Test: atest SystemUITests
Test: call "adb shell settings put global
smart_replies_in_notifications_flags enabled=true,min_num_replies=X" for
different values of X and ensure the behaviour is correct.
Change-Id: I898850f7895d0fd43ec6788095162f3138cd62cb
Android implements many complex text-related operations as per-user
out-of-process services. Notable examples are:
* InputMethodServices
* SpellCheckerService
* TextClassifierService
* AutofillService
For service client processes to connect to the right user's services
often the system assumes that a process that runs as user X should
connect to services that run as user X. While this approach works for
most of cases, there is at least one exception, System UI, which
always runs as the primary user (unless the device enables special
mode e.g. UserManager.isSplitSystemUser()) no matter who is the
current foreground user.
In order to deal with this special case, we recently introduced an
@hide API TextView#setTextOperationUser() [1] to centralize cross-user
special logic inside TextView. With this CL, KeyguardPasswordView and
RemoteInputView actually start calling it.
Note that TextView#setTextOperationUser() already takes care of IMEs
and SpellCheckers hence those two operations start working as expected
with this CL. Once TextView#setTextOperationUser() start taking care
of other operations such as text classification and clipboard,
KeyguardPasswordView and RemoteInputView will be automatically taken
care of with no code change.
[1]: I6d11e4d6a84570bc2991a8552349e8b216b0d139
401e3d4c842ce86569de4477138137dc07a6aa6f
Fix: 120744418
Fix: 123043618
Test: atest SystemUITests
Test: Manually tested Bug 120744418 scenario as follows.
1. Build and flash an AOSP build
2. adb root
3. adb shell setprop persist.debug.per_profile_ime 1
4. adb reboot
5. Install Test DPC
6. Enable managed profile with Test DPC
7. make -j SoftKeyboard
8. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
9. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
10. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
11. make -j EditTextVariations
12. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
13. adb shell am start --user 0 \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
14. Tap the menu icon on the EditTextVariations then click "Direct Reply"
15. adb shell am start --user 10 \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
16. Tap the menu icon on the EditTextVariations then click "Direct Reply"
17. Open notification shade.
18. Tap reply icon on "Message from UserHandle{0}".
19. Make sure that SoftKeyboard Sample IME is shown.
20. Tap reply icon on "Message from UserHandle{10}".
21. Make sure that AOSP Keyboard is shown.
22. Tap reply icon on "Message from UserHandle{0}" again.
23. Make sure that SoftKeyboard Sample IME is shown again.
Test: Manually tested Bug 123043618 scenario as follows.
1. Build and flash an AOSP build
2. Create a secondary user then switch to it.
3. make -j SoftKeyboard
4. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
5. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
6. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
7. make -j EditTextVariations
8. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
9. adb shell am start \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
10. Tap the menu icon on the EditTextVariations then click "Direct Reply"
11. Tap reply icon on "Message from UserHandle{10}".
12. Make sure that SoftKeyboard Sample IME is shown.
13. Type "ggggg" then hit the space key.
14. Make sure that red underline is drawn under "ggggg"
15. Make sure that AndroidSpellCheckerService runs as user 10.
Test: Manually tested multi-user scenario with per-profile mode as follows.
1. Build and flash an AOSP build
2. adb root
3. adb shell setprop persist.debug.per_profile_ime 1
4. adb reboot
5. Create a secondary user then switch to it.
6. make -j SoftKeyboard
7. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
8. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
9. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
10. make -j EditTextVariations
11. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/EditTextVariations.apk
12. adb shell am start \
-n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
13. Tap the menu icon on the EditTextVariations then click "Direct Reply"
14. Tap reply icon on "Message from UserHandle{10}".
15. Make sure that SoftKeyboard Sample IME is shown.
16. Type "ggggg" then hit the space key.
17. Make sure that red underline is drawn under "ggggg"
18. Make sure that AndroidSpellCheckerService runs as user 10.
19. Set up a text screenlock.
20. Turn off the display.
21. Turn on the display.
22. Make sure that SoftKeyboard Sample IME is shown.
Change-Id: Ibabe13e5b85e5bb91f9f8af6ec07c395c25c4393
is visible to users.
For example, if the notification is expanded in the background,
onNotificationExpansionChanged will be called only when the expanded
notification is visible to users.
Reason: we should only care about expansion change that is visible
to users, and at the moment that it is shown to user.
This also allows us to determine "has been visually expanded"
easily. With this change, our NotificationAssistantService can know
whether a notification has been visually expanded and calculate the CTR
of smart actions accordingly.
This should not break existing stuff in NMS.onNotificationExpansionChanged
because codes there checked isUserAction == True anyway,
which means the change must be also visible to users.
BUG: 120803809
Test: atest ExtServicesUnitTest
Test: atest ExpansionStateLoggerTest
Test: Manual test, try to expand and collapse notification.
Change-Id: Ibc6f939b2560b845de6a8a35b4557423b8a074f7
I meant to bubble anything with valid bubble metadata intent but in
ag/6004126 however I missed a spot.
Crash was just wrong layout casting; the code is a little awkward
but I'm planning on refactoring it in future CL so it'll be better
just want to not crash sooner :)
Test: atest BubbleControllerTest
Bug: 123077807
Change-Id: I6d85d24cd7fc54db062a71404d64b719f2f35009
Test: wake up with power
Test: look at shelf on lock screen
Test: lock device w/ notifications from home screen
Test: receive notification on AOD
Test: atest KeyguardClockPositionAlgorithmTest
Test: atest NotificationRoundnessManagerTest
Test: atest ScrimControllerTest
Test: atest NotificationContentViewTest
Bug: 111405682
Change-Id: I9b4f2febd56a62256124567bffebc9f5f8255847
New scrim opacity - 20% - and also keeping the pulse state bright,
so it's more similar to lock screen.
Bug: 111405682
Test: visual
Test: atest ScrimControllerTest
Change-Id: Iecf86f5eeb5fcab9ada198e97f7da2f4e362e22f
OnMenuEventListener logs, so that we get the information on which
notification the user interacted with.
Bug: 121380248
Test: atest SystemUITests:com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutTest and manual testing
Change-Id: I914557250bed517d2e84fdc5ea3262ab0b062d5d
This CL introduces a new configurable sensor type: config_dozeTapSensorType
Test: atest SystemUITests
Test: set config_dozeTapSensorType to double tap gesture on overlay
Bug: 121198822
Bug: 111414690
Change-Id: I54f3c20473a6d97c860ee02f324edbcf89ba85d1
* BubbleMetadata encapsulates necessary info to display a bubble
* Replaces app overlay intent usages with BubbleMetadata
* Renames existing bubble APIs to use 'bubble' rather than 'app overlay'
Bug: 111236845
Test: existing tests pass
Change-Id: I6a85d3c41dda47139fb8d960cadf1c8e109cf29b
The added logging events are: blocking helper view displayed or
dismissed, any button click within the view, undo clicks and
system suggests of blocking helper.
* Move some of the getLogMaker logic of server's NotificationRecord
class to the common StatusBarNotification class.
* Use the StatusBarNotification.getLogMaker to produce blocking helper
logging.
* Add logging in the NotificationInfo for interaction and display of
the blocking helper view.
* Add logging in the NotificationBlockingHelperManager for system
suggests of blocking helper.
Bug: 112482290
Test: unittests and manual - viewed produced logs.
Change-Id: I3a5267d55faba21f6668d35ff8aa12deb0dc5921
Whenever there's a custom clock, notification icons should be on the top
left. The default clock will just show the dark shelf.
Test: atest NotificationStackScrollLayoutTest
Test: atest CollapsedStatusBarFragmentTest
Test: visual - with and w/o clock plugin
Test: visual - with and w/o RTL layout
Bug: 122301289
Bug: 111405682
Fixes: 120563185
Change-Id: I4c513d347f656262ee6f91bd208ab9f219e4419c
Also matched launcher with the stabilization flag only used for the new
quick step swiped right to left and vice versa.
Bug: 112934365
Test: atest QuickStepControllerTest
Change-Id: Ia6801f96e60c8764448bca6667b93846ef637318
Move a few things from NotificationEntryManager into it.
This class will (hopefully) eventually replace *NotificationPresenter
as the main "controller" class for the notification shade. This will
allow us to centralize all of our universal controller code into one
place. The controller defer certain method calls to platform-specific
objects (what remains of the NotificationPresenters).
Test: atest
Change-Id: Ic729014f1bef825b635ced86ffb825b5734ad562
* Introduces BadgedImageView / BadgeRenderer for icon & badging
-> These are both semi-temporary until I move things over to using
icon library
* Introduces "shouldShowInShade" bit on NotificationData, this is used
to indicate whether a bubble's notification should display in the
shade or not
* BubbleController uses NotificationEntryListener to annotate notifs
bubble state & add / update / remove bubbles
* Cleans up expansion / dismissing / visibility in BubbleController
General notif / dot / bubble behaviour:
* When a bubble is posted, the notification is also in the shade and
the bubble displays a 'dot' a la notification dots on the launcher
* When the bubble is opened the dot goes away and the notif goes away
* When the notif is dismissed the dot will also go away
* If the bubble is dismissed with unseen notif, we keep the notif in shade
go/bubbles-notifs-manual has more detailed behavior / my manual tests
Bug: 111236845
Test: manual (go/bubbles-notifs-manual) and atest BubbleControllerTests
Change-Id: Ie30f1666f2fc1d094772b0dc352b798279ea72de
Previously the test was marking entries as 'isBubble' automatically which
isn't quite correct.
This CL fixes that and has the side effect that enables bubbles for real.
This doesn't auto-bubble any notification, however, if the notification
is on an appropriately noisy channel & has an app overlay intent we will
bubble it.
Bug: 111236845
Test: atest BubbleControllerTest
Change-Id: I26c67ce002eec808591d7864b2366bb4140be386