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

Commit a2cee8c9 authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

Merging from ub-launcher3-master @ build 6632592

Bug:154410862
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-d1-dev_6632592.html

Change-Id: Ibd958ce06b510beb44efed5daf36e814d366e565
parents e496c66c 7ab870c1
Loading
Loading
Loading
Loading
+27 −20
Original line number Original line Diff line number Diff line
@@ -58,7 +58,22 @@
            android:background="@color/divider_color"
            android:background="@color/divider_color"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/component_preview_container"/>
            app:layout_constraintTop_toBottomOf="@+id/component_preview_container"
            app:layout_constraintBottom_toTopOf="@+id/component_scroll_view"/>

        <ScrollView
            android:id="@+id/component_scroll_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/divider"
            app:layout_constraintBottom_toBottomOf="parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">
        
        
                <TextView
                <TextView
                    android:id="@+id/component_options_title"
                    android:id="@+id/component_options_title"
@@ -68,22 +83,14 @@
                    android:layout_marginHorizontal="16dp"
                    android:layout_marginHorizontal="16dp"
                    android:textAlignment="center"
                    android:textAlignment="center"
                    android:textAppearance="@style/TitleTextAppearance"
                    android:textAppearance="@style/TitleTextAppearance"
            android:textSize="@dimen/component_options_title_size"
                    android:textSize="@dimen/component_options_title_size" />
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/component_preview_container"
            app:layout_constraintBottom_toTopOf="@+id/options_container"/>


                <androidx.recyclerview.widget.RecyclerView
                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/options_container"
                    android:id="@+id/options_container"
                    android:layout_width="match_parent"
                    android:layout_width="match_parent"
            android:layout_height="0dp"
                    android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
                    android:layout_gravity="center_horizontal"/>
            app:layout_constraintBottom_toBottomOf="parent"
            </LinearLayout>
            app:layout_constraintEnd_toEndOf="parent"
        </ScrollView>
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/component_options_title"
            app:layout_constraintVertical_bias="1"/>

    </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</LinearLayout>
+0 −5
Original line number Original line Diff line number Diff line
@@ -31,14 +31,9 @@
    <color name="clockface_preview_background">@android:color/black</color>
    <color name="clockface_preview_background">@android:color/black</color>


    <color name="theme_preview_icon_color">@color/google_grey700</color>
    <color name="theme_preview_icon_color">@color/google_grey700</color>
    <color name="theme_preview_workspace_shadow_color_dark">#B0000000</color>
    <color name="theme_preview_workspace_shadow_color_transparent">@android:color/transparent</color>
    <color name="theme_preview_color_icons_background">@color/material_white_100</color>
    <color name="theme_preview_color_icons_background">@color/material_white_100</color>
    <color name="theme_preview_color_icons_title_color">@color/black_87_alpha</color>
    <color name="theme_preview_color_icons_title_color">@color/black_87_alpha</color>


    <color name="text_color_dark">#2d2d2d</color>
    <color name="text_color_light">@color/material_white_text</color>

    <color name="control_grey">#757575</color>
    <color name="control_grey">#757575</color>
    <color name="switch_track_tint">#acacac</color>
    <color name="switch_track_tint">#acacac</color>
    <color name="switch_thumb_tint">#f1f1f1</color>
    <color name="switch_thumb_tint">#f1f1f1</color>
+0 −1
Original line number Original line Diff line number Diff line
@@ -86,7 +86,6 @@
    <dimen name="preview_theme_color_icons_title_text_size">12sp</dimen>
    <dimen name="preview_theme_color_icons_title_text_size">12sp</dimen>
    <dimen name="preview_theme_color_icons_icon_size">@dimen/preview_theme_icon_size</dimen>
    <dimen name="preview_theme_color_icons_icon_size">@dimen/preview_theme_icon_size</dimen>
    <dimen name="preview_theme_color_icons_tile_size">@dimen/preview_theme_tile_size</dimen>
    <dimen name="preview_theme_color_icons_tile_size">@dimen/preview_theme_tile_size</dimen>
    <dimen name="preview_theme_smartspace_key_ambient_shadow_blur">1.5dp</dimen>
    <dimen name="preview_theme_app_name_key_ambient_shadow_blur">2.5dp</dimen>
    <dimen name="preview_theme_app_name_key_ambient_shadow_blur">2.5dp</dimen>


    <!--  For the customization previews on the picker. -->
    <!--  For the customization previews on the picker. -->
