diff --git a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java index d4ed5b3..81777a6 100644 --- a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java +++ b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java @@ -154,7 +154,7 @@ public class BookmarkManager { @Override public void run() { final File tempFile = new File(mFilesDir, - String.format("bm_%d.dat", System.currentTimeMillis())); + String.format(Locale.US, "bm_%d.dat", System.currentTimeMillis())); final File bookmarksFile = new File(mFilesDir, FILE_BOOKMARKS); boolean success = false; BufferedWriter bookmarkWriter = null; diff --git a/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java b/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java index 6372266..dbf1eca 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java @@ -3,7 +3,6 @@ */ package acr.browser.lightning.fragment; -import android.annotation.SuppressLint; import android.app.Activity; import android.content.DialogInterface; import android.os.Build; diff --git a/app/src/main/java/acr/browser/lightning/utils/ThemeUtils.java b/app/src/main/java/acr/browser/lightning/utils/ThemeUtils.java index 11d98e5..c12ff69 100644 --- a/app/src/main/java/acr/browser/lightning/utils/ThemeUtils.java +++ b/app/src/main/java/acr/browser/lightning/utils/ThemeUtils.java @@ -12,6 +12,7 @@ import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.support.annotation.AttrRes; +import android.support.annotation.ColorInt; import android.support.annotation.DrawableRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -44,10 +45,12 @@ public class ThemeUtils { return color; } + @ColorInt public static int getIconLightThemeColor(@NonNull Context context) { return ContextCompat.getColor(context, R.color.icon_light_theme); } + @ColorInt public static int getIconDarkThemeColor(@NonNull Context context) { return ContextCompat.getColor(context, R.color.icon_dark_theme); } @@ -92,7 +95,7 @@ public class ThemeUtils { } public static ColorDrawable getSelectedBackground(@NonNull Context context, boolean dark) { - final int color = (dark) ? ContextCompat.getColor(context, R.color.selected_dark) : + @ColorInt final int color = (dark) ? ContextCompat.getColor(context, R.color.selected_dark) : ContextCompat.getColor(context, R.color.selected_light); return new ColorDrawable(color); }