Updating some non-final static objects
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects
Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java
index 772eb00..893f64a 100644
--- a/src/com/android/launcher3/BaseDraggingActivity.java
+++ b/src/com/android/launcher3/BaseDraggingActivity.java
@@ -73,8 +73,7 @@
mRotationListener = new DisplayRotationListener(this, this::onDeviceRotationChanged);
// Update theme
- WallpaperColorInfo wallpaperColorInfo = WallpaperColorInfo.getInstance(this);
- wallpaperColorInfo.addOnChangeListener(this);
+ WallpaperColorInfo.INSTANCE.get(this).addOnChangeListener(this);
int themeRes = Themes.getActivityThemeRes(this);
if (themeRes != mThemeRes) {
mThemeRes = themeRes;
@@ -234,7 +233,7 @@
@Override
protected void onDestroy() {
super.onDestroy();
- WallpaperColorInfo.getInstance(this).removeOnChangeListener(this);
+ WallpaperColorInfo.INSTANCE.get(this).removeOnChangeListener(this);
mRotationListener.disable();
}