Skip to content

Commit

Permalink
DepthWallpaper: use constants for pref names
Browse files Browse the repository at this point in the history
Signed-off-by: DHD2280 <[email protected]>
  • Loading branch information
DHD2280 committed Dec 13, 2024
1 parent d34afcb commit 7aa4fba
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import static it.dhd.oxygencustomizer.utils.Constants.DEPTH_BG_TAG;
import static it.dhd.oxygencustomizer.utils.Constants.DEPTH_SUBJECT_TAG;
import static it.dhd.oxygencustomizer.utils.Constants.Packages.SYSTEM_UI;
import static it.dhd.oxygencustomizer.utils.Constants.Preferences.DepthWallpaper.DEPTH_WALLPAPER_ENABLED;
import static it.dhd.oxygencustomizer.utils.Constants.Preferences.DepthWallpaper.DEPTH_WALLPAPER_MODE;
import static it.dhd.oxygencustomizer.utils.Constants.Preferences.DepthWallpaper.DEPTH_WALLPAPER_OPACITY;
import static it.dhd.oxygencustomizer.utils.Constants.getLockScreenBitmapCachePath;
import static it.dhd.oxygencustomizer.utils.Constants.getLockScreenSubjectCachePath;
import static it.dhd.oxygencustomizer.xposed.XPrefs.Xprefs;
Expand Down Expand Up @@ -122,14 +125,14 @@ public DepthWallpaper(Context context) {

@Override
public void updatePrefs(String... Key) {
DWallpaperEnabled = Xprefs.getBoolean("DWallpaperEnabled", false);
DWOpacity = Xprefs.getSliderInt("DWOpacity", 192);
DWMode = Integer.parseInt(Xprefs.getString("DWMode", "0"));
DWallpaperEnabled = Xprefs.getBoolean(DEPTH_WALLPAPER_ENABLED, false);
DWOpacity = Xprefs.getSliderInt(DEPTH_WALLPAPER_OPACITY, 192);
DWMode = Integer.parseInt(Xprefs.getString(DEPTH_WALLPAPER_MODE, "0"));

if (Key.length > 0) {
if (Key[0].equals("DWallpaperEnabled")) {
if (Key[0].equals(DEPTH_WALLPAPER_ENABLED)) {
setupViews();
} else if (Key[0].equals("DWMode")) {
} else if (Key[0].equals(DEPTH_WALLPAPER_MODE)) {
cleanFiles();
}
}
Expand Down

0 comments on commit 7aa4fba

Please sign in to comment.