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

Commit 88c80b10 authored by Hyejin Kim's avatar Hyejin Kim Committed by Sungmin Choi
Browse files

avoid stopping app in case of accessing empty db

When accessing empty database, Setting App is stopped, sometimes.
To avoid stopping app, check null for cursor

Change-Id: I71ec067f502d12a9215a9abdbe9e23fc07af17bb
parent bbe409d3
Loading
Loading
Loading
Loading
+37 −35
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ public class ApnSettings extends PreferenceActivity implements
                "_id", "name", "apn", "type"}, where, null,
                Telephony.Carriers.DEFAULT_SORT_ORDER);

        if (cursor != null) {
            PreferenceGroup apnList = (PreferenceGroup) findPreference("apn_list");
            apnList.removeAll();

@@ -203,6 +204,7 @@ public class ApnSettings extends PreferenceActivity implements
                apnList.addPreference(preference);
            }
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {