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

Commit 748d2ee8 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7233012 from 578444e1 to sc-v2-release

Change-Id: Iedb4bd96e660630513c079cfd7c7e6bb1e83f745
parents 45814b61 578444e1
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ import com.android.wallpaper.module.Injector;
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.module.UserEventLogger;
import com.android.wallpaper.module.WallpaperPreferences;
import com.android.wallpaper.picker.AppbarFragment.AppbarFragmentHost;
import com.android.wallpaper.picker.BottomActionBarFragment;
import com.android.wallpaper.picker.CategoryFragment;
import com.android.wallpaper.picker.CategoryFragment.CategoryFragmentHost;
@@ -92,7 +93,7 @@ import java.util.Map;
 *  Fragments providing customization options.
 */
public class CustomizationPickerActivity extends FragmentActivity implements WallpapersUiContainer,
        CategoryFragmentHost, CustomizationFragmentHost,
        AppbarFragmentHost, CategoryFragmentHost, CustomizationFragmentHost,
        ThemeFragmentHost, GridFragmentHost,
        ClockFragmentHost, BottomActionBarHost, FragmentTransactionChecker {

@@ -514,6 +515,16 @@ public class CustomizationPickerActivity extends FragmentActivity implements Wal
        return mIsSafeToCommitFragmentTransaction;
    }

    @Override
    public void onUpArrowPressed() {
        onBackPressed();
    }

    @Override
    public boolean isUpArrowSupported() {
        return true;
    }

    /**
     * {@link CustomizationSection} corresponding to the "Wallpaper" section of the Picker.
     */
+13 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import androidx.fragment.app.FragmentActivity;
import com.android.customization.picker.grid.GridFullPreviewFragment;
import com.android.customization.picker.theme.ThemeFullPreviewFragment;
import com.android.wallpaper.R;
import com.android.wallpaper.picker.AppbarFragment.AppbarFragmentHost;
import com.android.wallpaper.widget.BottomActionBar;
import com.android.wallpaper.widget.BottomActionBar.BottomActionBarHost;

@@ -37,7 +38,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/** Activity for full preview. */
public class ViewOnlyFullPreviewActivity extends FragmentActivity implements BottomActionBarHost {
public class ViewOnlyFullPreviewActivity extends FragmentActivity implements AppbarFragmentHost,
        BottomActionBarHost {

    private static final String EXTRA_PREVIEW_SECTION = "preview_section";
    private static final String EXTRA_PREVIEW_BUNDLE = "preview_bundle";
@@ -46,6 +48,16 @@ public class ViewOnlyFullPreviewActivity extends FragmentActivity implements Bot
    public static final int SECTION_GRID = 1;
    public static final int SECTION_CLOCK = 2;

    @Override
    public void onUpArrowPressed() {
        onBackPressed();
    }

    @Override
    public boolean isUpArrowSupported() {
        return true;
    }

    @IntDef({SECTION_STYLE, SECTION_GRID, SECTION_CLOCK})
    @Retention(RetentionPolicy.SOURCE)
    private @interface Section {}
+3 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import com.android.wallpaper.model.WallpaperInfo;
import com.android.wallpaper.module.CurrentWallpaperInfoFactory;
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.picker.AppbarFragment;
import com.android.wallpaper.util.ActivityUtils;
import com.android.wallpaper.widget.BottomActionBar;

import com.bumptech.glide.Glide;
@@ -126,7 +127,7 @@ public class GridFragment extends AppbarFragment {
            @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(
                R.layout.fragment_grid_picker, container, /* attachToRoot */ false);
        setUpToolbar(view);
        setUpToolbar(view, ActivityUtils.isLaunchedFromSettings(getActivity().getIntent()));
        mContent = view.findViewById(R.id.content_section);
        mOptionsContainer = view.findViewById(R.id.options_container);
        mLoading = view.findViewById(R.id.loading_indicator);
@@ -184,6 +185,7 @@ public class GridFragment extends AppbarFragment {

    @Override
    protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
        super.onBottomActionBarReady(bottomActionBar);
        mBottomActionBar = bottomActionBar;
        mBottomActionBar.showActionsOnly(APPLY);
        mBottomActionBar.setActionClickListener(APPLY, unused -> applyGridOption(mSelectedOption));
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ public class GridFullPreviewFragment extends AppbarFragment {

    @Override
    protected void onBottomActionBarReady(BottomActionBar bottomActionBar) {
        super.onBottomActionBarReady(bottomActionBar);
        bottomActionBar.showActionsOnly(APPLY);
        bottomActionBar.setActionClickListener(APPLY, v -> finishActivityWithResultOk());
        bottomActionBar.show();
+15 −1
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import com.android.customization.module.ThemesUserEventLogger;
import com.android.customization.picker.theme.CustomThemeStepFragment.CustomThemeComponentStepHost;
import com.android.wallpaper.R;
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.picker.AppbarFragment.AppbarFragmentHost;

import org.json.JSONException;

@@ -60,7 +61,7 @@ import java.util.ArrayList;
import java.util.List;

public class CustomThemeActivity extends FragmentActivity implements
        CustomThemeComponentStepHost {
        AppbarFragmentHost, CustomThemeComponentStepHost {
    public static final String EXTRA_THEME_ID = "CustomThemeActivity.ThemeId";
    public static final String EXTRA_THEME_TITLE = "CustomThemeActivity.ThemeTitle";
    public static final String EXTRA_THEME_PACKAGES = "CustomThemeActivity.ThemePackages";
@@ -283,6 +284,19 @@ public class CustomThemeActivity extends FragmentActivity implements
        return mCustomThemeManager;
    }

    @Override
    public void onUpArrowPressed() {
        // Skip it because CustomThemeStepFragment will implement cancel button
        // (instead of up arrow) on action bar.
    }

    @Override
    public boolean isUpArrowSupported() {
        // Skip it because CustomThemeStepFragment will implement cancel button
        // (instead of up arrow) on action bar.
        return false;
    }

    /**
     * Represents a step in selecting a custom theme, picking a particular component (eg font,
     * color, shape, etc).
Loading