Use same technology type for LTE/4G
Though status bar and preferred network type show 4G, still show LTE in SIM status when device set config_show4GForLTE true Bug: 22213113 Change-Id: I2866a868992af7b4eb661d693a0cce60bb1b3402
This commit is contained in:
@@ -20,6 +20,7 @@ import android.content.BroadcastReceiver;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
@@ -246,6 +247,19 @@ public class SimStatus extends InstrumentedPreferenceActivity {
|
|||||||
networktype = mTelephonyManager.getNetworkTypeName(actualVoiceNetworkType);
|
networktype = mTelephonyManager.getNetworkTypeName(actualVoiceNetworkType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean show4GForLTE = false;
|
||||||
|
try {
|
||||||
|
Context con = createPackageContext("com.android.systemui", 0);
|
||||||
|
int id = con.getResources().getIdentifier("config_show4GForLTE",
|
||||||
|
"bool", "com.android.systemui");
|
||||||
|
show4GForLTE = con.getResources().getBoolean(id);
|
||||||
|
} catch (NameNotFoundException e) {
|
||||||
|
Log.e(TAG, "NameNotFoundException for show4GFotLTE");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (networktype != null && networktype.equals("LTE") && show4GForLTE) {
|
||||||
|
networktype = "4G";
|
||||||
|
}
|
||||||
setSummaryText(KEY_NETWORK_TYPE, networktype);
|
setSummaryText(KEY_NETWORK_TYPE, networktype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user