* commit '7da1ad699989db8417ce54eb26697eae4a30f634': Fix NPE on some phones at startup.
This commit is contained in:
@@ -920,6 +920,7 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
String wifiLabel = "";
|
String wifiLabel = "";
|
||||||
String mobileLabel = "";
|
String mobileLabel = "";
|
||||||
int N;
|
int N;
|
||||||
|
final boolean emergencyOnly = (mServiceState != null && mServiceState.isEmergencyOnly());
|
||||||
|
|
||||||
if (!mHasMobileDataFeature) {
|
if (!mHasMobileDataFeature) {
|
||||||
mDataSignalIconId = mPhoneSignalIconId = 0;
|
mDataSignalIconId = mPhoneSignalIconId = 0;
|
||||||
@@ -935,8 +936,8 @@ public class NetworkController extends BroadcastReceiver {
|
|||||||
|
|
||||||
if (mDataConnected) {
|
if (mDataConnected) {
|
||||||
mobileLabel = mNetworkName;
|
mobileLabel = mNetworkName;
|
||||||
} else if (mConnected || mServiceState.isEmergencyOnly()) {
|
} else if (mConnected || emergencyOnly) {
|
||||||
if (hasService() || mServiceState.isEmergencyOnly()) {
|
if (hasService() || emergencyOnly) {
|
||||||
// The isEmergencyOnly test covers the case of a phone with no SIM
|
// The isEmergencyOnly test covers the case of a phone with no SIM
|
||||||
mobileLabel = mNetworkName;
|
mobileLabel = mNetworkName;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user