Commit Graph

382 Commits

Author SHA1 Message Date
Lais Andrade
e6d76eb39d Merge "Change variable name fix from 'endingListener' to 'endListener'" am: af1750e973 am: d54498fb88
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1386076

Change-Id: Id09f9faa6cb0615f5adfc4512079ff7e3c2d3768
2020-08-03 18:39:47 +00:00
Lais Andrade
b491f9871c Change variable name fix from 'endingListener' to 'endListener'
Follow up aosp/1382536 by correcting the term used while renaming
a few variables and methods from AnimatorSet.

BUG=162536543

Change-Id: I9b914663790664b3f0de7774864207e90ce3f7a1
2020-08-03 14:04:00 +00:00
Lais Andrade
4614b73141 Merge "Update language to comply with Android's inclusive language guidance" am: 5db2bcffdf am: f8712712af
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1382536

Change-Id: I67f754501e5e9947bfd2891a156d46908dd8ab23
2020-07-31 14:46:48 +00:00
Lais Andrade
e89e18b7a2 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

#inclusivefixit

BUG=162536543

Change-Id: Ieda6c7d61cfe8ddba1b0d80c8b87d82a9895fa31
2020-07-31 10:26:14 +00:00
Jorim Jaggi
6d5c801c78 Use separate thread if app doesn't listen to animations
There is no need to introduce jank risk and run the inset
animations on the main thread if the app doesn't listen to
animation events. In that case, move the animations onto a
separate thread.

Bug: 118118435
Test: Inspect systrace
Change-Id: Ib6e4b4ce8e9dd8e27761ced6eb8d7700b6236a32
2020-03-11 22:58:59 +01:00
Automerger Merge Worker
b615fa46c9 Merge "Use new UnsupportedAppUsage annotation." am: 70129fc863 am: fe3063fb71
Change-Id: Iea82f97f0ba766ce3f435630175aea48ca47f12f
2020-01-09 16:15:31 +00:00
Artur Satayev
d9b11b058c Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
Merged-In: I8789f8499d4dca08580672e9e45ed9a7026dd686
2020-01-09 13:56:05 +00:00
Artur Satayev
c895b1b450 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
2019-12-18 16:37:37 +00:00
Artur Satayev
79aff5c601 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." am: a98026f7aa
am: 59318bab67

Change-Id: Ic691d764839ecf34daa8b53aa92497e013c9a2a7
2019-11-13 10:40:54 -08:00
Artur Satayev
5a525851a8 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Joshua Baxter
a39ce8b0e6 docs: fix typos
Change-Id: Ifee929d0adaaa94c5026a4b0fdf926489af639b5
test: make ds-docs
bug: 37009580
2019-11-06 21:14:23 +00:00
TreeHugger Robot
6167cf18a6 Merge "Restrict reflection access to ValueAnimator's sDurationScale" 2019-02-06 19:33:36 +00:00
Daniel Santiago Rivera
61fe23a1bc Restrict reflection access to ValueAnimator's sDurationScale
An alternative method, areAnimatorsEnabled() can be used to determine
if animations are turned off or not. Otherwise, reflection access of the
value are not permitted since it is an implementation detail that can
break battery saver mode or user's choice of disabling system-wide
animations.

Bug: 123767751
Test: n/a
Change-Id: I2146613a5921e229f7db641c34732bc1044766fc
2019-02-05 13:13:38 -08:00
Andrey Kulikov
95c1046495 Restrict usage of LayoutTransition.cancel() methods
This is used by androidx.transitions only for the API levels less than 18, so it is safe to restrict it after P.

Bug: 123769438
Test: none
Change-Id: Iaff4d5741c7cf952cbff61c3b580ef1ec0618009
2019-02-04 19:05:37 +00:00
kopriva
c997fc62e0 Merge "docs: fixing errors found with lint check" into pi-dev am: 8c7d2142f6
am: 4d12f4c42b

Change-Id: I96a6dab05b6d4ea40950fe2ddc0948adf1b4e48f
2018-10-09 13:29:04 -07:00
kopriva
4d12f4c42b Merge "docs: fixing errors found with lint check" into pi-dev
am: 8c7d2142f6

Change-Id: Ief137b64e798b4b5bb6be5e6d25a35e08037abe5
2018-10-09 13:18:06 -07:00
kopriva
a1a7848f83 docs: fixing errors found with lint check
This covers directories through /app.

removed unused import in KeyguardManager.java

Test: make ds-docs

Bug: 117494359

Change-Id: Ie2536676ae8d3ab9349aa43dc3e3248b618dd143
Exempt-From-Owner-Approval: Docs-only change
2018-10-09 10:27:35 -07:00
Mathew Inwood
e54e7590d7 Merge "Add @UnsupportedAppUsage annotations" am: 058b566f90
am: 38a6375f99

Change-Id: I92ad1b36f7fbd1ff9b1379ccf7a561158e82029b
2018-08-03 04:29:45 -07:00
Mathew Inwood
38a6375f99 Merge "Add @UnsupportedAppUsage annotations"
am: 058b566f90

