diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index d1c6a4f39a..788c6d5bbb 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -76,6 +76,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.DragSource; import com.android.launcher3.DropTarget; import com.android.launcher3.ExtendedEditText; +import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.OnAlarmListener; import com.android.launcher3.R; @@ -1141,8 +1142,12 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo } private void updateItemLocationsInDatabaseBatch(boolean isBind) { + // b/409061698 We need to get the DeviceProfile directly from the activity but to fix the + // issue we will merge this solution. FolderGridOrganizer verifier = createFolderGridOrganizer( - mActivityContext.getDeviceProfile()).setFolderInfo(mInfo); + InvariantDeviceProfile.INSTANCE.get(mActivityContext.asContext()) + .getDeviceProfile(mActivityContext.asContext()) + ).setFolderInfo(mInfo); ArrayList items = new ArrayList<>(); int total = mInfo.getContents().size();