Fix automatic network selection mode issue

Currently, if user selects "Choose automatically"
in Settings > More > Cellular networks > Network operators,
dialog is shown infinitely, and user can not cancel with back key.
Because COMPLETE message is not sent in case of already automatic mode.
To fix it, change to send COMPLETE message even if already automatic mode.

Bug: 24270612
Change-Id: Id312ac846c95a32337aebbd815de03416f2b614f
diff --git a/src/java/com/android/internal/telephony/PhoneBase.java b/src/java/com/android/internal/telephony/PhoneBase.java
index 9163d1a..e037005 100644
--- a/src/java/com/android/internal/telephony/PhoneBase.java
+++ b/src/java/com/android/internal/telephony/PhoneBase.java
@@ -1019,23 +1019,26 @@
                 // send the setting on error
             }
         }
-        if (doAutomatic) {
-            // wrap the response message in our own message along with
-            // an empty string (to indicate automatic selection) for the
-            // operator's id.
-            NetworkSelectMessage nsm = new NetworkSelectMessage();
-            nsm.message = response;
-            nsm.operatorNumeric = "";
-            nsm.operatorAlphaLong = "";
-            nsm.operatorAlphaShort = "";
 
+        // wrap the response message in our own message along with
+        // an empty string (to indicate automatic selection) for the
+        // operator's id.
+        NetworkSelectMessage nsm = new NetworkSelectMessage();
+        nsm.message = response;
+        nsm.operatorNumeric = "";
+        nsm.operatorAlphaLong = "";
+        nsm.operatorAlphaShort = "";
+
+        if (doAutomatic) {
             Message msg = obtainMessage(EVENT_SET_NETWORK_AUTOMATIC_COMPLETE, nsm);
             mCi.setNetworkSelectionModeAutomatic(msg);
-
-            updateSavedNetworkOperator(nsm);
         } else {
             Rlog.d(LOG_TAG, "setNetworkSelectionModeAutomatic - already auto, ignoring");
+            ar.userObj = nsm;
+            handleSetSelectNetwork(ar);
         }
+
+        updateSavedNetworkOperator(nsm);
     }
 
     @Override