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

Commit e496041a authored by Danny Baumann's avatar Danny Baumann
Browse files

Ignore null groupId when restoring default account.

When restoring accounts in sPhoneAccountXml.readFromXml, the groupId of
the newly created accounts isn't filled (setGroupId isn't called on the
builder) and thus none of the accounts have a group ID assigned. When
then running setUserSelectedOutgoingPhoneAccount(), the used groupId
consequently is empty, thus it doesn't seem correct to mandate it being
non-empty when later restoring it.

Change-Id: I14256616bae62e6689e0d2d4751f41bd90dfcba6
parent 529106c9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1532,7 +1532,7 @@ public class PhoneAccountRegistrar {
                        int outerDepth = parser.getDepth();
                        PhoneAccountHandle accountHandle = null;
                        String userSerialNumberString = null;
                        String groupId = "";
                        String groupId = null;
                        while (XmlUtils.nextElementWithin(parser, outerDepth)) {
                            if (parser.getName().equals(ACCOUNT_HANDLE)) {
                                parser.nextTag();
@@ -1557,9 +1557,9 @@ public class PhoneAccountRegistrar {
                                        "Could not parse UserHandle " + userSerialNumberString);
                            }
                        }
                        if (accountHandle != null && userHandle != null && groupId != null) {
                        if (accountHandle != null && userHandle != null) {
                            return new DefaultPhoneAccountHandle(userHandle, accountHandle,
                                    groupId);
                                    groupId != null ? groupId : "");
                        }
                    }
                    return null;