diff options
| author | Matthew Ng <ngmatthew@google.com> | 2018-05-04 15:42:54 -0700 |
|---|---|---|
| committer | Matthew Ng <ngmatthew@google.com> | 2018-05-09 17:48:33 +0000 |
| commit | 6317df6e1e7bc1338089c8402efadccb39201aba (patch) | |
| tree | 63d77c995d7c8368bb8220f24ddb62b732c841b4 /core/java | |
| parent | a5f20a8df4900fe846fe74b7182666185223faf5 (diff) | |
Update the snap targets in minimized mode to reflect the correct targets
In minimized mode there is only 1 split snap target compared to regular
portrait that has 30%, 50%, 70% targets. Update the accessibility options
for minimized mode to reflect the correct targets. Also removed the
middle target if there is only 1 split snap target.
Test: using talkback, see custom options on divider handle in minimized
mode
Fixes: 78304300
Change-Id: I8421499616cf0fe503c1f6a081a2151098640a9c
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/com/android/internal/policy/DividerSnapAlgorithm.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java index a3c7a9ef6f91..fbf690fa1457 100644 --- a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java +++ b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java @@ -370,6 +370,14 @@ public class DividerSnapAlgorithm { return snapTarget; } + /** + * @return whether or not there are more than 1 split targets that do not include the two + * dismiss targets, used in deciding to display the middle target for accessibility + */ + public boolean showMiddleSplitTargetForAccessibility() { + return (mTargets.size() - 2) > 1; + } + public boolean isFirstSplitTargetAvailable() { return mFirstSplitTarget != mMiddleTarget; } |
