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

Commit c3063001 authored by Sudheer Reddy Yampalla's avatar Sudheer Reddy Yampalla Committed by Steve Kondik
Browse files

Telephony: Avoid list of Apns in ApnSettingsMenu

Don't display any Apns in the ApnSettingsMenu when
getOperatorNumericSelection returns empty

Change-Id: I8f425e75c995f9825905983dc1bdc94f15f2054e
CRs-fixed: 486026
(cherry picked from commit 09e0403e2199c65e567775994ffe990281fc5183)
(cherry picked from commit d483b697e2acc4eef23a8cd743be97b2febdb565)
(cherry picked from commit c89dc4e90cff4d0f3342cf3862d159ff785b2a2e)
parent 0083f543
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.preference.PreferenceActivity;
import android.preference.PreferenceGroup;
import android.preference.PreferenceScreen;
import android.provider.Telephony;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
@@ -161,6 +162,12 @@ public class ApnSettings extends SettingsPreferenceFragment implements

    private void fillList() {
        String where = getOperatorNumericSelection();

        if (TextUtils.isEmpty(where)) {
            Log.d(TAG, "getOperatorNumericSelection is empty ");
            return;
        }

        Cursor cursor = getContentResolver().query(Telephony.Carriers.CONTENT_URI, new String[] {
                "_id", "name", "apn", "type"}, where, null,
                Telephony.Carriers.DEFAULT_SORT_ORDER);