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

Commit 2fb59239 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Use DefaultModel first, fall back to XmlModel

- Account manager isn't providing xml model atm
parent 05f4ce3e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -152,14 +152,14 @@ public final class Sources extends BroadcastReceiver implements OnAccountsUpdate

            Model model;
            try {
                // try to load the XML model
                model = new XmlModel(mContext, authenticator);
                model = new DefaultModel(mContext, authenticator.type);
                model.inflate();
                Log.i(TAG, "inflated model for " + authenticator.type);
            } catch (ModelInflaterException e) {
                Log.e(TAG, "error inflating model for " + authenticator.packageName, e);
                model = new DefaultModel(mContext, authenticator.type);
                try {
                    // try to load the XML model
                    model = new XmlModel(mContext, authenticator);
                    model.inflate();
                } catch (ModelInflaterException e1) {
                    continue;