Recopy NetworkSelectSetting from phone to settings

NetworkSelectSetting is changed during the migration, recopy it
to make it up to date

Following CL will refactor to reuse this fragment for all devices.

Bug: 114749736
Test: Build
Change-Id: Id43cb480cf31447a6e4a23eb3709f9ab972a2930
This commit is contained in:
jackqdyulei
2018-10-23 15:01:49 -07:00
parent e2ed46e906
commit 3a2226be63
3 changed files with 126 additions and 82 deletions

View File

@@ -0,0 +1,28 @@
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="9.208dp"
android:height="17dp"
android:viewportWidth="13.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M4.600000,7.800000l0.700000,0.000000l0.000000,1.300000L4.600000,9.100000L4.600000,11.000000L3.000000,11.000000L3.000000,9.200000L0.100000,9.200000L0.000000,8.100000L3.000000,2.500000l1.700000,0.000000L4.700000,7.800000zM1.600000,7.800000L3.000000,7.800000l0.000000,-3.000000L2.900000,5.000000L1.600000,7.800000z"/>
<path
android:fillColor="#FFFFFFFF"
android:pathData="M11.900000,9.900000c-0.200000,0.400000 -0.600000,0.700000 -1.000000,0.900000s-1.000000,0.400000 -1.800000,0.400000c-0.900000,0.000000 -1.700000,-0.300000 -2.200000,-0.800000S6.100000,9.000000 6.100000,7.900000L6.100000,5.600000c0.000000,-1.100000 0.300000,-1.900000 0.800000,-2.400000S8.100000,2.400000 9.000000,2.400000c1.000000,0.000000 1.700000,0.200000 2.100000,0.700000s0.700000,1.200000 0.700000,2.100000l-1.600000,0.000000c0.000000,-0.500000 -0.100000,-0.900000 -0.200000,-1.100000S9.500000,3.700000 9.000000,3.700000c-0.400000,0.000000 -0.700000,0.200000 -0.900000,0.500000S7.700000,5.000000 7.700000,5.600000l0.000000,2.300000c0.000000,0.700000 0.100000,1.100000 0.300000,1.400000s0.600000,0.500000 1.000000,0.500000c0.300000,0.000000 0.600000,0.000000 0.700000,-0.100000s0.300000,-0.200000 0.400000,-0.300000L10.099999,7.800000L9.000000,7.800000L9.000000,6.600000l2.900000,0.000000L11.900000,9.900000z"/>
</vector>

View File

