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
This commit is contained in:
Matthew Ng
2018-05-04 15:42:54 -07:00
parent a5f20a8df4
commit 6317df6e1e
2 changed files with 21 additions and 6 deletions

View File

@@ -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;
}