Loading services/core/java/com/android/server/TelephonyRegistry.java +7 −7 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private String[] mDataConnectionApn; private ArrayList<String> mConnectedApns; private ArrayList<String>[] mConnectedApns; private LinkProperties[] mDataConnectionLinkProperties; Loading Loading @@ -290,11 +290,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { mContext = context; mBatteryStats = BatteryStatsService.getService(); mConnectedApns = new ArrayList<String>(); int numPhones = TelephonyManager.getDefault().getPhoneCount(); if (DBG) log("TelephonyRegistor: ctor numPhones=" + numPhones); mNumPhones = numPhones; mConnectedApns = new ArrayList[numPhones]; mCallState = new int[numPhones]; mDataActivity = new int[numPhones]; mDataConnectionState = new int[numPhones]; Loading Loading @@ -325,6 +325,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataConnectionApn[i] = ""; mCellLocation[i] = new Bundle(); mCellInfo.add(i, null); mConnectedApns[i] = new ArrayList<String>(); } // Note that location can be null for non-phone builds like Loading @@ -334,7 +335,6 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { location.fillInNotifierBundle(mCellLocation[i]); } } mConnectedApns = new ArrayList<String>(); mAppOps = mContext.getSystemService(AppOpsManager.class); } Loading Loading @@ -1025,16 +1025,16 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (validatePhoneId(phoneId)) { boolean modified = false; if (state == TelephonyManager.DATA_CONNECTED) { if (!mConnectedApns.contains(apnType)) { mConnectedApns.add(apnType); if (!mConnectedApns[phoneId].contains(apnType)) { mConnectedApns[phoneId].add(apnType); if (mDataConnectionState[phoneId] != state) { mDataConnectionState[phoneId] = state; modified = true; } } } else { if (mConnectedApns.remove(apnType)) { if (mConnectedApns.isEmpty()) { if (mConnectedApns[phoneId].remove(apnType)) { if (mConnectedApns[phoneId].isEmpty()) { mDataConnectionState[phoneId] = state; modified = true; } else { Loading Loading
services/core/java/com/android/server/TelephonyRegistry.java +7 −7 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private String[] mDataConnectionApn; private ArrayList<String> mConnectedApns; private ArrayList<String>[] mConnectedApns; private LinkProperties[] mDataConnectionLinkProperties; Loading Loading @@ -290,11 +290,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { mContext = context; mBatteryStats = BatteryStatsService.getService(); mConnectedApns = new ArrayList<String>(); int numPhones = TelephonyManager.getDefault().getPhoneCount(); if (DBG) log("TelephonyRegistor: ctor numPhones=" + numPhones); mNumPhones = numPhones; mConnectedApns = new ArrayList[numPhones]; mCallState = new int[numPhones]; mDataActivity = new int[numPhones]; mDataConnectionState = new int[numPhones]; Loading Loading @@ -325,6 +325,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataConnectionApn[i] = ""; mCellLocation[i] = new Bundle(); mCellInfo.add(i, null); mConnectedApns[i] = new ArrayList<String>(); } // Note that location can be null for non-phone builds like Loading @@ -334,7 +335,6 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { location.fillInNotifierBundle(mCellLocation[i]); } } mConnectedApns = new ArrayList<String>(); mAppOps = mContext.getSystemService(AppOpsManager.class); } Loading Loading @@ -1025,16 +1025,16 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (validatePhoneId(phoneId)) { boolean modified = false; if (state == TelephonyManager.DATA_CONNECTED) { if (!mConnectedApns.contains(apnType)) { mConnectedApns.add(apnType); if (!mConnectedApns[phoneId].contains(apnType)) { mConnectedApns[phoneId].add(apnType); if (mDataConnectionState[phoneId] != state) { mDataConnectionState[phoneId] = state; modified = true; } } } else { if (mConnectedApns.remove(apnType)) { if (mConnectedApns.isEmpty()) { if (mConnectedApns[phoneId].remove(apnType)) { if (mConnectedApns[phoneId].isEmpty()) { mDataConnectionState[phoneId] = state; modified = true; } else { Loading