aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2016-10-19 17:15:14 -0700
committerScott Jackson <daneren2005@gmail.com>2016-10-19 17:15:14 -0700
commit7e27f21daed8d79b0f582d26d1380e3967b1f7ac (patch)
treedb74d80b229ddcb3b324d7e210db4b837e69167a /app/src/main/java/github
parent862e767d938c1a3e574a8ecf58d9e7f0c83786f9 (diff)
downloaddsub-7e27f21daed8d79b0f582d26d1380e3967b1f7ac.tar.gz
dsub-7e27f21daed8d79b0f582d26d1380e3967b1f7ac.tar.bz2
dsub-7e27f21daed8d79b0f582d26d1380e3967b1f7ac.zip
Clear tint cache on exit so we can fix if bad colors get stuck
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java8
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java2
3 files changed, 4 insertions, 8 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
index 9b14f4f6..dcf966a8 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicActivity.java
@@ -245,7 +245,7 @@ public class SubsonicActivity extends AppCompatActivity implements OnItemSelecte
if (theme != null && !theme.equals(ThemeUtil.getTheme(this)) || fullScreen != prefs.getBoolean(Constants.PREFERENCES_KEY_FULL_SCREEN, false) || actionbarColored != prefs.getBoolean(Constants.PREFERENCES_KEY_COLOR_ACTION_BAR, true)) {
restart();
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
- DrawableTint.wipeTintCache();
+ DrawableTint.clearCache();
}
populateTabs();
diff --git a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
index e37c6d49..fb8221c8 100644
--- a/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
+++ b/app/src/main/java/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java
@@ -28,7 +28,6 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.os.Bundle;
-import android.os.Handler;
import android.preference.PreferenceManager;
import android.provider.MediaStore;
import android.support.v4.app.FragmentManager;
@@ -38,8 +37,6 @@ import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
-import android.view.ViewGroup;
-import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
@@ -49,9 +46,6 @@ import com.sothree.slidinguppanel.SlidingUpPanelLayout;
import java.io.File;
import java.util.Date;
import java.util.List;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
import github.daneren2005.dsub.R;
import github.daneren2005.dsub.domain.MusicDirectory;
@@ -78,6 +72,7 @@ import github.daneren2005.dsub.service.MusicService;
import github.daneren2005.dsub.service.MusicServiceFactory;
import github.daneren2005.dsub.updates.Updater;
import github.daneren2005.dsub.util.Constants;
+import github.daneren2005.dsub.util.DrawableTint;
import github.daneren2005.dsub.util.FileUtil;
import github.daneren2005.dsub.util.SilentBackgroundTask;
import github.daneren2005.dsub.util.UserUtil;
@@ -139,6 +134,7 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo
stopService(new Intent(this, DownloadService.class));
finish();
getImageLoader().clearCache();
+ DrawableTint.clearCache();
} else if(getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_DOWNLOAD_VIEW)) {
getIntent().putExtra(Constants.INTENT_EXTRA_FRAGMENT_TYPE, "Download");
lastSelectedPosition = R.id.drawer_downloading;
diff --git a/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java b/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java
index cc8e241d..f03906a8 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/DrawableTint.java
@@ -95,7 +95,7 @@ public class DrawableTint {
return getTintedDrawable(context, drawableRes, colorAttr);
}
- public static void wipeTintCache() {
+ public static void clearCache() {
attrMap.clear();
tintedDrawables.clear();
}