Merge "Frameworks/base: Move Animation.USE_CLOSEGUARD to inner class" into nyc-dev
am: 12a722e
* commit '12a722e56936853c880a20026057020d2a4252dc':
Frameworks/base: Move Animation.USE_CLOSEGUARD to inner class
Change-Id: If7e9b2c84c4d49a565bda3abe308df6b43f64acd
This commit is contained in:
@@ -93,8 +93,12 @@ public abstract class Animation implements Cloneable {
|
|||||||
*/
|
*/
|
||||||
public static final int ZORDER_BOTTOM = -1;
|
public static final int ZORDER_BOTTOM = -1;
|
||||||
|
|
||||||
private static final boolean USE_CLOSEGUARD
|
// Use a preload holder to isolate static initialization into inner class, which allows
|
||||||
= SystemProperties.getBoolean("log.closeguard.Animation", false);
|
// Animation and its subclasses to be compile-time initialized.
|
||||||
|
private static class NoImagePreloadHolder {
|
||||||
|
public static final boolean USE_CLOSEGUARD
|
||||||
|
= SystemProperties.getBoolean("log.closeguard.Animation", false);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set by {@link #getTransformation(long, Transformation)} when the animation ends.
|
* Set by {@link #getTransformation(long, Transformation)} when the animation ends.
|
||||||
@@ -859,7 +863,7 @@ public abstract class Animation implements Cloneable {
|
|||||||
if (!mStarted) {
|
if (!mStarted) {
|
||||||
fireAnimationStart();
|
fireAnimationStart();
|
||||||
mStarted = true;
|
mStarted = true;
|
||||||
if (USE_CLOSEGUARD) {
|
if (NoImagePreloadHolder.USE_CLOSEGUARD) {
|
||||||
guard.open("cancel or detach or getTransformation");
|
guard.open("cancel or detach or getTransformation");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user