Commit Graph

21300 Commits

Author SHA1 Message Date
Sungsoo Lim
98955b03de Merge "Use MediaSession.Token instead of ISessionController" 2019-01-23 02:32:10 +00:00
TreeHugger Robot
1655f9896f Merge "Fix image wallpaper distortion after rotate." 2019-01-23 02:01:16 +00:00
TreeHugger Robot
4b06dcba98 Merge "Applies friction to non-dismiss drag only after the snap point." 2019-01-23 01:26:10 +00:00
Nick Kralevich
2280c5d8ae Merge "UsbDebuggingActivity.java: OK -> Allow" am: f9718dbe17 am: 56ed214f67
am: 889ff4966b

Change-Id: I54ce67321abe0d058920c96298d97e6cc2834b09
2019-01-22 15:38:34 -08:00
Nick Kralevich
889ff4966b Merge "UsbDebuggingActivity.java: OK -> Allow" am: f9718dbe17
am: 56ed214f67

Change-Id: Ieec3c59499c3a3770d92a52866aa324df1ce0473
2019-01-22 15:28:39 -08:00
TreeHugger Robot
f749198d19 Merge "Add exp flag for min number of sys gen smart replies in notifications" 2019-01-22 22:36:37 +00:00
TreeHugger Robot
073291142a Merge "Do not crash NearestTouchFrame when views are not attached to window" 2019-01-22 21:14:19 +00:00
Lucas Dupin
a47310fde0 Merge "Fix StatusBarWindowController initialization NPE" 2019-01-22 20:34:12 +00:00
TreeHugger Robot
cc249beb0d Merge "Add notification location to onNotificationExpansionChanged." 2019-01-22 19:15:01 +00:00
Mady Mellor
9c79041cc6 Merge "Fix layout crash & bubble anything with valid bubble metadata intent" 2019-01-22 18:44:38 +00:00
TreeHugger Robot
a0602f3eba Merge "Move plugin and settings logic out of KeyguardClockSwitch." 2019-01-22 18:21:01 +00:00
Lucas Dupin
42ebe5486f Fix StatusBarWindowController initialization NPE
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
2019-01-22 09:49:03 -08:00
Gustav Sennton
a8e38aa5d0 Add notification location to onNotificationExpansionChanged.
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
2019-01-22 17:12:22 +00:00
Lucas Dupin
a54251feab Merge "Do double tap detection to wake up device while docked." 2019-01-22 17:04:27 +00:00
Robert Snoeberger
15b4af1943 Move plugin and settings logic out of KeyguardClockSwitch.
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
2019-01-22 11:32:40 -05:00
Sungsoo Lim
af7d46c117 Use MediaSession.Token instead of ISessionController
ISessionController will be moved to mainline module.

Test: pass MediaSessionTest and MediaControllerTest
Change-Id: I45b4da502e2b262730255a6cda1ab932d154ecbd
2019-01-22 21:46:12 +09:00
lpeter
8a5f470c01 Do double tap detection to wake up device while docked.
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
2019-01-22 20:27:57 +08:00
wilsonshih
3b2683a668 Fix image wallpaper distortion after rotate.
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
2019-01-22 12:03:25 +08:00
Gustav Sennton
a31f6aede1 Add exp flag for min number of sys gen smart replies in notifications
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
2019-01-21 15:03:26 +00:00
TreeHugger Robot
96583d40d1 Merge "onNotificationExpansionChanged is called only when the expansion change... is visible to users." 2019-01-21 12:07:26 +00:00
Gustav Sennton
a8b23abc66 Merge "Remove smart actions accessibility TODO - this works fine already." 2019-01-21 10:56:55 +00:00
Yohei Yukawa
7276946b92 Use setTextOperationUser() in KeyguardPasswordView and RemoteInputView
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
      401e3d4c84

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
2019-01-20 09:28:08 -08:00
Tony Mak
202f25d62a onNotificationExpansionChanged is called only when the expansion change...
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
2019-01-20 09:39:01 +00:00
Lucas Dupin
6d0c7aff5d Merge changes from topic "q_pulse_por"
* changes:
  New pulsing notification layout
  Light scrim on pulsing state
