Merge "Revert "[Settings] Resolves unsynced infomation between status bar and settings"" into tm-dev

This commit is contained in:
Bonian Chen
2022-03-21 09:27:36 +00:00
committed by Android (Google) Code Review

View File

@@ -41,7 +41,6 @@ import android.telephony.TelephonyDisplayInfo;
import android.telephony.TelephonyManager;
import android.text.Html;
import android.util.ArraySet;
import android.util.Log;
import androidx.annotation.VisibleForTesting;
import androidx.collection.ArrayMap;
@@ -194,7 +193,6 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
mSignalStrengthListener.pause();
mTelephonyDisplayInfoListener.pause();
unRegisterReceiver();
resetProviderPreferenceSummary();
}
@Override
@@ -276,7 +274,6 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
String result = mSubsPrefCtrlInjector.getNetworkType(
mContext, mConfig, mTelephonyDisplayInfo, subId, isCarrierNetworkActive);
if (mSubsPrefCtrlInjector.isActiveCellularNetwork(mContext) || isCarrierNetworkActive) {
Log.i(TAG, "Active cellular network or active carrier network.");
result = mContext.getString(R.string.preference_summary_default_combination,
mContext.getString(R.string.mobile_data_connection_active), result);
} else if (!isDataInService) {
@@ -327,13 +324,6 @@ public class SubscriptionsPreferenceController extends AbstractPreferenceControl
return icon;
}
private void resetProviderPreferenceSummary() {
if (mSubsGearPref == null) {
return;
}
mSubsGearPref.setSummary("");
}
@VisibleForTesting
boolean shouldInflateSignalStrength(int subId) {
return SignalStrengthUtil.shouldInflateSignalStrength(mContext, subId);