Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b99261ab authored by Wileen Chiu's avatar Wileen Chiu Committed by Linux Build Service Account
Browse files

SystemUI: Provide correct resource type

- The value stored for when the network
class is unknown is 0. when getting
the resource for this value, which doesn't exist,
resulting in a crash.
- Store an empty string for when the
network class is unknown, which is also the
default value.

Change-Id: I1c10dfe18b7dd78e798c2b5a89ca2974136b7e84
CRs-Fixed: 953821
parent 0534d81c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2575,6 +2575,7 @@
    <bool name="config_display_rat">false</bool>

    <!-- config 2G/3G/4G RAT strings for carriers -->
    <string name="config_rat_unknown" translatable="false">""</string>
    <string name="config_rat_2g" translatable="false">2G</string>
    <string name="config_rat_3g" translatable="false">3G</string>
    <string name="config_rat_4g" translatable="false">4G</string>
+1 −0
Original line number Diff line number Diff line
@@ -2664,6 +2664,7 @@
  <!-- SIM contact batch operation -->
  <java-symbol type="bool" name="config_sim_phonebook_batch_operation" />
  <!-- config 2G/3G/4G RAT strings for carriers -->
  <java-symbol type="string" name="config_rat_unknown" />
  <java-symbol type="string" name="config_rat_2g" />
  <java-symbol type="string" name="config_rat_3g" />
  <java-symbol type="string" name="config_rat_4g" />
+2 −1
Original line number Diff line number Diff line
@@ -491,7 +491,8 @@ public class CarrierText extends TextView {
    }

    private String networkClassToString (int networkClass) {
        final int[] classIds = { 0, // TelephonyManager.NETWORK_CLASS_UNKNOWN
        final int[] classIds =
            {com.android.internal.R.string.config_rat_unknown,
            com.android.internal.R.string.config_rat_2g,
            com.android.internal.R.string.config_rat_3g,
            com.android.internal.R.string.config_rat_4g };
+2 −1
Original line number Diff line number Diff line
@@ -393,7 +393,8 @@ public class MobileSignalController extends SignalController<
    }

    private String networkClassToString (int networkClass) {
        final int[] classIds = { 0, // TelephonyManager.NETWORK_CLASS_UNKNOWN
        final int[] classIds =
            {com.android.internal.R.string.config_rat_unknown, // TelephonyManager.NETWORK_CLASS_UNKNOWN
            com.android.internal.R.string.config_rat_2g,
            com.android.internal.R.string.config_rat_3g,
            com.android.internal.R.string.config_rat_4g };