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

Commit 1754f33a authored by Santiago Etchebehere's avatar Santiago Etchebehere
Browse files

Remove support for wallpapers in style bundles

This CL doesn't yet implement the new preview UI, just removes support
all the usages and support for wallpaper in theme bundles.

Bug: 151868805
Change-Id: I0a7de9ff2150c8f3e516ec49c7c833bab7ac08d1
parent 98b05ac2
Loading
Loading
Loading
Loading
+7 −23
Original line number Diff line number Diff line
@@ -55,30 +55,14 @@
                    android:layout_height="0dp"
                    android:layout_weight="1"/>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@null"
                    android:paddingHorizontal="10dp">
                    <CheckBox
                        android:id="@+id/use_my_wallpaper"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentStart="true"
                        android:layout_centerVertical="true"
                        android:layout_toStartOf="@+id/apply_button"
                        android:ellipsize="end"
                        android:paddingLeft="4dp"
                        android:minHeight="@dimen/min_taptarget_height"
                        android:text="@string/keep_my_wallpaper"/>
                <Button
                    android:id="@+id/apply_button"
                    style="@style/ActionPrimaryButton"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                    android:layout_gravity="end"
                    android:paddingHorizontal="10dp"
                    android:text="@string/apply_theme_btn"/>
                </RelativeLayout>
            </LinearLayout>
        </LinearLayout>

+0 −18
Original line number Diff line number Diff line
@@ -53,29 +53,11 @@
                android:layout_gravity="bottom|center_horizontal"
                android:layout_marginTop="10dp"
                android:layout_weight="1"
                app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/theme_preview_pager"
                app:layout_constraintVertical_bias="1.0"/>

            <CheckBox
                android:id="@+id/use_my_wallpaper"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/min_taptarget_height"
                android:layout_marginStart="10dp"
                android:ellipsize="end"
                android:gravity="start|center_vertical"
                android:paddingLeft="4dp"
                android:text="@string/keep_my_wallpaper"
                app:layout_constraintBottom_toTopOf="@id/apply_button"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHeight_min="@dimen/min_taptarget_height"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/options_container"
                app:layout_constraintVertical_bias="1.0"/>

            <Button
                android:id="@+id/apply_button"
                style="@style/ActionPrimaryButton"
+0 −18
Original line number Diff line number Diff line
@@ -55,29 +55,11 @@
                android:layout_gravity="bottom|center_horizontal"
                android:layout_marginTop="10dp"
                android:layout_weight="1"
                app:layout_constraintBottom_toTopOf="@id/use_my_wallpaper"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="1.0" />

            <CheckBox
                android:id="@+id/use_my_wallpaper"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/min_taptarget_height"
                android:layout_marginStart="10dp"
                android:ellipsize="end"
                android:gravity="start|center_vertical"
                android:paddingLeft="4dp"
                android:text="@string/keep_my_wallpaper"
                app:layout_constraintBottom_toTopOf="@id/apply_button"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHeight_min="@dimen/min_taptarget_height"
                app:layout_constraintHorizontal_bias="0.0"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/options_container"
                app:layout_constraintVertical_bias="1.0" />

            <Button
                android:id="@+id/apply_button"
                style="@style/ActionPrimaryButton"
+0 −31
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2019 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/preview_static_image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    tools:showIn="@layout/theme_preview_card">
    <TextView
        style="@style/CardTitleTextAppearance"
        android:id="@+id/wallpaper_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal|bottom"/>
</FrameLayout>
 No newline at end of file
+2 −4
Original line number Diff line number Diff line
@@ -40,12 +40,11 @@ import android.provider.Settings;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;

import com.android.customization.model.CustomizationManager.OptionsFetchedListener;
import com.android.customization.model.CustomizationManager.Callback;
import com.android.customization.model.CustomizationManager.OptionsFetchedListener;
import com.android.customization.model.theme.custom.CustomTheme;
import com.android.customization.module.ThemesUserEventLogger;
import com.android.customization.testutils.OverlayManagerMocks;
import com.android.wallpaper.module.WallpaperSetter;

import org.json.JSONObject;
import org.junit.After;
@@ -61,7 +60,6 @@ import org.robolectric.RobolectricTestRunner;
public class ThemeManagerTest {

    @Mock OverlayManagerCompat mMockOm;
    @Mock WallpaperSetter mMockWallpaperSetter;
    @Mock ThemesUserEventLogger mThemesUserEventLogger;
    @Mock ThemeBundleProvider mThemeBundleProvider;
    private OverlayManagerMocks mMockOmHelper;
@@ -75,7 +73,7 @@ public class ThemeManagerTest {
        mActivity = spy(activity);
        mMockOmHelper = new OverlayManagerMocks();
        mMockOmHelper.setUpMock(mMockOm);
        mThemeManager = new ThemeManager(mThemeBundleProvider, activity, mMockWallpaperSetter,
        mThemeManager = new ThemeManager(mThemeBundleProvider, activity,
                mMockOm, mThemesUserEventLogger);
    }

Loading