am 6400b84d: Update custom content insets when Workspace insets are set

* commit '6400b84d5594d7b9244e3b118f107033eb8b87a0':
  Update custom content insets when Workspace insets are set
This commit is contained in:
Adam Cohen
2013-11-28 02:37:44 -08:00
committed by Android Git Automerger

View File

@@ -334,6 +334,14 @@ public class Workspace extends SmoothPagedView
@Override
public void setInsets(Rect insets) {
mInsets.set(insets);
CellLayout customScreen = getScreenWithId(CUSTOM_CONTENT_SCREEN_ID);
if (customScreen != null) {
View customContent = customScreen.getShortcutsAndWidgets().getChildAt(0);
if (customContent instanceof Insettable) {
((Insettable) customContent).setInsets(mInsets);
}
}
}
// estimate the size of a widget with spans hSpan, vSpan. return MAX_VALUE for each