Change-Id: I982201ecfc2f257ff5509de10a73549ebe657aff
2018-08-03 04:17:45 -07:00
Mathew Inwood
61beb3399e Add @UnsupportedAppUsage annotations
For packages:
  android.animation

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I6702ce1fb26452971e5eee8da15d5816dd75bb12
Merged-In: If0667154031b254fd632e1332fb65e9b08955755
2018-08-01 14:42:25 +01:00
Mathew Inwood
a228c37ba2 Add @UnsupportedAppUsage annotations
For packages:
  android.animation

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: If0667154031b254fd632e1332fb65e9b08955755
2018-08-01 14:35:45 +01:00
Laura Davis
93fae901a2 Merge "Merge "Docs: fixed variables" into pi-dev am: 116158689c" into pi-dev-plus-aosp
am: bd935bf41a

Change-Id: I7617577dd4fc8dc0944deb76e95142f96dade2a7
2018-06-26 10:09:12 -07:00
Laura Davis
b7ffb5fde5 Docs: fixed variables
Test: make ds-docs

Bug: 25134282
Change-Id: Ic91dd3820a409f0f28e23575090e3fd624a0fac0
2018-06-25 13:05:24 -07:00
Doris Liu
0b2c83643f Remove unnecessary value setting in AnimatorSet seeking
Also fixed seeking in paused state

BUG:68274315
BUG: 68382377
Test: ag/3835109
Change-Id: Ifa6b717a77a34f2152bd0e7ad285556986dd47ff
2018-04-02 17:55:33 -07:00
Jorim Jaggi
c2333b7ef6 Add ability to override global duration scale on ValueAnimator
This is needed as window animations are being ported over to use
ValueAnimator, and thus ValueAnimator need to ability to support
custom duration scales per object.

Test: ValueAnimatorTests
Bug: 64674361
Change-Id: Iea8d673b66e52866929174bbf6ca4a7ae882807b
2017-11-16 00:07:50 +00:00
Doris Liu
290271695d Fix end() for infinite AnimatorSet
BUG: 66880433
Test: repo steps in the bug above

Change-Id: If34b7386b7ff5cd28144e99c37957abddb068e9c
2017-09-26 17:04:36 -07:00
Wale Ogunwale
a5e833e846 Merge "Ensure that we use SF Vsync Choreographer for the PiP transition." into oc-dev am: e1e0db8ca9
am: 90159a2492

Change-Id: I0092411f5b8bef853b55e6ffe7bdf700876f7715
2017-06-13 01:08:25 +00:00
Winson Chung
4a526c1245 Ensure that we use SF Vsync Choreographer for the PiP transition.
- Move the bounds animation onto the animation thread
- Remove existing code referencing the old sf-vsync choreographer
- Add ability for ValueAnimator subclasses to reference a different
  AnimationHandler, which uses a different FrameCallbackProvider with the
  sf-vsync choreographer in the animations that require it
- Ensure that PiP touch events are batched and sent aligned with the
  sf-vsync
- Move GC onto its own thread to not block other BackgroundThread calls

Bug: 36371375
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: bit FrameworksServicesTests:com.android.server.wm.BoundsAnimationControllerTests
Test: go/wm-smoke

Change-Id: I6a41b35a4e4d4d6dbea82c2673452825fe3ffa58
2017-06-12 10:08:58 -07:00
Doris Liu
ba087b09fc Merge "Merge "Better handle non-recommended use and warn against it in JavaDoc" into oc-dev am: 8d06d8cbf1" into oc-dev-plus-aosp
am: 721ecfd21a

Change-Id: Iec199dd0cfe7beace7549d3e16e888458fd0306c
2017-06-07 03:58:45 +00:00
Doris Liu
8d06d8cbf1 Merge "Better handle non-recommended use and warn against it in JavaDoc" into oc-dev 2017-06-07 03:43:13 +00:00
Doris Liu
88bb31b954 Better handle non-recommended use and warn against it in JavaDoc
BUG: 62386748
Test: Follow repro steps in b/62358678. The issue is no
longer reproducible

Change-Id: Ic3cec7c4947296224edb5365d81988d4da7ee5e1
2017-06-07 01:41:34 +00:00
Doris Liu
7d0b3bbf15 Merge "Ensure start delay is properly scaled with duration scale" into oc-dev am: 9057f846ac
am: 4b5d12d25a

Change-Id: I80a1dc2c898a9456b651f6b1375055e6fcb59540
2017-06-01 01:05:17 +00:00
Doris Liu
2ac6547824 Ensure start delay is properly scaled with duration scale
BUG: 62126024
Test: CTS test in the same target branch
Change-Id: Ia396e69e053ccd90cdf37ac0b59c404c9952e497
2017-05-31 18:09:47 +00:00
Chet Haase
367804f1e4 Merge "Fix infinite loop problem in AnimationHandler" into oc-dev am: 163ec051d1
am: 3fb0e7555f

