public class BurnInProtectionHelper extends Object implements DisplayManager.DisplayListener, Animator.AnimatorListener, ValueAnimator.AnimatorUpdateListener
Modifier and Type | Field and Description |
---|---|
static int |
BURN_IN_MAX_RADIUS_DEFAULT |
Constructor and Description |
---|
BurnInProtectionHelper(Context context,
int minHorizontalOffset,
int maxHorizontalOffset,
int minVerticalOffset,
int maxVerticalOffset,
int maxOffsetRadius) |
Modifier and Type | Method and Description |
---|---|
void |
cancelBurnInProtection() |
void |
dump(String prefix,
PrintWriter pw) |
void |
onAnimationCancel(Animator animator)
Notifies the cancellation of the animation.
|
void |
onAnimationEnd(Animator animator)
Notifies the end of the animation.
|
void |
onAnimationRepeat(Animator animator)
Notifies the repetition of the animation.
|
void |
onAnimationStart(Animator animator)
Notifies the start of the animation.
|
void |
onAnimationUpdate(ValueAnimator valueAnimator)
Notifies the occurrence of another frame of the animation.
|
void |
onDisplayAdded(int i)
Called whenever a logical display has been added to the system.
|
void |
onDisplayChanged(int displayId)
Called whenever the properties of a logical display have changed.
|
void |
onDisplayRemoved(int i)
Called whenever a logical display has been removed from the system.
|
void |
startBurnInProtection() |
public static final int BURN_IN_MAX_RADIUS_DEFAULT
public BurnInProtectionHelper(Context context, int minHorizontalOffset, int maxHorizontalOffset, int minVerticalOffset, int maxVerticalOffset, int maxOffsetRadius)
public void startBurnInProtection()
public void cancelBurnInProtection()
public void dump(String prefix, PrintWriter pw)
public void onDisplayAdded(int i)
DisplayManager.DisplayListener
DisplayManager.getDisplay(int)
to get more information about
the display.onDisplayAdded
in interface DisplayManager.DisplayListener
i
- The id of the logical display that was added.public void onDisplayRemoved(int i)
DisplayManager.DisplayListener
onDisplayRemoved
in interface DisplayManager.DisplayListener
i
- The id of the logical display that was removed.public void onDisplayChanged(int displayId)
DisplayManager.DisplayListener
onDisplayChanged
in interface DisplayManager.DisplayListener
displayId
- The id of the logical display that changed.public void onAnimationStart(Animator animator)
Animator.AnimatorListener
Notifies the start of the animation.
onAnimationStart
in interface Animator.AnimatorListener
animator
- The started animation.public void onAnimationEnd(Animator animator)
Animator.AnimatorListener
Notifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.
onAnimationEnd
in interface Animator.AnimatorListener
animator
- The animation which reached its end.public void onAnimationCancel(Animator animator)
Animator.AnimatorListener
Notifies the cancellation of the animation. This callback is not invoked for animations with repeat count set to INFINITE.
onAnimationCancel
in interface Animator.AnimatorListener
animator
- The animation which was canceled.public void onAnimationRepeat(Animator animator)
Animator.AnimatorListener
Notifies the repetition of the animation.
onAnimationRepeat
in interface Animator.AnimatorListener
animator
- The animation which was repeated.public void onAnimationUpdate(ValueAnimator valueAnimator)
ValueAnimator.AnimatorUpdateListener
Notifies the occurrence of another frame of the animation.
onAnimationUpdate
in interface ValueAnimator.AnimatorUpdateListener
valueAnimator
- The animation which was repeated.