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

Commit 772e675f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7419753 from 91a8fe9c to sc-release

Change-Id: I6a75b9286bce0559fce5165b6573cd4ff15f5afa
parents 26fe1e91 91a8fe9c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -100,7 +100,8 @@
        <item name="android:maxLength">100</item>
    </style>

    <style name="SectionTitleTextStyle" parent="@android:style/TextAppearance.Material">
    <style name="SectionTitleTextStyle">
        <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
        <item name="android:textColor">?android:textColorPrimary</item>
        <item name="android:textDirection">locale</item>
        <item name="android:textSize">20sp</item>
@@ -108,6 +109,7 @@
    </style>

    <style name="SectionSubtitleTextStyle" parent="SectionTitleTextStyle">
        <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item>
        <item name="android:textColor">?android:textColorSecondary</item>
        <item name="android:textSize">14sp</item>
        <item name="android:lineHeight">20dp</item>
+4 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import com.android.customization.module.CustomizationInjector;
import com.android.customization.module.ThemesUserEventLogger;
import com.android.wallpaper.R;
import com.android.wallpaper.module.InjectorProvider;
import com.android.wallpaper.util.PreviewUtils;

import java.util.List;

@@ -84,8 +85,9 @@ public class GridOptionsManager implements CustomizationManager<GridOption> {
    }

    /** Call through content provider API to render preview */
    public Bundle renderPreview(Bundle bundle, String gridName) {
        return mProvider.renderPreview(gridName, bundle);
    public void renderPreview(Bundle bundle, String gridName,
            PreviewUtils.WorkspacePreviewCallback callback) {
        mProvider.renderPreview(gridName, bundle, callback);
    }

    private static class FetchTask extends AsyncTask<Void, Void, List<GridOption>> {
+4 −2
Original line number Diff line number Diff line
@@ -111,10 +111,12 @@ public class LauncherGridOptionsProvider {
     * @param name      the grid option name
     * @param bundle    surface view request bundle generated from
     *    {@link com.android.wallpaper.util.SurfaceViewUtils#createSurfaceViewRequest(SurfaceView)}.
     * @param callback To receive the result (will be called on the main thread)
     */
    Bundle renderPreview(String name, Bundle bundle) {
    void renderPreview(String name, Bundle bundle,
            PreviewUtils.WorkspacePreviewCallback callback) {
        bundle.putString("name", name);
        return mPreviewUtils.renderPreview(bundle);
        mPreviewUtils.renderPreview(bundle, callback);
    }

    int applyGrid(String name) {
+5 −4
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
package com.android.customization.picker.grid;

import android.content.Context;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.ViewGroup;
@@ -24,6 +23,7 @@ import android.view.ViewGroup;
import com.android.customization.model.grid.GridOption;
import com.android.customization.model.grid.GridOptionsManager;
import com.android.wallpaper.picker.WorkspaceSurfaceHolderCallback;
import com.android.wallpaper.util.PreviewUtils;
import com.android.wallpaper.util.SurfaceViewUtils;

/** A class to load the {@link GridOption} preview to the view. */
@@ -90,10 +90,11 @@ class GridOptionPreviewer {
        }

        @Override
        protected Bundle requestPreview(SurfaceView workspaceSurface) {
            return mGridManager.renderPreview(
        protected void requestPreview(SurfaceView workspaceSurface,
                PreviewUtils.WorkspacePreviewCallback callback) {
            mGridManager.renderPreview(
                    SurfaceViewUtils.createSurfaceViewRequest(workspaceSurface),
                    mGridOption.name);
                    mGridOption.name, callback);
        }
    }
}