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

* commit '6229a0d564d02d661b8b362dbec2bd748675bbfb':
  Update custom content insets when Workspace insets are set
This commit is contained in:
Adam Cohen
2014-02-14 20:38:18 +00:00
committed by Android Git Automerger
+8
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