Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
3148e971
Commit
3148e971
authored
1 year ago
by
Fabian Kozynski
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Re-write conditional checks for animation" into udc-qpr-dev
parents
7ad6a353
77bb4deb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+9
-1
9 additions, 1 deletion
...SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
with
9 additions
and
1 deletion
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java
+
9
−
1
View file @
3148e971
...
...
@@ -554,6 +554,12 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
if
(
shouldNotRunAnimation
(
tilesToReveal
))
{
return
;
}
// This method has side effects (beings the fake drag, if it returns true). If we have
// decided that we want to do a tile reveal, we do a last check to verify that we can
// actually perform a fake drag.
if
(!
beginFakeDrag
())
{
return
;
}
final
int
lastPageNumber
=
mPages
.
size
()
-
1
;
final
TileLayout
lastPage
=
mPages
.
get
(
lastPageNumber
);
...
...
@@ -588,8 +594,10 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
}
private
boolean
shouldNotRunAnimation
(
Set
<
String
>
tilesToReveal
)
{
// None of these have side effects. That way, we don't need to rely on short-circuiting
// behavior
boolean
noAnimationNeeded
=
tilesToReveal
.
isEmpty
()
||
mPages
.
size
()
<
2
;
boolean
scrollingInProgress
=
getScrollX
()
!=
0
||
!
begin
FakeDrag
();
boolean
scrollingInProgress
=
getScrollX
()
!=
0
||
!
is
FakeDrag
ging
();
// isRunningInTestHarness() to disable animation in functional testing as it caused
// flakiness and is not needed there. Alternative solutions were more complex and would
// still be either potentially flaky or modify internal data.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment