aboutsummaryrefslogtreecommitdiff
path: root/src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java')
-rw-r--r--src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java b/src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java
index 82fe9ce3..849360b8 100644
--- a/src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java
+++ b/src/com/android/tv/dvr/ui/browse/DetailsViewBackgroundHelper.java
@@ -23,9 +23,7 @@ import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.support.v17.leanback.app.BackgroundManager;
-/**
- * The Background Helper.
- */
+/** The Background Helper. */
class DetailsViewBackgroundHelper {
// Background delay serves to avoid kicking off expensive bitmap loading
// in case multiple backgrounds are set in quick succession.
@@ -59,11 +57,10 @@ class DetailsViewBackgroundHelper {
public DetailsViewBackgroundHelper(Activity activity) {
mBackgroundManager = BackgroundManager.getInstance(activity);
mBackgroundManager.attach(activity.getWindow());
+ mBackgroundManager.setAutoReleaseOnStop(false);
}
- /**
- * Sets the given image to background.
- */
+ /** Sets the given image to background. */
public void setBackground(Drawable background) {
if (mRunnable != null) {
mHandler.removeCallbacks(mRunnable);
@@ -72,18 +69,14 @@ class DetailsViewBackgroundHelper {
mHandler.postDelayed(mRunnable, SET_BACKGROUND_DELAY_MS);
}
- /**
- * Sets the background color.
- */
+ /** Sets the background color. */
public void setBackgroundColor(int color) {
if (mBackgroundManager.isAttached()) {
mBackgroundManager.setColor(color);
}
}
- /**
- * Sets the background scrim.
- */
+ /** Sets the background scrim. */
public void setScrim(int color) {
if (mBackgroundManager.isAttached()) {
mBackgroundManager.setDimLayer(new ColorDrawable(color));