Launcher changes to support dynamic coloring on static widgets.
Bug: 179783721 Test: By hand using the AppWidgetDynamicColors widget Change-Id: I27863cac31f2f6c29f5a717ff8d4492325f936fb
This commit is contained in:
@@ -186,7 +186,6 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
@Thunk final Launcher mLauncher;
|
||||
@Thunk DragController mDragController;
|
||||
|
||||
private final Rect mTempRect = new Rect();
|
||||
private final int[] mTempXY = new int[2];
|
||||
private final float[] mTempFXY = new float[2];
|
||||
@Thunk float[] mDragViewVisualCenter = new float[2];
|
||||
@@ -367,10 +366,19 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
}
|
||||
|
||||
public float getWallpaperOffsetForCenterPage() {
|
||||
int pageScroll = getScrollForPage(getPageNearestToCenterOfScreen());
|
||||
return getWallpaperOffsetForPage(getPageNearestToCenterOfScreen());
|
||||
}
|
||||
|
||||
private float getWallpaperOffsetForPage(int page) {
|
||||
int pageScroll = getScrollForPage(page);
|
||||
return mWallpaperOffset.wallpaperOffsetForScroll(pageScroll);
|
||||
}
|
||||
|
||||
/** Returns the number of pages used for the wallpaper parallax. */
|
||||
public int getNumPagesForWallpaperParallax() {
|
||||
return mWallpaperOffset.getNumPagesForWallpaperParallax();
|
||||
}
|
||||
|
||||
public Rect estimateItemPosition(CellLayout cl, int hCell, int vCell, int hSpan, int vSpan) {
|
||||
Rect r = new Rect();
|
||||
cl.cellToRect(hCell, vCell, hSpan, vSpan, r);
|
||||
|
||||
Reference in New Issue
Block a user