Issue
I have a galaxy phone with Airtel SIM card (India) and it is showing I am getting 4G+ network in the notification top window. I want to get the same "4G+" value using android somehow. I tried with TelephonyManager and ConnectivityManager but unable to find any methods that returns "4G+". Any help is really really appreciated.
Solution
From my understanding on my Pixel 4A runnging stock A10, the boolean config_hideLtePlus
isn't available anymore on A10 (and I guess, A11).
However, I've been able to readd support for 4G+ icon in the status bar in a sort of hackish way, i.e. editing systemuigoogle.apk/smali/com/android/systemui/statusbar/policy/MobileSignalController.smali.
More in-depth, below the line
iget-boolean v0, v0, Lcom/android/systemui/statusbar/policy/NetworkControllerImpl$Config;->hideLtePlus:Z
I've replaced
if-eqz v0, :cond_4
with
if-nez v0, :cond_4
YMMV
EDIT 25/8/2021:
Here is the source code: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android10-release/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java#227
I'm quoting the relevant part:
if (mConfig.show4gForLte) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
if (mConfig.hideLtePlus) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.FOUR_G);
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.FOUR_G_PLUS);
}
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
if (mConfig.hideLtePlus) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.LTE);
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.LTE_PLUS);
}
}
Basically, what I have achieved is triggering the application of lines 7-8, instead of 4-5.
Answered By - noric