4G or LTE: What is shown when?: Difference between revisions

no edit summary
(Created by translating the page "4G oder LTE wonach richtet sich die Anzeige im Status")
Tag: contenttranslation
 
No edit summary
 
Line 9: Line 9:
</ref>
</ref>


In the 90s, the european already specified a gernal, transnationally network called GSM (former: Groupe Spécial Mobile – today: GSM or Global System for Mobile Communications (GSMC)), which was called the network of the 2nd generation (2G)<ref>[https://de.wikipedia.org/wiki/Global_System_for_Mobile_Communications ''GSM bzw Global System for Mobile_Communications (GSMC).'']&#x20;</ref> That's probably the reason why the US-based network operator AT&T displays 4G for an HSPA+ connection and 4G LTE for an actual LTE connection. GSM was, e.g., not well known in the U.S. and german carriers provided different devices, if the customer wanted to start a journey to the US.
In the 90s, the european already specified a gernal, transnationally network called GSM (former: Groupe Spécial Mobile – today: GSM or Global System for Mobile Communications (GSMC)), which was called the network of the 2nd generation (2G).<ref>[https://de.wikipedia.org/wiki/Global_System_for_Mobile_Communications ''GSM bzw Global System for Mobile_Communications (GSMC).'']&#x20;</ref> That's probably the reason why the US-based network operator AT&T displays 4G for an HSPA+ connection and 4G LTE for an actual LTE connection. GSM was, e.g., not well known in the U.S. and german carriers provided different devices, if the customer wanted to start a journey to the US.


== 4G or LTE: The ROM decides ==
== 4G or LTE: The ROM decides ==
If 4G or LTE is displayed in the notification area is decided by the currently installed operating system ([[ROM]]), it therefore doesn't matter if the device is connected to a network of carrier A or B. Displaying LTE instead of 4G is used especially in the german market, as carriers use LTE instead of 4G for ads and other marketing. To prevent a confusion of the customer, users of a branded ROM see a LTE icon instead of a 4G. For all other ROMs, including the ones built direcly from the [[AOSP]]-Source code, a 4G icon will be used.
If 4G or LTE is displayed in the notification area is decided by the currently installed operating system ([[ROM]]). Usually, this is done based on the network the phone is currently connected, to. To prevent a confusion of the customer, carriers can set that their users see a LTE icon instead of 4G. By default, if the carrier does not overwrite the value, the LTE icon is shown.


== technical implementation ==
== technical implementation ==
Line 47: Line 47:
</syntaxhighlight>The icons are defined as vector graphics (since commit [https://github.com/android/platform_frameworks_base/commit/b3eb89190c4bb4ebbe676328cd37830d50e6ed3e b3eb8919]): [https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml 4G], as well as [https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml LTE].
</syntaxhighlight>The icons are defined as vector graphics (since commit [https://github.com/android/platform_frameworks_base/commit/b3eb89190c4bb4ebbe676328cd37830d50e6ed3e b3eb8919]): [https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml 4G], as well as [https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml LTE].


The decision, which icon should be used, happens in the ''MobileSignalController ''class'':''<ref>[https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java#L192-L196 ''android/platform_frameworks_base.'']&#x20;</ref><syntaxhighlight lang="java">
The decision, which icon should be used, happens in the ''MobileSignalController ''class'':''<ref>{{Cite web|url=https://github.com/aosp-mirror/platform_frameworks_base/blob/2dae341/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java#L252-L270|title=aosp-mirror/platform_frameworks_base|website=GitHub|language=en|access-date=2020-01-03}}</ref><syntaxhighlight lang="java">
if (mConfig.show4gForLte) {
if (mConfig.show4gForLte) {
     mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
     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 {
} else {
     mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
     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);
    }
}
}
</syntaxhighlight>The configuration option <code>show4gForLte</code> is provided through the ''Config'' class in the file ''NetworkControllerImpl.java''.<ref>[https://github.com/android/platform_frameworks_base/blob/d59921149bb5948ffbcb9a9e832e9ac1538e05a0/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java#L836 ''android/platform_frameworks_base.'']&#x20;</ref> The value for that option is defined in the configuration file config.xml of the SystemUI and defaults to <code>true</code>.<ref>[https://github.com/android/platform_frameworks_base/blob/d89b76a58dcffa7dbc5974d14c7914f44233bef3/packages/SystemUI/res/values/config.xml#L138-L139 ''android/platform_frameworks_base.'']&#x20;</ref> The differente behavior based on that configuration option was implemented in commit [https://github.com/android/platform_frameworks_base/commit/2fe71d013f373e8eca740781214c505792a9feb0 2fe71d01]; with commit [https://github.com/android/platform_frameworks_base/commit/65a90d0709db61455ac593b53602c34d8e69f2fd 65a90d07] the default was changed to 4G.
</syntaxhighlight>The configuration option <code>show4gForLte</code> is provided through the ''Config'' class in the file ''NetworkControllerImpl.java''.<ref>{{Cite web|url=https://github.com/aosp-mirror/platform_frameworks_base/blob/e964467/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java#L1191-L1192|title=aosp-mirror/platform_frameworks_base|website=GitHub|language=en|access-date=2020-01-03}}</ref> This boolean value is read from a <code>[https://developer.android.com/reference/android/os/PersistableBundle.html PersistableBundle]</code>, which is provided by the <code>[https://developer.android.com/reference/android/telephony/CarrierConfigManager.html CarrierConfigManager]</code>. This carrier-dependant configuration is part of Androids ''[https://source.android.com/devices/tech/config/carrier carrier configuration]'' component. This component allows a privileged app since Android {{Android|6.0}} to change specific, provider-dependant settings, without needing to change the operating system itself. With that, the values can be changed more dynamically and especially without the need to provide a system update.
 
An implementation of such a carrier configuration app is bundled with the AOSP as well, the [https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/d8e2304518b3c2ff276b8fcebf069b75d9cc5bcf/src/com/android/carrierconfig/DefaultCarrierConfigService.java <code>CarrierConfig</code> app]. This app reads the configuration values for the carrier the phone is connected to, from files bundled with the app, as long as a configuration for the carrier exists.
 
In this configuration, for example, for the carrier Vodafone in Germany, the 4G icon is shown instead of the LTE one:<ref>{{Cite web|url=https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/d8e2304518b3c2ff276b8fcebf069b75d9cc5bcf/assets/carrier_config_carrierid_25_Vodafone.xml|title=assets/carrier_config_carrierid_25_Vodafone.xml - platform/packages/apps/CarrierConfig - Git at Google|website=android.googlesource.com|language=en|access-date=2020-01-03}}</ref><syntaxhighlight lang="xml">
<boolean name="show_4g_for_lte_data_icon_bool" value="true"/>
</syntaxhighlight>The carrier ID 25 is read from a Carrier ID list in Android, which is selected by the mobile network the phone is connected, to.<ref>{{Cite web|url=https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/b282dc64c5b7a0c8cdfb097943a0708d5106ce15/assets/carrier_list.textpb#275|title=assets/carrier_list.textpb - platform/packages/providers/TelephonyProvider - Git at Google|website=android.googlesource.com|language=en|access-date=2020-01-03}}</ref>
 
As another example, AT&T with the carrier ID 1187 does not provide such a value (<code>show_4g_for_lte_data_icon_bool</code>) at all, therefore the default value (false) is used and the LTE icon, instead of 4G is shown.<ref>{{Cite web|url=https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/d8e2304518b3c2ff276b8fcebf069b75d9cc5bcf/assets/carrier_config_carrierid_1187_AT&T.xml|title=assets/carrier_config_carrierid_1187_AT&T.xml - platform/packages/apps/CarrierConfig - Git at Google|website=android.googlesource.com|language=en|access-date=2020-01-03}}</ref> This file is also the place, where it is configured, that AT&T is showing a 4G icon for a 3G network.<ref>{{Cite web|url=https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/d8e2304518b3c2ff276b8fcebf069b75d9cc5bcf/assets/carrier_config_carrierid_1187_AT&T.xml#12|title=assets/carrier_config_carrierid_1187_AT&T.xml - platform/packages/apps/CarrierConfig - Git at Google|website=android.googlesource.com|language=en|access-date=2020-01-03}}</ref>


== See also ==
== See also ==
11,008

edits