Loading res/values/styles.xml +3 −1 Original line number Diff line number Diff line Loading @@ -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> Loading @@ -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> Loading src/com/android/customization/model/grid/GridOptionsManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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>> { Loading src/com/android/customization/model/grid/LauncherGridOptionsProvider.java +4 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading src/com/android/customization/picker/grid/GridOptionPreviewer.java +5 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. */ Loading Loading @@ -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); } } } Loading
res/values/styles.xml +3 −1 Original line number Diff line number Diff line Loading @@ -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> Loading @@ -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> Loading
src/com/android/customization/model/grid/GridOptionsManager.java +4 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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>> { Loading
src/com/android/customization/model/grid/LauncherGridOptionsProvider.java +4 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading
src/com/android/customization/picker/grid/GridOptionPreviewer.java +5 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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. */ Loading Loading @@ -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); } } }