test result:
Decode function takes about 0.25 seconds with 1350 channels in Live Channels.
The original one takes about 0.37 seconds in the same test case.
Bug: 23307587
Change-Id: I3a1fefe0b3e6c1986c8f515259658f2e3e23011f
Now all state of JobStatus is implicitly protected by the lock
of whoever is using it -- in this case the global lock for the
JobSchedulerService. This allows us to remove all of the atomic
variables and just replace those with a simple bit field.
The required constraints for a job are now statically defined
once a JobStatus is created, and don't change. (They wouldn't
change before, but now this is absolutely specified to be the
case.) This required tweaking the constructors a bit so that
the earliest and latest run times are computed as part of the
core class initialization.
Also clarified methods on StateController that are called with
the lock held, and took advantage of that in the various
controllers to not now redundantly re-acquire the lock.
Change-Id: I595c5e7d1bff1bd2ff906d612581af82878a25ee
Makes sure we don't end up in a weird state because
at the end of the fling animation, mDockSide gets
reset.
Bug: 27269044
Change-Id: I779b8ee9be9a35553c7f822421d1f02ca802111c
There was a very visible hole at the end of the transition when both
the docked stack expands and the other app is doing a clip reveal
animation, but only if the app had to travel a far distance to
meet it's target rectangle.
To fix this, we interpolate between two animation curves for maximizing
divider: One is the original curve, and the other one is an adjusted
one which simulate if the divider would start at the edge of the app
surface that plays the clip reveal animation. At the start of the
animation, we use the original curve, but then about in the middle of
the animation we interpolated towards the adjusted curve, so the divider
meets the edge of the app surface that plays the clip reveal animation,
eliminating that gap while still preserving the overall motion.
Bug: 27154882
Change-Id: I37716588f88ddc643ed6176c2ccd56ca174e8919
Animator's play state can go from NotStarted to Finished directly
in the case of calling start() and end() within one frame. Previously
we only set animator's interpolator when the animator is transitioning
to Running state. So when Running state is skipped, the interpolator
is left unset.
Bug: 27224373
Change-Id: I5a53106fe1aae38ccaf1df8debd553be3bc56133
Which really means, make background check much more
strict, with an option to revert to the more lenient
behavior.
In this strict version, an app can't have services
started or receive broadcasts at any point when it is
not foreground. Also, it doesn't matter the importance
of a caller trying to start a service, it only depends
on the state of the app whose service is being started.
A new activity shell command allows you to control
whether to use the strict or lenient behavior.
Change-Id: I7f5a50b52881b5c8f9d8b6c8c622d3652a769fd7
Unify all locks to just one lock protecting the entire service.
There is really no need for more complicated locking -- there is
nothing in the code that can take a long time to complete. And
having a single lock will allow various parts of the code to be
much simpler and easier to maintain.
This is just the first step of the change, switching all of the
locking to use one lock. With this done, we can now start
simplifying the code. For example, JobStatus no longer needs
to do any locking (or have atomic variables and such), it can
just rely on its callers holding the global service lock.
Change-Id: I502916ed7f2994b601750c67a59a96b1a4e95c6d
The QSPanel had 0 height when shade was collapsed which messed up
the immediate expand logic.
Bug: 27197894
Change-Id: I623eb5d3b945a83b3410fa5dc52c4f96dd6700cb
This logically reverts a previous CL [1], which added
InputMethodInfo#isEncryptionAware() for File-Based Encryption (FBE)
support, since it turns out that the method in question is unnecessary
to make InputMethodManagerService encryption-aware.
[1]: Icf921fe3661eccf4a589b08b616d05decc561356
69811a98f161a04af8e8ec9978c3a5efe1ea0f29
Bug: 26279466
Change-Id: Ia4884bf5922ad453d4b9e5e3c6f0d17b36dc205d