Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8ac926f authored by yuichiro fujiwara's avatar yuichiro fujiwara Committed by Takahiro Manabe
Browse files

Fixed the issue Label name disappear when user change orientation

The cause is that the label list is empty after orientation change.
Initialize the cursor position for acquiring label data,
Fix to be able to get label data even after orientation change.

Affected area:
Label data acquisition processing.

Bug: 672276622
Change-Id: I0b633797a910de6878c220e8ab85dbba2d8ff126
parent a33aca87
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -123,6 +123,12 @@ public class DrawerFragment extends Fragment implements AccountsListener {
                        return;
                    }
                    mGroupListItems.clear();
                    // Initialize cursor's position. If Activity relaunched by orientation change,
                    // only onLoadFinished is called. OnCreateLoader is not called.
                    // The cursor's position is remain end position by moveToNext when the last
                    // onLoadFinished was called.
                    // Therefore, if cursor position was not initialized mGroupListItems is empty.
                    data.moveToPosition(-1);
                    for (int i = 0; i < data.getCount(); i++) {
                        if (data.moveToNext()) {
                            mGroupListItems.add(GroupUtil.getGroupListItem(data, i));