Change-Id: I91064e4baf1333c25d55d06e4373c83243c3e0da
2017-05-31 14:11:47 +00:00
Chet Haase
da9374211f Fix infinite loop problem in AnimationHandler
AnimationHandler.doAnimationFrame() iterates on a list that may be changed
during the course of the lopp, especially when Battery Saver is enabled, or
animators have zero duration, coupled with user code launching new animators
when old ones end.

The fix is to iterate through the old size of the list, and avoid processing
new animators in the current frame.

Bug: 37376806  Keyboard doesn't come up when battery saver is turned on on Android O
Test: manual
Change-Id: I40ca1d849e6f337779c23edbab22d80760c22f9b
2017-05-26 16:56:12 -07:00
Aurimas Liutikas
01e1b8550d Merge "Remove internal listener when cloning" into oc-dev am: a7dde34a81
am: c59f75af1d

Change-Id: Ia44c46f0784c412d71956c9e7f1e17533c991b9c
2017-05-16 16:00:56 +00:00
Philip Quinn
7fb80f7d27 Update the mTotalDuration for each animation in an AnimatorSet.
A cache was introduced in I677bc289f2ba430466f2d90ebc14368cb7b75118 to
optimise calls to createDependencyGraph(), but the update was removed in
If1dc6e8dbc93a4bf5ade8c5b0dcf43d3ee6ba7b5. This patch reintroduces the
update when calculating child animation start/end times to re-enable the
optimisation.

Test: cts-tradefed run cts-dev --module CtsAnimationTestCases
Change-Id: Ie9dad4049c07a151889b57809bf844ab854ff482
2017-05-15 21:36:30 +00:00
Doris Liu
c457547cbd Remove internal listener when cloning
BUG: 38270215
Test:  adb shell am instrument -w
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ia80d5f8958e320ad7d51ef7a08168763c8988146
2017-05-13 01:39:07 +00:00
Doris Liu
56b2df05f5 Fix racy clone
BUG: 38184803
Test: cts AnimatorSet tests
Change-Id: I308ae9cc014f13a6aa928d8d82e339f476f4b3de
2017-05-12 04:17:50 +00:00
Doris Liu
02eabdff6b Refine JavaDocs for AnimatorSet#getCurrentPlayTime()
This is to address API concil's feedback.

BUG: 37673139
Test: make -j20 docs
Change-Id: I2e360c7996f8368c77c30c55271e006f94736f90
2017-04-26 22:08:24 +00:00
Doris Liu
5fb129c2ab Behavior compat for child being manipulated outside Animatorset
When a child animator is being manipulated outside of the AnimatorSet,
such as when the child animator is running before the AnimatorSet gets
started, we need to make sure we maintain the behavoir on N:
The child animator will be re-started at its scheduled start time in
the AnimatorSet.

BUG: 37507882
Test: Repro steps in comment #1 & ag/2144081/
Change-Id: Ib97e85706f01d18a2e72fb4d1d678e22cf959894
2017-04-21 21:13:52 +00:00
Doris Liu
ae570c04c0 Remove workaround for end() not supported in some app
BUG: 36241584
Test: Follow repro steps of comment #1 in the bug above

Change-Id: I1bf27a7cc9cc2bd398c372623d7978e838f1d8b2
2017-04-03 18:53:55 +00:00
Doris Liu
d7968dc174 Fix 0 duration scale for pre-O apps
This CL fixed an issue where pre-O apps receive animation
end callbacks before all animations have ended.

BUG: 36157561
Change-Id: Id0ea05e76c91a21a678ec05b1ed0c898ee36ee43
Workaround: 36241584
Test: repro steps in comment #1
2017-03-16 11:05:46 -07:00
Doris Liu
21ba77f6b6 Ensure behavior consistency for 0 duration scale
BUG: 35590176
Test: cts in the same topic branch
Change-Id: Ia0a2518a1376d3f82ee6c5a7b27e3cb24ed54cbf
2017-03-07 10:59:47 -08:00
Doris Liu
e8a5d8d211 Fix start time modification outside of updatePlayTime()
BUG: 35340235
Test: manually start the chrome photos app, no crash
      and CTS at: ag/1908702

Change-Id: I3c0a6f140ee497020b562f25cade241dcd993c2a
2017-02-14 11:54:40 -08:00
Doris Liu
c9b5034178 Correctly handle infinite start time
BUG: 34837854
Test: ag/1901799
Change-Id: If60dc9432df189642e67ff544e14a4cda7d5e0ec
2017-02-10 18:07:55 -08:00
Doris Liu
dd65ab0407 Add getter for current play time
BUG: 30993532
Test: cts tests in the same topic branch
Change-Id: I45ee9c61f53051fcac3399eebc378aa2c0ce056d
2017-02-10 16:06:42 -08:00
Doris Liu
6d45209205 Fix reverse with start delay
Test: cts in the same topic branch

Change-Id: Ie8793f25d39e0104c880f1a873f68650b918bffa
2017-02-10 12:21:11 -08:00
TreeHugger Robot
466149d78c Merge "Fix start delay for ValueAnimator" 2017-02-04 03:47:37 +00:00