@@ -26,13 +26,13 @@ import android.telephony.SignalStrength;
import android.util.Log; import android.util.Log;
import android.view.Gravity; import android.view.Gravity;
import androidx.preference.Preference;
import com.android.settings.R; import com.android.settings.R;
import com.android.settingslib.graph.SignalDrawable; import com.android.settingslib.graph.SignalDrawable;
import java.util.List; import java.util.List;
import androidx.preference.Preference;
/** /**
* A Preference represents a network operator in the NetworkSelectSetting fragment. * A Preference represents a network operator in the NetworkSelectSetting fragment.
*/ */
@@ -45,16 +45,18 @@ public class NetworkOperatorPreference extends Preference {
private CellInfo mCellInfo; private CellInfo mCellInfo;
private List<String> mForbiddenPlmns; private List<String> mForbiddenPlmns;
private int mLevel = -1; private int mLevel = -1;
private boolean mShow4GForLTE;
// The following constants are used to draw signal icon. // The following constants are used to draw signal icon.
private static final Drawable EMPTY_DRAWABLE = new ColorDrawable(Color.TRANSPARENT); private static final Drawable EMPTY_DRAWABLE = new ColorDrawable(Color.TRANSPARENT);
private static final int NO_CELL_DATA_CONNECTED_ICON = 0; private static final int NO_CELL_DATA_CONNECTED_ICON = 0;
public NetworkOperatorPreference( public NetworkOperatorPreference(
CellInfo cellinfo, Context context, List<String> forbiddenPlmns) { CellInfo cellinfo, Context context, List<String> forbiddenPlmns, boolean show4GForLTE) {
super(context); super(context);
mCellInfo = cellinfo; mCellInfo = cellinfo;
mForbiddenPlmns = forbiddenPlmns; mForbiddenPlmns = forbiddenPlmns;
mShow4GForLTE = show4GForLTE;
refresh(); refresh();
} }
@@ -87,15 +89,21 @@ public class NetworkOperatorPreference extends Preference {
updateIcon(level); updateIcon(level);
} }
private static int getIconIdForCell(CellInfo ci) { private int getIconIdForCell(CellInfo ci) {
final int type = ci.getCellIdentity().getType(); final int type = ci.getCellIdentity().getType();
switch (type) { switch (type) {
case CellInfo.TYPE_GSM: return R.drawable.signal_strength_g; case CellInfo.TYPE_GSM:
return R.drawable.signal_strength_g;
case CellInfo.TYPE_WCDMA: // fall through case CellInfo.TYPE_WCDMA: // fall through
case CellInfo.TYPE_TDSCDMA: return R.drawable.signal_strength_3g; case CellInfo.TYPE_TDSCDMA:
case CellInfo.TYPE_LTE: return R.drawable.signal_strength_lte; return R.drawable.signal_strength_3g;
case CellInfo.TYPE_CDMA: return R.drawable.signal_strength_1x; case CellInfo.TYPE_LTE:
default: return 0; return mShow4GForLTE
? R.drawable.ic_signal_strength_4g : R.drawable.signal_strength_lte;
case CellInfo.TYPE_CDMA:
return R.drawable.signal_strength_1x;
default:
return 0;
} }
} }
@@ -117,7 +125,7 @@ public class NetworkOperatorPreference extends Preference {
iconType == NO_CELL_DATA_CONNECTED_ICON iconType == NO_CELL_DATA_CONNECTED_ICON
? EMPTY_DRAWABLE ? EMPTY_DRAWABLE
: getContext() : getContext()
.getResources().getDrawable(iconType, getContext().getTheme()); .getResources().getDrawable(iconType, getContext().getTheme());
// Overlay the two drawables // Overlay the two drawables
Drawable[] layers = {networkDrawable, signalDrawable}; Drawable[] layers = {networkDrawable, signalDrawable};

View File

@@ -15,13 +15,17 @@
*/ */
package com.android.settings.network.telephony; package com.android.settings.network.telephony;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.MOBILE_NETWORK_SELECT;
import android.content.Context; import android.content.Context;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.PersistableBundle;
import android.provider.SearchIndexableResource; import android.provider.SearchIndexableResource;
import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants;
import android.telephony.CarrierConfigManager;
import android.telephony.CellIdentity; import android.telephony.CellIdentity;
import android.telephony.CellInfo; import android.telephony.CellInfo;
import android.telephony.NetworkRegistrationState; import android.telephony.NetworkRegistrationState;
@@ -30,6 +34,7 @@ import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager; import android.telephony.TelephonyManager;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import androidx.preference.Preference; import androidx.preference.Preference;
import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceCategory;
@@ -50,6 +55,8 @@ import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* "Choose network" settings UI for the Phone app. * "Choose network" settings UI for the Phone app.
@@ -58,11 +65,9 @@ import java.util.Map;
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC) @SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class NetworkSelectSettings extends DashboardFragment { public class NetworkSelectSettings extends DashboardFragment {
private static final String TAG = "NetworkSelectSetting"; private static final String TAG = "NetworkSelectSettings";
private static final boolean DBG = true; private static final boolean DBG = true;
public static final String KEY_SUBSCRIPTION_ID = "subscription_id";
private static final int EVENT_SET_NETWORK_SELECTION_MANUALLY_DONE = 1; private static final int EVENT_SET_NETWORK_SELECTION_MANUALLY_DONE = 1;
private static final int EVENT_NETWORK_SCAN_RESULTS = 2; private static final int EVENT_NETWORK_SCAN_RESULTS = 2;
private static final int EVENT_NETWORK_SCAN_ERROR = 3; private static final int EVENT_NETWORK_SCAN_ERROR = 3;
@@ -81,36 +86,26 @@ public class NetworkSelectSettings extends DashboardFragment {
private Preference mStatusMessagePreference; private Preference mStatusMessagePreference;
private List<CellInfo> mCellInfoList; private List<CellInfo> mCellInfoList;
private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
private ViewGroup mFrameLayout;
private NetworkOperatorPreference mSelectedNetworkOperatorPreference; private NetworkOperatorPreference mSelectedNetworkOperatorPreference;
private TelephonyManager mTelephonyManager; private TelephonyManager mTelephonyManager;
private List<String> mForbiddenPlmns; private List<String> mForbiddenPlmns;
//Flag indicating whether we have called bind on the service. private boolean mShow4GForLTE = true;
private boolean mShouldUnbind; private NetworkScanHelper mNetworkScanHelper;
private final ExecutorService mNetworkScanExecutor = Executors.newFixedThreadPool(1);
private final Runnable mUpdateNetworkOperatorsRunnable = () -> { private final Runnable mUpdateNetworkOperatorsRunnable = () -> {
updateNetworkOperatorsPreferenceCategory(); updateNetworkOperatorsPreferenceCategory();
}; };
/**
* Create a new instance of this fragment.
*/
public static NetworkSelectSettings newInstance(int subId) {
Bundle args = new Bundle();
args.putInt(KEY_SUBSCRIPTION_ID, subId);
NetworkSelectSettings
fragment = new NetworkSelectSettings();
fragment.setArguments(args);
return fragment;
}
@Override @Override
public void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) {
if (DBG) logd("onCreate"); if (DBG) logd("onCreate");
super.onCreate(icicle); super.onCreate(icicle);
mSubId = getArguments().getInt(KEY_SUBSCRIPTION_ID); mSubId = getArguments().getInt(MobileSettingsActivity.KEY_SUBSCRIPTION_ID);
addPreferencesFromResource(R.xml.choose_network);
mConnectedNetworkOperatorsPreference = mConnectedNetworkOperatorsPreference =
(PreferenceCategory) findPreference(PREF_KEY_CONNECTED_NETWORK_OPERATOR); (PreferenceCategory) findPreference(PREF_KEY_CONNECTED_NETWORK_OPERATOR);
mNetworkOperatorsPreferences = mNetworkOperatorsPreferences =
@@ -118,21 +113,29 @@ public class NetworkSelectSettings extends DashboardFragment {
mStatusMessagePreference = new Preference(getContext()); mStatusMessagePreference = new Preference(getContext());
mSelectedNetworkOperatorPreference = null; mSelectedNetworkOperatorPreference = null;
mTelephonyManager = TelephonyManager.from(getContext()).createForSubscriptionId(mSubId); mTelephonyManager = TelephonyManager.from(getContext()).createForSubscriptionId(mSubId);
mNetworkScanHelper = new NetworkScanHelper(
mTelephonyManager, mCallback, mNetworkScanExecutor);
PersistableBundle bundle = ((CarrierConfigManager) getContext().getSystemService(
Context.CARRIER_CONFIG_SERVICE)).getConfigForSubId(mSubId);
if (bundle != null) {
mShow4GForLTE = bundle.getBoolean(
CarrierConfigManager.KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL);
}
setRetainInstance(true); setRetainInstance(true);
} }
@Override @Override
public void onViewCreated(View view, Bundle savedInstanceState) { public void onViewCreated(View view, Bundle savedInstanceState) {
if (DBG) logd("onViewCreated");
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
mProgressHeader = setPinnedHeaderView(R.layout.wifi_progress_header) // TODO(b/114749736): build the progress bar
.findViewById(R.id.progress_bar_animation);
setProgressBarVisible(false);
forceConfigConnectedNetworkOperatorsPreferenceCategory(); forceConfigConnectedNetworkOperatorsPreferenceCategory();
} }
@Override @Override
public void onStart() { public void onStart() {
if (DBG) logd("onStart");
super.onStart(); super.onStart();
new AsyncTask<Void, Void, List<String>>() { new AsyncTask<Void, Void, List<String>>() {
@Override @Override
@@ -144,7 +147,7 @@ public class NetworkSelectSettings extends DashboardFragment {
@Override @Override
protected void onPostExecute(List<String> result) { protected void onPostExecute(List<String> result) {
mForbiddenPlmns = result; mForbiddenPlmns = result;
bindNetworkQueryService(); loadNetworksList();
} }
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} }
@@ -199,7 +202,7 @@ public class NetworkSelectSettings extends DashboardFragment {
ThreadUtils.postOnBackgroundThread(() -> { ThreadUtils.postOnBackgroundThread(() -> {
Message msg = mHandler.obtainMessage(EVENT_SET_NETWORK_SELECTION_MANUALLY_DONE); Message msg = mHandler.obtainMessage(EVENT_SET_NETWORK_SELECTION_MANUALLY_DONE);
msg.obj = mTelephonyManager.setNetworkSelectionModeManual( msg.obj = mTelephonyManager.setNetworkSelectionModeManual(
operatorInfo.getOperatorNumeric(), true /* persistSelection */); operatorInfo, true /* persistSelection */);
msg.sendToTarget(); msg.sendToTarget();
}); });
@@ -223,8 +226,6 @@ public class NetworkSelectSettings extends DashboardFragment {
if (DBG) logd("onStop"); if (DBG) logd("onStop");
getView().removeCallbacks(mUpdateNetworkOperatorsRunnable); getView().removeCallbacks(mUpdateNetworkOperatorsRunnable);
stopNetworkQuery(); stopNetworkQuery();
// Unbind the NetworkQueryService
unbindNetworkQueryService();
} }
@Override @Override
@@ -239,8 +240,7 @@ public class NetworkSelectSettings extends DashboardFragment {
@Override @Override
public int getMetricsCategory() { public int getMetricsCategory() {
//TODO(b/114749736): add metrics id for this page return MOBILE_NETWORK_SELECT;
return 0;
} }
private final Handler mHandler = new Handler() { private final Handler mHandler = new Handler() {
@@ -258,7 +258,6 @@ public class NetworkSelectSettings extends DashboardFragment {
mSelectedNetworkOperatorPreference.setSummary(R.string.network_connected); mSelectedNetworkOperatorPreference.setSummary(R.string.network_connected);
} else { } else {
if (DBG) logd("manual network selection: failed! "); if (DBG) logd("manual network selection: failed! ");
updateNetworkSelection();
// Set summary as "Couldn't connect" to the selected network. // Set summary as "Couldn't connect" to the selected network.
mSelectedNetworkOperatorPreference.setSummary( mSelectedNetworkOperatorPreference.setSummary(
R.string.network_could_not_connect); R.string.network_could_not_connect);
@@ -297,6 +296,35 @@ public class NetworkSelectSettings extends DashboardFragment {
} }
}; };
private void loadNetworksList() {
if (DBG) logd("load networks list...");
setProgressBarVisible(true);
mNetworkScanHelper.startNetworkScan(
NetworkScanHelper.NETWORK_SCAN_TYPE_INCREMENTAL_RESULTS);
}
private final NetworkScanHelper.NetworkScanCallback mCallback =
new NetworkScanHelper.NetworkScanCallback() {
public void onResults(List<CellInfo> results) {
if (DBG) logd("get scan results.");
Message msg = mHandler.obtainMessage(EVENT_NETWORK_SCAN_RESULTS, results);
msg.sendToTarget();
}
public void onComplete() {
if (DBG) logd("network scan completed.");
Message msg = mHandler.obtainMessage(EVENT_NETWORK_SCAN_COMPLETED);
msg.sendToTarget();
}
public void onError(int error) {
if (DBG) logd("get onError callback with error code: " + error);
Message msg = mHandler.obtainMessage(EVENT_NETWORK_SCAN_ERROR, error,
0 /* arg2 */);
msg.sendToTarget();
}
};
private void updateNetworkOperators() { private void updateNetworkOperators() {
if (DBG) logd("updateNetworkOperators"); if (DBG) logd("updateNetworkOperators");
if (getActivity() != null) { if (getActivity() != null) {
@@ -324,7 +352,7 @@ public class NetworkSelectSettings extends DashboardFragment {
for (int index = 0; index < mCellInfoList.size(); index++) { for (int index = 0; index < mCellInfoList.size(); index++) {
if (!mCellInfoList.get(index).isRegistered()) { if (!mCellInfoList.get(index).isRegistered()) {
NetworkOperatorPreference pref = new NetworkOperatorPreference( NetworkOperatorPreference pref = new NetworkOperatorPreference(
mCellInfoList.get(index), getContext(), mForbiddenPlmns); mCellInfoList.get(index), getContext(), mForbiddenPlmns, mShow4GForLTE);
pref.setKey(CellInfoUtil.getNetworkTitle(mCellInfoList.get(index))); pref.setKey(CellInfoUtil.getNetworkTitle(mCellInfoList.get(index)));
pref.setOrder(index); pref.setOrder(index);
mNetworkOperatorsPreferences.addPreference(pref); mNetworkOperatorsPreferences.addPreference(pref);
@@ -335,15 +363,15 @@ public class NetworkSelectSettings extends DashboardFragment {
/** /**
* Config the connected network operator preference when the page was created. When user get * Config the connected network operator preference when the page was created. When user get
* into this page, the device might or might not have data connection. * into this page, the device might or might not have data connection.
* - If the device has data: * - If the device has data:
* 1. use {@code ServiceState#getNetworkRegistrationStates()} to get the currently * 1. use {@code ServiceState#getNetworkRegistrationStates()} to get the currently
* registered cellIdentity, wrap it into a CellInfo; * registered cellIdentity, wrap it into a CellInfo;
* 2. set the signal strength level as strong; * 2. set the signal strength level as strong;
* 3. use {@link TelephonyManager#getNetworkOperatorName()} to get the title of the * 3. use {@link TelephonyManager#getNetworkOperatorName()} to get the title of the
* previously connected network operator, since the CellIdentity got from step 1 only has * previously connected network operator, since the CellIdentity got from step 1 only has
* PLMN. * PLMN.
* - If the device has no data, we will remove the connected network operators list from the * - If the device has no data, we will remove the connected network operators list from the
* screen. * screen.
*/ */
private void forceConfigConnectedNetworkOperatorsPreferenceCategory() { private void forceConfigConnectedNetworkOperatorsPreferenceCategory() {
if (DBG) logd("Force config ConnectedNetworkOperatorsPreferenceCategory"); if (DBG) logd("Force config ConnectedNetworkOperatorsPreferenceCategory");
@@ -362,8 +390,8 @@ public class NetworkSelectSettings extends DashboardFragment {
CellInfo cellInfo = CellInfoUtil.wrapCellInfoWithCellIdentity(cellIdentity); CellInfo cellInfo = CellInfoUtil.wrapCellInfoWithCellIdentity(cellIdentity);
if (cellInfo != null) { if (cellInfo != null) {
if (DBG) logd("Currently registered cell: " + cellInfo.toString()); if (DBG) logd("Currently registered cell: " + cellInfo.toString());
NetworkOperatorPreference pref = NetworkOperatorPreference pref = new NetworkOperatorPreference(
new NetworkOperatorPreference(cellInfo, getContext(), mForbiddenPlmns); cellInfo, getContext(), mForbiddenPlmns, mShow4GForLTE);
pref.setTitle(mTelephonyManager.getNetworkOperatorName()); pref.setTitle(mTelephonyManager.getNetworkOperatorName());
pref.setSummary(R.string.network_connected); pref.setSummary(R.string.network_connected);
// Update the signal strength icon, since the default signalStrength value would be // Update the signal strength icon, since the default signalStrength value would be
@@ -396,7 +424,7 @@ public class NetworkSelectSettings extends DashboardFragment {
removeConnectedNetworkOperatorPreference(); removeConnectedNetworkOperatorPreference();
} }
CellInfo connectedNetworkOperator = null; CellInfo connectedNetworkOperator = null;
for (CellInfo cellInfo : mCellInfoList) { for (CellInfo cellInfo: mCellInfoList) {
if (cellInfo.isRegistered()) { if (cellInfo.isRegistered()) {
connectedNetworkOperator = cellInfo; connectedNetworkOperator = cellInfo;
break; break;
@@ -443,8 +471,8 @@ public class NetworkSelectSettings extends DashboardFragment {
if (DBG) logd("addConnectedNetworkOperatorPreference"); if (DBG) logd("addConnectedNetworkOperatorPreference");
// Remove the current ConnectedNetworkOperatorsPreference // Remove the current ConnectedNetworkOperatorsPreference
removeConnectedNetworkOperatorPreference(); removeConnectedNetworkOperatorPreference();
final NetworkOperatorPreference pref = final NetworkOperatorPreference pref = new NetworkOperatorPreference(
new NetworkOperatorPreference(cellInfo, getContext(), mForbiddenPlmns); cellInfo, getContext(), mForbiddenPlmns, mShow4GForLTE);
pref.setSummary(R.string.network_connected); pref.setSummary(R.string.network_connected);
mConnectedNetworkOperatorsPreference.addPreference(pref); mConnectedNetworkOperatorsPreference.addPreference(pref);
PreferenceScreen preferenceScreen = getPreferenceScreen(); PreferenceScreen preferenceScreen = getPreferenceScreen();
@@ -483,7 +511,7 @@ public class NetworkSelectSettings extends DashboardFragment {
private List<CellInfo> aggregateCellInfoList(List<CellInfo> cellInfoList) { private List<CellInfo> aggregateCellInfoList(List<CellInfo> cellInfoList) {
if (DBG) logd("before aggregate: " + cellInfoList.toString()); if (DBG) logd("before aggregate: " + cellInfoList.toString());
Map<String, CellInfo> map = new HashMap<>(); Map<String, CellInfo> map = new HashMap<>();
for (CellInfo cellInfo : cellInfoList) { for (CellInfo cellInfo: cellInfoList) {
String plmn = CellInfoUtil.getOperatorInfoFromCellInfo(cellInfo).getOperatorNumeric(); String plmn = CellInfoUtil.getOperatorInfoFromCellInfo(cellInfo).getOperatorNumeric();
if (cellInfo.isRegistered() || !map.containsKey(plmn)) { if (cellInfo.isRegistered() || !map.containsKey(plmn)) {
map.put(plmn, cellInfo); map.put(plmn, cellInfo);
@@ -501,36 +529,16 @@ public class NetworkSelectSettings extends DashboardFragment {
return new ArrayList<>(map.values()); return new ArrayList<>(map.values());
} }
private void loadNetworksList() { private void stopNetworkQuery() {
if (DBG) logd("load networks list..."); if (mNetworkScanHelper != null) {
setProgressBarVisible(true); mNetworkScanHelper.stopNetworkQuery();
//TODO(b/114749736): load network list once b/115401728 is done
}
private void bindNetworkQueryService() {
if (DBG) logd("bindNetworkQueryService");
//TODO(b/114749736): bind service/manager once b/115401728 is done
mShouldUnbind = true;
}
private void unbindNetworkQueryService() {
if (DBG) logd("unbindNetworkQueryService");
if (mShouldUnbind) {
if (DBG) logd("mShouldUnbind is true");
// unbind the service.
//TODO(b/114749736): unbind service/manager once b/115401728 is done
mShouldUnbind = false;
} }
} }
private void updateNetworkSelection() { @Override
if (DBG) logd("Update notification about no service of user selected operator"); public void onDestroy() {
//TODO(b/114749736): update network selection once b/115429509 is done mNetworkScanExecutor.shutdown();
} super.onDestroy();
private void stopNetworkQuery() {
// Stop the network query process
//TODO(b/114749736): stop service/manager query once b/115401728 is done
} }
private void logd(String msg) { private void logd(String msg) {