Flag: not needed
Fixes: 282172884
Test: used alt+tab in overview; also launched overview through keyboard quick switch view
Change-Id: I3d1e54cda317ee8f8d2b2d698480cd3ca01dfc85
This cl is 1/2 part change
We are currently getting StaleObjectException when running this test.
We want to implment a synchoronized event beetween test and launcher,
so we know that search result adapter is done updating and page will
get no more updates of search results.
Test: Presubmit
Bug: 232008758
Flag: not needed
Change-Id: I40cf9b83d231a2487220aabc8f8e8c3ca71f255c
When swipping back from overscroll, deltaX becomes close-to-0
causing the equality check (deltaX != 0) to fail. This
causes the overscroll to jump.
Platform views like HorizontalScrollView use int instead of
float to avoid this.
Bug: 273828110
Test: Verified on device that the overscroll finishes smoothly
Flag: N/A
Change-Id: I140750a2bdc39cebcbeb8ea83bb38efb0449dd5a
Test: Unit tests added
Test: Manual tests on foldable device going through unlock on outer and inner screens
Bug: b/261584499
Change-Id: I9cdb717400c82e7a0bb4d58d6d25d8b794200af3
test: replaced callback with null pointer and noted same crash error as provided in bug. testing crash to see if it was just small jank or obvious crash. its an obvious cash to user. by exiting earlier the UI isn't as fluid but we will stop crashing.
bug: 261071811
Change-Id: Ia54ee8d4bccdb9de8c042bae8e837216eaac67bb
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.
Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions
Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
When "Don't keep activities" is enabled in developer settings, the RecentsView gets re-initialized every home gesture. The home animation can often finish before the load plan ever gets applied, so the page scrolls can be used before the RecentsView has had a chance to add all its TaskViews and recalculate its page scroll.
Fixes: 249020573
Test: launched an app and went home
Change-Id: I83ca9de60b50693f7a22b08534ec36973cd6a0fc
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: If17d2944bfd3e7ab10592a4c74c956203c356f81
- Also combined the 2 setCurrentPage call in applyLoadPlan into 1
- Otherwise setCurrentTask may set to page 1 unexpectedly due to page 0's scroll being invalid and out of range
Bug: 246283207
Bug: 238461210
Test: Split screen with 2 apps, click back, go to overview again, should snap to focsued task
Change-Id: I3b57655c810668fe244659437fbd4a745ca02d21
I root caused the two areas causing the flicker:
A. If page scrolls aren't initialized when we get onActivityInit(), the first scroll even after linkRecentsViewScroll() will jump based on min scroll (due to Clear all button). Fix is to defer linking until page scrolls are initialized.
B. If page scrolls aren't initialized when the gesture starts, RecentsView can jump to the min scroll when calling showCurrentTask(), since that calls setCurrentPage(getRunningTaskIndex()) which might be out of bounds. Fix is to defer that setCurrentPage() until page scrolls are initialized.
Test: open a random app that hasn't been opened in a while, touch down
on nav handle and see if RecentsView scrolls partially or fully
offscreen; repeat 20 times to be sure
Fixes: 233112195
Change-Id: I000960775f8735920d97c87942065a430c9dce0c
Test: open a random app that hasn't been opened in a while, touch down
on nav handle and see if RecentsView scrolls partially or fully
offscreen; repeat 20 times to be sure
Bug: 233112195
Fixes: 235369468
Change-Id: Ie8b3dbea7c4826af037edf22360946105ab22134
- Change non-fling page snap animation duration
- Change fling gesture related minVelocity
Test: Scroll between home pages, allapps, folder pages
Bug: 229073876
Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
Merge "Hide web settings, if web suggestions is disabled" into tm-dev
Change-Id: Ib39187ec9c832e65dd0b71f8f4a00e1b636423a4
Switching to overview shortly after switching to 3-button mode caused a janky animation if the PagedView wasn't properly initialized yet. Moved the animation to a callback.
Fixes: 203632659
Fixes: 223719200
Test: manual
Change-Id: I8a345036c6b7322ae3fa50a23bcb7522f57c8a90
Use 15% of the screen width instead of 40% of the page
width currently used for phones.
Test: try page snapping on Launcher home
Bug: 213305066
Change-Id: I6a525100bf942c5089f580a27250c425ca95cf00
- Introduced additional page spacign for clear all button to match mocks
Fix: 222664142
Test: Quick switch to last task and immediately enter overview
Test: Dismiss last task in overview grid
Change-Id: I4d2f93d843c50b10051f3fb17027cd06e86707e1
- Removed overscroll checking in switch access, as overscroll isn't supported via snapToPage
- Don't show forward/backward action if no further scroll is possible
- When scrolling right in overveiw grid, snap to the next non-fully visible task
- When scrolling left in overview grid, snap to a position that next non-fully visible task is on the left of the screen
Fix: 204162346
Test: Use switch action in Workspace/Recents with and w/o RTL
Change-Id: I0d4f201edf2da543703e88420e6f3255fb2ba16f
- Instead of using RecentsViewScroll, put task's position offset versus current scroll as TaskRect calculation, so it's considered when calculating for putting task to full screen
- Revert back RecentsViewScroll to apply before RecentsViewScale
- Added new property in PagedOrientationHandler to apply both primary/secondary param without clearing the other, and renamed an existing method
Fix: 206972618
Test: Quick switching
Test: Launch task from grid, launch side task from carousel overview
Change-Id: I5977975ed1e930ad70b81d83513d8f3a00c0aed4
Add an extra check to the PagedView, before triggering the haptic
callback, to avoid triggering this when the scroll happens
outside an actual scroll action (e.g. some setter methods that update
the scroll state).
This was triggered on some calls to setCurrentPage, that was
snapping the current scrolled page and triggering the
View.onScrollChanged method.
Fix: 201237536
Test: manual
Change-Id: I9b29981dba408493c78873aea42d8615ea7573a0
Merged-In: I9b29981dba408493c78873aea42d8615ea7573a0
(cherry picked from commit bff03e2d0f)
This creates a new padding file that bring some foldables up to spec
with VisD. For 2 panel layouts it now uses workspace margin instead of
cell layout padding.
Bug: 191879424
Fixes: 200035429
Test: checking paddings in HSV
Change-Id: I11b8e1afd76f535368d4c26e31630ce496171e13
Test: on a device with 2 panels, workspace page indicator width reflects number of needed scrolls rather than number of pages.
Fixes: 200607741
Change-Id: Ic2d0bdc644a15944c2d69a832068889071dc25e2
This ensures that we don't inadvertently update mCurrentPage to be
mNextPage in computeScrollHelper(), which would in turn mess up
calculations such as RecentsView#getHorizontalOffsetSize().
Also removed resetNextPage parameter from forceFinishScroller(), as
resetNextPage was always passed as true anyway.
Test: Swipe up and to the right to home, ensure adjacent page goes all
the way off screen
Fixes: 199927699
Change-Id: Iee1ffac10e5195f0c3a124a23b06d5411ecd7ba2
Haptics introduced at the key moments:
- Task scroll in overview or quick switch, trigger when a new task comes
to the center of the screen;
- Task scroll in overview when overscroll animation is triggered;
- Task dismissed in overview;
There is also a configured min gap between two scroll haptics set to
20ms to prevent fast scrolls from creating a chain of cancelled effects.
Fix: 182382085
Test: manual
Change-Id: I43c0f8c879a06f317e8a660240dafb7f7abe79f7
- Remove all usage of LEFT_PANEL_ID and fixed left panel code
- For preview renderer, load screen 0 + screen 1 instead
- Added a split display specific default workspace layout, with a placeholder app to pass test before we implement page pairing(b/196376162)
- Known issue: If screenId 1 is deleted, right panel will disappear from Wallpaepr & Style because there is no screenId 1. Will be resovled after page pairing(b/196376162)
Bug: 175939730
Test: manual and TaplTestsLauncher3#testWorkSpace
Change-Id: Icac1c94165c14a49c17897c45355b6cdc4d87e91
Fixing unresolved comment: http://shortn/_YCaiPNApNc
Test: manual test with a game controller, check on both normal and two panel home
Bug: 187205980
Change-Id: I8cae48effcce852c85273f16d1107dec90ff6f51
Settings.Global.getFloat causes a Binder
transaction which breaks BinderTests.java
when running it from Android Studio.
Test: BinderTests.java
Bug: 187428578
Change-Id: I07ce2fe256dba0bfa98a5dade538d68e7ce357ff
This fixes 2 things:
- adding the correct space between pages as insets (eg camera) were
being discarded
- adding the space between pages instead of between panels as was before
This solution should work with more panels and don't create problems for
phones, where panels = 1.
Fixes 193194192
Test: manual testing in unfolded state in portrait and landscape, both
rotations
Change-Id: Ia3b148ceb773c6d5b6f8848ced07d7f9c1459e92