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

Commit 6bd8601e authored by Lucas Dupin's avatar Lucas Dupin
Browse files

New keyguard slice data structure

Using androidx package and new API, also splitting content into
multiple views for better animation support.

Bug: 64155983
Test: visual, see data from provider propagate to AoD
Change-Id: I74b5511d582e7ec1f6ffe5dbc5595f54b9ccb202
parent dc4cb146
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5777,6 +5777,14 @@ public final class Settings {
        public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
            "touch_exploration_granted_accessibility_services";

        /**
         * Uri of the slice that's presented on the keyguard.
         * Defaults to a slice with the date and next alarm.
         *
         * @hide
         */
        public static final String KEYGUARD_SLICE_URI = "keyguard_slice_uri";

        /**
         * Whether to speak passwords while in accessibility mode.
         *
+2 −1
Original line number Diff line number Diff line
@@ -525,7 +525,8 @@ public class SettingsBackupTest {
                 Settings.Secure.VOICE_INTERACTION_SERVICE,
                 Settings.Secure.VOICE_RECOGNITION_SERVICE,
                 Settings.Secure.INSTANT_APPS_ENABLED,
                 Settings.Secure.BACKUP_MANAGER_CONSTANTS);
                 Settings.Secure.BACKUP_MANAGER_CONSTANTS,
                 Settings.Secure.KEYGUARD_SLICE_URI);

    @Test
    public void systemSettingsBackedUpOrBlacklisted() {
+6 −1
Original line number Diff line number Diff line
@@ -39,7 +39,12 @@ LOCAL_STATIC_ANDROID_LIBRARIES := \
    android-support-v7-mediarouter \
    android-support-v7-palette \
    android-support-v14-preference \
    android-support-v17-leanback
    android-support-v17-leanback \
    android-slices-core \
    android-slices-view \
    android-slices-builders \
    apptoolkit-arch-core-runtime \
    apptoolkit-lifecycle-extensions \

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-tags \
+4 −15
Original line number Diff line number Diff line
@@ -24,31 +24,20 @@
    android:layout_marginEnd="16dp"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/date_owner_info_margin"
    android:layout_gravity="center_horizontal"
    android:paddingTop="4dp"
    android:clipToPadding="false"
    android:orientation="vertical"
    android:layout_centerHorizontal="true">
    <TextView android:id="@+id/title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:ellipsize="end"
              android:fadingEdge="horizontal"
              android:gravity="center"
              android:textSize="22sp"
              android:textColor="?attr/wallpaperTextColor"
              android:layout_marginBottom="@dimen/widget_vertical_padding"
              android:theme="@style/TextAppearance.Keyguard"
    />
    <TextView android:id="@+id/text"
    <LinearLayout android:id="@+id/row"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:singleLine="true"
              android:orientation="horizontal"
              android:gravity="center"
              android:visibility="gone"
              android:textSize="16sp"
              android:textColor="?attr/wallpaperTextColor"
              android:layout_marginTop="4dp"
              android:ellipsize="end"
    />
</com.android.keyguard.KeyguardSliceView>
 No newline at end of file
+13 −4
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
        android:orientation="vertical">
        <RelativeLayout
            android:id="@+id/keyguard_clock_container"
            android:animateLayoutChanges="true"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|top">
@@ -59,14 +60,23 @@
                android:layout_toEndOf="@id/clock_view"
                android:visibility="invisible"
                android:src="@drawable/ic_aod_charging_24dp"
                android:contentDescription="@string/accessibility_ambient_display_charging"
            />
                android:contentDescription="@string/accessibility_ambient_display_charging" />
            <View
                android:id="@+id/clock_separator"
                android:layout_width="16dp"
                android:layout_height="1dp"
                android:layout_marginTop="10dp"
                android:layout_below="@id/clock_view"
                android:background="#f00"
                android:layout_centerHorizontal="true" />

            <include layout="@layout/keyguard_status_area"
                android:id="@+id/keyguard_status_area"
                android:layout_marginTop="10dp"
                android:layout_marginBottom="@dimen/widget_vertical_padding"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/clock_view" />
                android:layout_below="@id/clock_separator" />
        </RelativeLayout>

        <TextView
@@ -83,6 +93,5 @@
            android:letterSpacing="0.05"
            android:ellipsize="marquee"
            android:singleLine="true" />

    </LinearLayout>
</com.android.keyguard.KeyguardStatusView>
Loading