Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 19a3b93a authored by George Lin's avatar George Lin
Browse files

[TP] Clock section to listen to selected clock

The clock section needs to listen to the currently selected clock

Test: Manually tetsted that the section was by default hidden. And shown
when flag was turned on https://screenshot.googleplex.com/BogjNvtmmc9RjsR
Bug: 262924055

Change-Id: I4a6df7823fc3a9846fcdbf52cd05e18bc118a9be
parent 8876d7cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,6 @@
    android:viewportHeight="24"
    android:tint="?attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:fillColor="?android:textColorPrimary"
        android:pathData="M15.3,16.7 L16.7,15.3 13,11.6V7H11V12.4ZM12,22Q9.925,22 8.1,21.212Q6.275,20.425 4.925,19.075Q3.575,17.725 2.788,15.9Q2,14.075 2,12Q2,9.925 2.788,8.1Q3.575,6.275 4.925,4.925Q6.275,3.575 8.1,2.787Q9.925,2 12,2Q14.075,2 15.9,2.787Q17.725,3.575 19.075,4.925Q20.425,6.275 21.212,8.1Q22,9.925 22,12Q22,14.075 21.212,15.9Q20.425,17.725 19.075,19.075Q17.725,20.425 15.9,21.212Q14.075,22 12,22ZM12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12Q12,12 12,12ZM12,20Q15.325,20 17.663,17.663Q20,15.325 20,12Q20,8.675 17.663,6.337Q15.325,4 12,4Q8.675,4 6.338,6.337Q4,8.675 4,12Q4,15.325 6.338,17.663Q8.675,20 12,20Z"/>
</vector>
 No newline at end of file
+3 −4
Original line number Diff line number Diff line
@@ -33,10 +33,11 @@
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/clock_title"
            android:text="@string/clock_settings_title"
            style="@style/SectionTitleTextStyle" />

        <TextView
            android:id="@+id/selected_clock_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/clock_description"
@@ -49,7 +50,5 @@
        android:scaleType="center"
        android:src="@drawable/ic_clock_24px"
        android:background="@drawable/option_border_color"
        android:contentDescription="@string/clock_picker_entry_content_description"
        android:tint="@color/text_color_primary" />

        android:contentDescription="@string/clock_picker_entry_content_description" />
</com.android.customization.picker.clock.ClockSectionView>
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <FrameLayout
        android:id="@+id/section_header_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/clock_preview_card_list_demo"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">
        <include layout="@layout/section_header" />
    </FrameLayout>
    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/clock_preview_card_list_demo"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/section_header_container"
        android:clipToPadding="false" />
</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -33,6 +33,9 @@
    <!-- The content description of clock entry. [CHAR LIMIT=NONE] -->
    <string name="clock_picker_entry_content_description">Change a custom clock</string>

    <!-- Title of a section of the customization picker where the user can configure Clock face. [CHAR LIMIT=15] -->
    <string name="clock_settings_title">Clock Settings</string>

    <!-- Title of a section of the customization picker where the user can select a Grid size for
        the home screen. [CHAR LIMIT=15] -->
    <string name="grid_title">App grid</string>
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ import com.android.customization.model.theme.OverlayManagerCompat
import com.android.customization.model.theme.ThemeBundleProvider
import com.android.customization.model.theme.ThemeManager
import com.android.customization.picker.quickaffordance.domain.interactor.KeyguardQuickAffordancePickerInteractor
import com.android.systemui.plugins.PluginManager
import com.android.systemui.shared.clocks.ClockRegistry
import com.android.wallpaper.module.Injector

interface CustomizationInjector : Injector {
@@ -36,4 +38,8 @@ interface CustomizationInjector : Injector {
    fun getKeyguardQuickAffordancePickerInteractor(
        context: Context
    ): KeyguardQuickAffordancePickerInteractor

    fun getClockRegistry(context: Context): ClockRegistry

    fun getPluginManager(context: Context): PluginManager
}
Loading