Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.TimeZone; public interface ClockPlugin extends Plugin { String ACTION = "com.android.systemui.action.PLUGIN_CLOCK"; int VERSION = 3; int VERSION = 4; /** * Get the name of the clock face. Loading Loading @@ -71,6 +71,14 @@ public interface ClockPlugin extends Plugin { return null; } /** * Allows the plugin to clean up resources when no longer needed. * * Called when the view previously created by {@link ClockPlugin#getView()} has been detached * from the view hierarchy. */ void onDestroyView(); /** * Set clock paint style. * @param style The new style to set in the paint. Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +1 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ public class KeyguardClockSwitch extends RelativeLayout { mBigClockContainer.removeAllViews(); updateBigClockVisibility(); } mClockPlugin.onDestroyView(); mClockPlugin = null; } if (plugin == null) { Loading packages/SystemUI/src/com/android/keyguard/clock/BubbleClockController.java +10 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,16 @@ public class BubbleClockController implements ClockPlugin { mDarkController = new CrossFadeDarkController(mDigitalClock, mLockClock); } @Override public void onDestroyView() { mView = null; mDigitalClock = null; mAnalogClock = null; mLockClockContainer = null; mLockClock = null; mDarkController = null; } @Override public String getName() { return "bubble"; Loading packages/SystemUI/src/com/android/keyguard/clock/DefaultClockController.java +7 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,13 @@ public class DefaultClockController implements ClockPlugin { mTextDate = mView.findViewById(R.id.date); } @Override public void onDestroyView() { mView = null; mTextTime = null; mTextDate = null; } @Override public String getName() { return "default"; Loading packages/SystemUI/src/com/android/keyguard/clock/StretchAnalogClockController.java +11 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,17 @@ public class StretchAnalogClockController implements ClockPlugin { mDarkController = new CrossFadeDarkController(mDigitalClock, mLockClock); } @Override public void onDestroyView() { mBigClockView = null; mDigitalClock = null; mAnalogClock = null; mView = null; mLockClock = null; mDarkController = null; } @Override public String getName() { return "stretch"; Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/ClockPlugin.java +9 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.TimeZone; public interface ClockPlugin extends Plugin { String ACTION = "com.android.systemui.action.PLUGIN_CLOCK"; int VERSION = 3; int VERSION = 4; /** * Get the name of the clock face. Loading Loading @@ -71,6 +71,14 @@ public interface ClockPlugin extends Plugin { return null; } /** * Allows the plugin to clean up resources when no longer needed. * * Called when the view previously created by {@link ClockPlugin#getView()} has been detached * from the view hierarchy. */ void onDestroyView(); /** * Set clock paint style. * @param style The new style to set in the paint. Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +1 −0 Original line number Diff line number Diff line Loading @@ -187,6 +187,7 @@ public class KeyguardClockSwitch extends RelativeLayout { mBigClockContainer.removeAllViews(); updateBigClockVisibility(); } mClockPlugin.onDestroyView(); mClockPlugin = null; } if (plugin == null) { Loading
packages/SystemUI/src/com/android/keyguard/clock/BubbleClockController.java +10 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,16 @@ public class BubbleClockController implements ClockPlugin { mDarkController = new CrossFadeDarkController(mDigitalClock, mLockClock); } @Override public void onDestroyView() { mView = null; mDigitalClock = null; mAnalogClock = null; mLockClockContainer = null; mLockClock = null; mDarkController = null; } @Override public String getName() { return "bubble"; Loading
packages/SystemUI/src/com/android/keyguard/clock/DefaultClockController.java +7 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,13 @@ public class DefaultClockController implements ClockPlugin { mTextDate = mView.findViewById(R.id.date); } @Override public void onDestroyView() { mView = null; mTextTime = null; mTextDate = null; } @Override public String getName() { return "default"; Loading
packages/SystemUI/src/com/android/keyguard/clock/StretchAnalogClockController.java +11 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,17 @@ public class StretchAnalogClockController implements ClockPlugin { mDarkController = new CrossFadeDarkController(mDigitalClock, mLockClock); } @Override public void onDestroyView() { mBigClockView = null; mDigitalClock = null; mAnalogClock = null; mView = null; mLockClock = null; mDarkController = null; } @Override public String getName() { return "stretch"; Loading