+2 −2
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@
        [CHAR LIMIT=20] -->
        [CHAR LIMIT=20] -->
    <string name="custom_theme_previous">Previous</string>
    <string name="custom_theme_previous">Previous</string>


    <!-- Title for "Custom theme" option. [CHAR LIMIT=15] -->
    <!-- Title for "Custom theme" option. [CHAR LIMIT=20] -->
    <string name="custom_theme">Custom</string>
    <string name="custom_theme">Custom</string>


    <!-- Generic label for one system Style/Theme (combination of fonts/colors/icons) that is
    <!-- Generic label for one system Style/Theme (combination of fonts/colors/icons) that is
@@ -198,7 +198,7 @@
    <!-- Title for a section of a style preview screen that shows a preview of the style color and icons. [CHAR_LIMIT=30]-->
    <!-- Title for a section of a style preview screen that shows a preview of the style color and icons. [CHAR_LIMIT=30]-->
    <string name="theme_preview_icons_section_title">Color / Icons</string>
    <string name="theme_preview_icons_section_title">Color / Icons</string>


    <!-- Bottom sheet dialog which displaying different theme's info. [CHAR_LIMIT=30]
    <!-- Bottom sheet dialog which displaying different theme's info. [CHAR_LIMIT=80]
    (eg, Fonts, icons, shape, color will change to the "Default" Style) -->
    (eg, Fonts, icons, shape, color will change to the "Default" Style) -->
    <string name="style_info_description">Fonts, icons, shape, color will change to the <xliff:g name="style_name">%1$s</xliff:g> Style</string>
    <string name="style_info_description">Fonts, icons, shape, color will change to the <xliff:g name="style_name">%1$s</xliff:g> Style</string>
</resources>
</resources>
+5 −7
Original line number Original line Diff line number Diff line
@@ -17,7 +17,6 @@ package com.android.customization.model.grid;


import android.os.AsyncTask;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Bundle;
import android.util.Pair;


import androidx.annotation.NonNull;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Nullable;
@@ -66,7 +65,7 @@ public class GridOptionsManager implements CustomizationManager<GridOption> {
        return mProvider.renderPreview(gridName, bundle);
        return mProvider.renderPreview(gridName, bundle);
    }
    }


    private static class FetchTask extends AsyncTask<Void, Void, Pair<List<GridOption>, String>> {
    private static class FetchTask extends AsyncTask<Void, Void, List<GridOption>> {
        private final LauncherGridOptionsProvider mProvider;
        private final LauncherGridOptionsProvider mProvider;
        @Nullable private final OptionsFetchedListener<GridOption> mCallback;
        @Nullable private final OptionsFetchedListener<GridOption> mCallback;
        private final boolean mReload;
        private final boolean mReload;
@@ -79,16 +78,15 @@ public class GridOptionsManager implements CustomizationManager<GridOption> {
        }
        }


        @Override
        @Override
        protected Pair<List<GridOption>, String> doInBackground(Void[] params) {
        protected List<GridOption> doInBackground(Void[] params) {
            return mProvider.fetch(mReload);
            return mProvider.fetch(mReload);
        }
        }


        @Override
        @Override
        protected void onPostExecute(Pair<List<GridOption>, String> gridOptionsResult) {
        protected void onPostExecute(List<GridOption> gridOptions) {
            if (mCallback != null) {
            if (mCallback != null) {
                if (gridOptionsResult != null && gridOptionsResult.first != null
                if (gridOptions != null && !gridOptions.isEmpty()) {
                        && !gridOptionsResult.first.isEmpty()) {
                    mCallback.onOptionsLoaded(gridOptions);
                    mCallback.onOptionsLoaded(gridOptionsResult.first);
                } else {
                } else {
                    mCallback.onError(null);
                    mCallback.onError(null);
                }
                }
Loading