Loading packages/SystemUI/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -696,8 +696,7 @@ <provider android:name="com.android.keyguard.clock.ClockOptionsProvider" android:authorities="com.android.keyguard.clock" android:enabled="false" android:exported="false" android:exported="true" android:grantUriPermissions="true"> </provider> Loading packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import javax.inject.Named; public class KeyguardClockSwitch extends RelativeLayout { private static final String TAG = "KeyguardClockSwitch"; private static final boolean CUSTOM_CLOCKS_ENABLED = false; private static final boolean CUSTOM_CLOCKS_ENABLED = true; /** * Animation fraction when text is transitioned to/from bold. Loading packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -149,8 +149,6 @@ public final class ClockManager { LayoutInflater layoutInflater = injectionInflater.injectable(LayoutInflater.from(context)); addBuiltinClock(() -> new DefaultClockController(res, layoutInflater, colorExtractor)); addBuiltinClock(() -> new BubbleClockController(res, layoutInflater, colorExtractor)); addBuiltinClock(() -> new AnalogClockController(res, layoutInflater, colorExtractor)); // Store the size of the display for generation of clock preview. DisplayMetrics dm = res.getDisplayMetrics(); Loading Loading @@ -211,7 +209,8 @@ public final class ClockManager { return mContentObserver; } private void addBuiltinClock(Supplier<ClockPlugin> pluginSupplier) { @VisibleForTesting void addBuiltinClock(Supplier<ClockPlugin> pluginSupplier) { ClockPlugin plugin = pluginSupplier.get(); mPreviewClocks.addClockPlugin(plugin); mBuiltinClocks.add(pluginSupplier); Loading packages/SystemUI/tests/src/com/android/keyguard/clock/ClockManagerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public final class ClockManagerTest extends SysuiTestCase { mMockPluginManager, mMockColorExtractor, mMockContentResolver, mMockCurrentUserObserable, mMockSettingsWrapper, mFakeDockManager); mClockManager.addBuiltinClock(() -> new BubbleClockController( getContext().getResources(), inflater, mMockColorExtractor)); mClockManager.addOnClockChangedListener(mMockListener1); mClockManager.addOnClockChangedListener(mMockListener2); reset(mMockListener1, mMockListener2); Loading Loading
packages/SystemUI/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -696,8 +696,7 @@ <provider android:name="com.android.keyguard.clock.ClockOptionsProvider" android:authorities="com.android.keyguard.clock" android:enabled="false" android:exported="false" android:exported="true" android:grantUriPermissions="true"> </provider> Loading
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import javax.inject.Named; public class KeyguardClockSwitch extends RelativeLayout { private static final String TAG = "KeyguardClockSwitch"; private static final boolean CUSTOM_CLOCKS_ENABLED = false; private static final boolean CUSTOM_CLOCKS_ENABLED = true; /** * Animation fraction when text is transitioned to/from bold. Loading
packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -149,8 +149,6 @@ public final class ClockManager { LayoutInflater layoutInflater = injectionInflater.injectable(LayoutInflater.from(context)); addBuiltinClock(() -> new DefaultClockController(res, layoutInflater, colorExtractor)); addBuiltinClock(() -> new BubbleClockController(res, layoutInflater, colorExtractor)); addBuiltinClock(() -> new AnalogClockController(res, layoutInflater, colorExtractor)); // Store the size of the display for generation of clock preview. DisplayMetrics dm = res.getDisplayMetrics(); Loading Loading @@ -211,7 +209,8 @@ public final class ClockManager { return mContentObserver; } private void addBuiltinClock(Supplier<ClockPlugin> pluginSupplier) { @VisibleForTesting void addBuiltinClock(Supplier<ClockPlugin> pluginSupplier) { ClockPlugin plugin = pluginSupplier.get(); mPreviewClocks.addClockPlugin(plugin); mBuiltinClocks.add(pluginSupplier); Loading
packages/SystemUI/tests/src/com/android/keyguard/clock/ClockManagerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,8 @@ public final class ClockManagerTest extends SysuiTestCase { mMockPluginManager, mMockColorExtractor, mMockContentResolver, mMockCurrentUserObserable, mMockSettingsWrapper, mFakeDockManager); mClockManager.addBuiltinClock(() -> new BubbleClockController( getContext().getResources(), inflater, mMockColorExtractor)); mClockManager.addOnClockChangedListener(mMockListener1); mClockManager.addOnClockChangedListener(mMockListener2); reset(mMockListener1, mMockListener2); Loading