2019-01-19 00:28:39 +00:00
Mady Mellor
edd4ee1e82 Fix layout crash & bubble anything with valid bubble metadata intent
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
2019-01-18 14:48:40 -08:00
TreeHugger Robot
384ec0297c Merge "Inject motion event for temporary fix for clicking through nav bar" 2019-01-18 22:05:25 +00:00
Lucas Dupin
00be88f1fd New pulsing notification layout
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
2019-01-18 13:57:04 -08:00
TreeHugger Robot
90c7d2155f Merge "Fixes NPE in NSSL.getTopOrSectionTop()." 2019-01-18 21:31:38 +00:00
Lucas Dupin
3d36dd83a9 Light scrim on pulsing state
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
2019-01-18 12:30:06 -08:00
Matthew Ng
8181876d88 Do not crash NearestTouchFrame when views are not attached to window
Change-Id: I6f4d086dc6aabee1d519794e86dbe5c0df8b6bfc
Fixes: 121212324
Test: atest NearestTouchFrameTest
2019-01-18 12:07:58 -08:00
Gus Prevas
7c7f8c2c88 Fixes NPE in NSSL.getTopOrSectionTop().
Change-Id: Ia2847fb4240d57d321ffbf6be5e0d96b455c845d
Fixes: 122707526
Test: manual
2019-01-18 14:21:19 -05:00
TreeHugger Robot
87b2394a7b Merge "Use full Notification LogMaker in NotificationStackScrollLayout OnMenuEventListener logs, so that we get the information on which notification the user interacted with." 2019-01-18 16:16:38 +00:00
Gustav Sennton
c48f5f4320 Remove smart actions accessibility TODO - this works fine already.
Bug: 120826373
Test: Use TalkBack and touch smart actions - the reader reads out the
title of the buttons. E.g. "open button".
Change-Id: Idc754e15b6798a3c67c2f98954c4c7f235bc511c
2019-01-18 16:03:05 +00:00
TreeHugger Robot
2b8e3132f5 Merge "Prevent launcher gestures when back/assistant have activated" 2019-01-18 02:59:24 +00:00
Mady Mellor
524074366a Merge "Fix fullscreen intent notifs" 2019-01-18 02:52:15 +00:00
Matthew Ng
11891c9993 Inject motion event for temporary fix for clicking through nav bar
Bug: 112934365
Test: manual
Change-Id: Iab15d25088b1c540492da9dc671bbdf7ac58affb
2019-01-17 16:59:18 -08:00
TreeHugger Robot
be35c16844 Merge "Add custom typographic clock face." 2019-01-18 00:52:29 +00:00
Mady Mellor
18cc09758d Fix fullscreen intent notifs
Regression introduced in ag/5626242 (this CL basically just reverts the one
relevant file)

Bug: 122936859
Test: Set timer notification, ensure timer notification shows as fullscreen
      on lockscreen
Change-Id: I77f6fcbfecb0ae7880dfefeac6d009a8cf063000
2019-01-17 16:46:37 -08:00
Matthew Ng
af7fc1503b Prevent launcher gestures when back/assistant have activated
Do not proxy anymore motion events after back or assistant has started
so that the launcher does not try to execute quick step if the user
swipes a gesture followed by swiping up.

Test: manual
Bug: 112934365
Change-Id: I6711b52e7870193051afd38704fa0be86ad242b8
2019-01-17 16:23:34 -08:00
TreeHugger Robot
3a1d61d772 Merge "Redraw minute hand when paint is updated." 2019-01-17 23:23:41 +00:00
TreeHugger Robot
32c722f9b6 Merge "Slide custom clock face up when pulling up the bouncer." 2019-01-17 22:29:20 +00:00
Will Brockman
e718d5891e Use full Notification LogMaker in NotificationStackScrollLayout
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
2019-01-17 16:38:38 -05:00
Robert Snoeberger
f4e5f39bb7 Redraw minute hand when paint is updated.
Bug: 123029363
Test: Minute hand color switches between AOD and lock screen.
Change-Id: I7fde1eb1220fb0f049b57742446b093864852532
2019-01-17 16:12:37 -05:00
Gus Prevas
c4e68d466b Applies friction to non-dismiss drag only after the snap point.
This change modifies SwipeHelper such that the friction applied to a
constrained gesture (i.e. one that won't dismiss the swiped object) is
only applied once the object has been dragged past a threshold defined
by the callback object.  The callback provided by
NotificationStackScrollLayout is modified to set this threshold at the
snap point of the active menu row.

Change-Id: Ide9261682963d3cfaeb470e08393c182d6fa06c6
Fixes: 123021652
Test: atest SystemUITests, manual
2019-01-17 15:45:21 -05:00
Robert Snoeberger
1e58072990 Slide custom clock face up when pulling up the bouncer.
Bug: 123023280
Test: Pulled up the bouncer.
Change-Id: Ic2a22f35cc278342d1806faba8ff96e4d4d456c2
2019-01-17 15:44:35 -05:00
Robert Snoeberger
ce8c204eac Add custom typographic clock face.
Bug: 122301289
Test: Used adb to enable clock face.
Change-Id: I052367c9671697f621cba4ecb7e6b21c0cec784c
2019-01-17 14:27:37 -05:00
Michael Groover
e3ecbde6c0 Merge "Resolve NPE for long click on Sensors Off tile" 2019-01-17 17:30:33 +00:00
Ned Burns
50d11bf08b Merge "Create NotificationListController" 2019-01-17 16:12:25 +00:00
Aaron Heuckroth
184af56de9 Merge "Extract GlobalActionsLayout to an abstract class." 2019-01-17 15:31:38 +00:00
TreeHugger Robot
e2cc1106bf Merge "Fix the state cannot transition to DOZE_PULSING while docking." 2019-01-17 11:19:59 +00:00