Breaks the dependency of SystemUIPlugins on ThresholdSensor
by introducing an intermediate interface.
Fixes: 186781915
Test: manual
Change-Id: Ib2633f8f2acaa1d21f1e8968317b4a4e63d3af32
Also integrate the FalsingManager, which is important for determining
user intent while on the lockscreen.
Fixes: 186219857
Test: atest KeyguardClockSwitchControllerTest
Change-Id: I22108ec2335bd350fbcaf5d5b90dd3b351011767
Pass dozeAmount values to the smartspace library to allow the lib to
make decisions regarding content on both AOD and Lockscreen
Fixes: 185598979
Test: manual, multiple smartspace cards
Change-Id: Ic7bc2ba238b22794a33e6db18c1aae0fa7c96e0b
This is largely for both AOD and lockscreen, while may have different
colors than launcher. Particularly for AOD, we need to transition to a
WHITE color. Set a primary text color, with expectations that a
secondary color will later be set in order to support cards with
various background colors.
Fixes: 185211979
Test: manual, change to AOD <-> LS
Change-Id: I36fb8e5cfcbac1ec999b2b9df08f42d47507990f
Method no longer takes `robustCheck` parameter. Instead,
FalsingManager#isSimpleTap is added for basic checking, and
FalsingManager#isTap does robust checking by default.
FalsingManager#isTap takes an enum value for penalty instead of
a double, making the value more understandable.
Bug: 172655679
Test: atest SystemUITests && manual
Change-Id: Ib4a99f87bcd6acee67a98420f460c98d44fa6360
This CL adds a generic way in GhostViewLaunchAnimationController to
change the corner radius of the expanding background. It does so by
supporting Gradient- and LayerDrawable (and therefore RippleDrawable).
This will be first used to animate the launch of the settings after long
clicking a QS tile (see ag/13988954), but this implementation will
hopefully work with other views as well.
This CL also adds the wiring in ActivityStarter that will be needed by
the QuickSettings.
Bug: 184121838
Test: Manual
Change-Id: I40f7048edd682d5d68c32b4439368d19009a8df1
This CL removes all logic specific to notifications in
ActivityLaunchAnimator, so that it can be reused for other launch
animations.
I would suggest to look at ag/14057092 in parallel to make more sense of
the abstractions added in this CL.
For the sake of not making this CL even bigger than it already is, a few
things still need to be done in follow-up CLs:
- Show the status bar icons at the right time, instead of at the end of
the animation, when using the StatusBarLaunchAnimatorController.
- Move the animation/ package outside of the SystemUIPluginLib library
and instead have it in its own reusable library.
- Replace the animation durations and interpolator to the latest
designs.
- Improve split screen by retrieving the final window bounds and
prevent the clipping of the window during the animation.
- Handle animations in the lock screen.
For review, I would recommend to review in order:
1. ActivityLaunchAnimator.kt
2. StatusBarLaunchAnimatorController.kt
3. NotificationLaunchAnimatorController.kt
4. GhostedViewLaunchAnimatorController.kt
5. Everything else.
Bug: 184121838
Bug: 181654098
Test: Tap a notification when the shade is open and unlocked.
Change-Id: If4c3c64fcd153bb8e89111f56332013ca6dff156
We fetch the wallet cards on handleUpdateState() of the Tile, if the
card image exists, it will be stored in the QS State and then pass to
the QSTileViewHorizontal so the card image will be presented on the
tile.
The car image won't show on the tile when the user is edittng the tiles.
Test: manually tested on device
locked - https://hsv.googleplex.com/5756150307880960
unlocked - https://hsv.googleplex.com/5767433589620736
Test: atest
Bug: b/182963608
Change-Id: I45bab06528a7154419ae73f9e576cf385bf0f7c1
User detail panel settings button will now say "Close" instead
of "Done"
Bug: 169783558
Test: atest SystemUITests
Change-Id: Ibafe212dce8a8b8654e877418200e1dc2c5dec8b
User detail panel settings button will now say "User settings" instead
of "More settings"
Bug: 169783558
Test: atest SystemUITests
Change-Id: I1a7a6963f15dbbf6ed8086113fa47f4662d8373c
Individual components of the lock screen are now simply in charge of
asking the FalsingManager to recognize certain types of gestures. If
they don't ask, the FalsingManager will assume they were accidental.
Once a certain number of accidental touches occur, an event is fired
that signals that the lock screen should be reset.
More tuning and adjustment to come, but this is now functional.
This also fixes a bug in an earlier cl where the bouncer would no
longer retract if touches outside of its region were detected.
Bug: 172655679
Test: manual
Change-Id: Iffd1c7e58365235b1b7dbdac0c74439ead1df9d3
This uses the HistoryTracker on pin-based input to determine if a
tap outside of an intended region is a false touch, retracting the
pin input if we believe pocket dialing is occuring.
To do this, the cl properly integrates the HistoryTracker into
falsing, at least for single taps.
Most importantly, HistoryTracker#falsingBelief now return 0.5 when
it is unsure if a tap is false or not, and tends towards 0 when it
believes it's valid and 1 when it believes it's false.
HistoryTracker#falsingConfidence remains unchanged.
Test: atest SystemUITests && manual
Bug: 172655679
Change-Id: Ie771b1bf8ac564af7ffb68e190772fff5c562e89
This CL updates the following:
* Tile height (QQS and QS)
* Tile margins (QQS, QS, and QSCustomizer)
* Animation between QQS and QS
* Single line for main label, secondary label
* Corner radius
* Label text size
Test: manual
Bug: 181673785
Change-Id: I8f2fb5929474b0493af33d8fa415353152a27c17
- Introduce config_keyguard_user_switch_opens_qs_details. When set to
true, the user icon that appears when config_keyguardUserSwitcher=true
will open the "user" QS panel instead of taking over the keyguard
- Add user icon positioning calculation to
KeyguardClockPositionAlgorithm
- Add option to QS DetailAdapter for turning off the circular reveal
animation
- Add callback to QS DetailAdapter for when "Done" button is pressed
- Fix typo: showDetailDapater -> showDetailAdapter
Test: Manual
Bug: 169783558
Change-Id: I50133feaf02ca0990c40aa9d8a046abd95ea9d4e
Puts Toast style/animation changes behind a FeatureFlag
Toasts can be added via Toast APIs OR legacy apps can add the
window directly. Because toast windows can be added directly by legacy
apps, DisplayPolicy.java requires that toast windows are removed
after TOAST_WINDOW_TIMEOUT. This also means Toast windows added via
the Toast APIs are subject to this timeout. Therefore, this CL also
increases the timeout by 600ms to account for SystemUI's in/out
toast animations.
Bug: 169587378
Test: atest ToastUITest
Test: manual, rotate device while toast is showing
Change-Id: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
Merged-In: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
Add flag to not show labels in QS. This also makes it show more rows.
Added a switch in customizer to toggle the setting.
Some visual issues when toggling (media player), fixed by collapsing and
reopening QS.
In user builds, can be toggled with:
`adb shell settings put secure sysui_remove_labels {0, 1}`
Test: manual
Change-Id: I750c53d918b2d9590ff86eed67d1932444390828
This institutes a HistoryTracker mechanism that will allow the
FalsingManager to take recent activity into account when classifying
gestures. The HistoryTracker returns a penalty that is pased to each
classifier for them to use when making decisions.
As of right now, no classifier actually uses the history penalty when
making a classification decision.
The HistoryTracker keeps records of the last 3 seconds of falsing
results, applying a decaying penalty to the results over time. It also
assigns a confidence to its results, based on how consistent they are.
Each individual classifier is also able to return a confidence score
now, such that, if they are not confident in their decision, they
don't throw off the score that gets stored in the HistoryTracker.
Confidences currently returned by the classifiers are somewhat
arbitrary and should be adjusted in future CLs.
Everything is currently open for adjustment:
- The length of history
- The decay function applied to history
- The method by which our confidence in the history is calculated
- The confidence returned by each individual classfier
- How the history penalty is taken into account by each classifier
- ... and probably more.
Bug: 172655679
Test: atest SystemUITests
Change-Id: Ief2a5144a0cda659c7d78ed6e489231d481b6872
- Update clock sizes (large clock = 200dp, small clock = 100dp)
- Update clock weights (large = 100-400, small = 200-300)
- Update clocks on time zone and time format changes
(Settings > System > Date & Time)
Test: manual, atest SystemUITests
Bug: 170228350
Change-Id: I446a2625fdd776c15e744f1601b3ea0e2a873cf1
This CL separates out the two roles of the FalsingManager. It
introduces the FalsingCollector, used by SystemUI to report events
that may be interesting to Falsing, such as touch events, sensor
events, and general user actions.
The FalsingManager, meanwhile, continues to support the methods
This helps breakup the monolithic FalsingManger into more manageable
pieces, reducing the API surface area of FalsingManager significantly.
Bug: 172655679
Test: atest SystemUITests && manual
Change-Id: I92f8e3747f5c4a04eaa64e1a8b626c2a07c480aa
This moves some of the functionality of DoubleTapHelper into the
FalsingManager. This also gives the FalsingManager an opportunity to
approve single-taps.
Currently, all single-taps are rejected, but future work may enable
single-tap falsing.
DoubleTapHelper is renamed to NotificationTapHelper to better reflect
its purpose.
The FalsingManager now maintains a record of past gestures for
analysis, wherease prior it only ever kept the most recent tap.
Bug: 172655697
Test: manual && atest SystemUITests
Change-Id: I58f3d25881b0a3ce14e47b72287dd6a1a9307852
Allows Toasts that route through SystemUI to be implemented by a
ToastPlugin. This CL also adds the ability for plugins to create a
custom animation for when the toast shows and hides.
Also adds logging for Toasts that get routed through SystemUI. By
default, these logs aren't logged to logcat but can be enabled via adb (see
LogBuffer.kt).
To dump ToastLog:
adb shell dumpsys activity service com.android.systemui/.SystemUIService ToastLog
Bug: 169587378
Test: manually add CustomToastPlugin
Test: atest ToastUITest
Change-Id: I0a0b16fdc2a5ba1908054197f6dc6728f10a0d2e
When adding the stock tiles for TileAdapter, TileQueryHelper will set
them to listening for a brief period of time to refresh the state and
show the current state. It used to work because all the operations were
done in the background thread.
After switching the lifecycle logic to the main thread, there was a race
condition preventing the new state (between RESUMED and STARTED) to be
collected before it was copied.
This CL adds a class TileCollector that will wait until all tiles have
properly refreshed at least once before collecting their state.
Test: manual
Test: atest TileQueryHelperTest
Fixes: 168444501
Change-Id: I5f356ae4648e837cbe1bcdbaec9ba6d5b7c09891
This ensures that the falsing manager always is testing against the
correct interaction type when it is asked. Prior to this change, we
could end up in states where a user was swiping down (opening the
quick settings) but the falsing manager believed the user was trying
to unlock the phone.
Fixes: 160967364
Test: atest SystemUITests && manual
Change-Id: I176f54a768622dec3e758a7f01ed8aec26223648
Create OnUserInteractionCallback (to repace OnDimissCallback) which will
handle user interactions with notifications (ExpandableNotificationRow)
and send this information to the relevant notification pipeline.
While we still have both notification pipelines in SystemUI, the new
pipeline will use a VisualStabilityManagerStub (used by
HeadsUpManagerPhone and MediaCarouselController) since the view layer no
longer needs visual stability since this will be taken care of by the
VisualStabilityCoordinator in the data-layer. Once we migrate to the new
pipeline, the legacy VisualStabilityManager + Stub should deleted.
Notes:
- Currently only one coordinator can attach a visual stability manager
or an IllegalStateException will be thrown.
- The suppressed group and section changes are logged in the
suppressedAttachState on the ListAttachState object on each entry.
- Currently we do not suppress the ordering of children as part of the
new VisualStabilityCoordinator; however the old pipeline does
suppress ordering.
Test: atest VisualStabilityCoordinatorTest
Test: SystemUITests
Change-Id: Ia26844ba885ac9ed3b8526af82e772f19e5dcd19