Loading src/java/com/android/internal/telephony/CellBroadcastServiceManager.java +32 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,14 @@ package com.android.internal.telephony; import android.Manifest; import android.annotation.NonNull; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.AsyncResult; import android.os.Handler; import android.os.IBinder; Loading @@ -29,6 +32,7 @@ import android.os.RemoteCallback; import android.os.RemoteException; import android.telephony.CellBroadcastService; import android.telephony.ICellBroadcastService; import android.text.TextUtils; import android.util.LocalLog; import android.util.Log; import android.util.Pair; Loading @@ -37,6 +41,7 @@ import com.android.internal.telephony.cdma.SmsMessage; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.List; /** * Manages a single binding to the CellBroadcastService from the platform. In mSIM cases callers Loading Loading @@ -203,8 +208,33 @@ public class CellBroadcastServiceManager { /** Returns the package name of the cell broadcast service, or null if there is none. */ private String getCellBroadcastServicePackage() { return mContext.getResources().getString( com.android.internal.R.string.cellbroadcast_default_package); PackageManager packageManager = mContext.getPackageManager(); List<ResolveInfo> cbsPackages = packageManager.queryIntentServices( new Intent(CellBroadcastService.CELL_BROADCAST_SERVICE_INTERFACE), PackageManager.MATCH_SYSTEM_ONLY); if (cbsPackages.size() != 1) { Log.e(TAG, "getCellBroadcastServicePackageName: found " + cbsPackages.size() + " CBS packages"); } for (ResolveInfo info : cbsPackages) { if (info.serviceInfo == null) continue; String packageName = info.serviceInfo.packageName; if (!TextUtils.isEmpty(packageName)) { if (packageManager.checkPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE, packageName) == PackageManager.PERMISSION_GRANTED) { Log.d(TAG, "getCellBroadcastServicePackageName: " + packageName); return packageName; } else { Log.e(TAG, "getCellBroadcastServicePackageName: " + packageName + " does not have READ_PRIVILEGED_PHONE_STATE permission"); } } else { Log.e(TAG, "getCellBroadcastServicePackageName: found a CBS package but " + "packageName is null/empty"); } } Log.e(TAG, "getCellBroadcastServicePackageName: package name not found"); return null; } private class CellBroadcastServiceConnection implements ServiceConnection { Loading src/java/com/android/internal/telephony/CellularNetworkService.java +2 −2 Original line number Diff line number Diff line Loading @@ -423,9 +423,9 @@ public class CellularNetworkService extends NetworkService { .AccessTechnologySpecificInfo.EutranRegistrationInfo eutranInfo = regResult.accessTechnologySpecificInfo.eutranInfo(); isEndcAvailable = eutranInfo.nrIndicators.isDcNrRestricted; isDcNrRestricted = eutranInfo.nrIndicators.isDcNrRestricted; isNrAvailable = eutranInfo.nrIndicators.isNrAvailable; isDcNrRestricted = eutranInfo.nrIndicators.isEndcAvailable; isEndcAvailable = eutranInfo.nrIndicators.isEndcAvailable; vopsInfo = convertHalLteVopsSupportInfo( eutranInfo.lteVopsInfo.isVopsSupported, eutranInfo.lteVopsInfo.isEmcBearerSupported); Loading src/java/com/android/internal/telephony/dataconnection/DcTracker.java +9 −1 Original line number Diff line number Diff line Loading @@ -4849,11 +4849,20 @@ public class DcTracker extends Handler { return false; } // Skip recovery if it can cause a call to drop if (mInVoiceCall && getRecoveryAction() > RECOVERY_ACTION_CLEANUP) { if (VDBG_STALL) log("skip data stall recovery as there is an active call"); return false; } // Allow recovery if data is expected to work return mAttached.get() && isDataAllowed(null); } private void triggerRecovery() { // Updating the recovery start time early to avoid race when // the message is being processed in the Queue mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime(); sendMessage(obtainMessage(DctConstants.EVENT_DO_RECOVERY)); } Loading Loading @@ -4903,7 +4912,6 @@ public class DcTracker extends Handler { + recoveryAction); } mSentSinceLastRecv = 0; mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime(); } } Loading src/java/com/android/internal/telephony/uicc/UiccController.java +4 −3 Original line number Diff line number Diff line Loading @@ -530,7 +530,9 @@ public class UiccController extends Handler { break; case EVENT_MULTI_SIM_CONFIG_CHANGED: if (DBG) log("Received EVENT_MULTI_SIM_CONFIG_CHANGED"); onMultiSimConfigChanged(); int activeModemCount = (int) ((AsyncResult) msg.obj).result; onMultiSimConfigChanged(activeModemCount); break; default: Rlog.e(LOG_TAG, " Unknown Event " + msg.what); break; Loading @@ -538,10 +540,9 @@ public class UiccController extends Handler { } } private void onMultiSimConfigChanged() { private void onMultiSimConfigChanged(int newActiveModemCount) { int prevActiveModemCount = mCis.length; mCis = PhoneFactory.getCommandsInterfaces(); int newActiveModemCount = mCis.length; logWithLocalLog("onMultiSimConfigChanged: prevActiveModemCount " + prevActiveModemCount + ", newActiveModemCount " + newActiveModemCount); Loading Loading
src/java/com/android/internal/telephony/CellBroadcastServiceManager.java +32 −2 Original line number Diff line number Diff line Loading @@ -16,11 +16,14 @@ package com.android.internal.telephony; import android.Manifest; import android.annotation.NonNull; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.AsyncResult; import android.os.Handler; import android.os.IBinder; Loading @@ -29,6 +32,7 @@ import android.os.RemoteCallback; import android.os.RemoteException; import android.telephony.CellBroadcastService; import android.telephony.ICellBroadcastService; import android.text.TextUtils; import android.util.LocalLog; import android.util.Log; import android.util.Pair; Loading @@ -37,6 +41,7 @@ import com.android.internal.telephony.cdma.SmsMessage; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.List; /** * Manages a single binding to the CellBroadcastService from the platform. In mSIM cases callers Loading Loading @@ -203,8 +208,33 @@ public class CellBroadcastServiceManager { /** Returns the package name of the cell broadcast service, or null if there is none. */ private String getCellBroadcastServicePackage() { return mContext.getResources().getString( com.android.internal.R.string.cellbroadcast_default_package); PackageManager packageManager = mContext.getPackageManager(); List<ResolveInfo> cbsPackages = packageManager.queryIntentServices( new Intent(CellBroadcastService.CELL_BROADCAST_SERVICE_INTERFACE), PackageManager.MATCH_SYSTEM_ONLY); if (cbsPackages.size() != 1) { Log.e(TAG, "getCellBroadcastServicePackageName: found " + cbsPackages.size() + " CBS packages"); } for (ResolveInfo info : cbsPackages) { if (info.serviceInfo == null) continue; String packageName = info.serviceInfo.packageName; if (!TextUtils.isEmpty(packageName)) { if (packageManager.checkPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE, packageName) == PackageManager.PERMISSION_GRANTED) { Log.d(TAG, "getCellBroadcastServicePackageName: " + packageName); return packageName; } else { Log.e(TAG, "getCellBroadcastServicePackageName: " + packageName + " does not have READ_PRIVILEGED_PHONE_STATE permission"); } } else { Log.e(TAG, "getCellBroadcastServicePackageName: found a CBS package but " + "packageName is null/empty"); } } Log.e(TAG, "getCellBroadcastServicePackageName: package name not found"); return null; } private class CellBroadcastServiceConnection implements ServiceConnection { Loading
src/java/com/android/internal/telephony/CellularNetworkService.java +2 −2 Original line number Diff line number Diff line Loading @@ -423,9 +423,9 @@ public class CellularNetworkService extends NetworkService { .AccessTechnologySpecificInfo.EutranRegistrationInfo eutranInfo = regResult.accessTechnologySpecificInfo.eutranInfo(); isEndcAvailable = eutranInfo.nrIndicators.isDcNrRestricted; isDcNrRestricted = eutranInfo.nrIndicators.isDcNrRestricted; isNrAvailable = eutranInfo.nrIndicators.isNrAvailable; isDcNrRestricted = eutranInfo.nrIndicators.isEndcAvailable; isEndcAvailable = eutranInfo.nrIndicators.isEndcAvailable; vopsInfo = convertHalLteVopsSupportInfo( eutranInfo.lteVopsInfo.isVopsSupported, eutranInfo.lteVopsInfo.isEmcBearerSupported); Loading
src/java/com/android/internal/telephony/dataconnection/DcTracker.java +9 −1 Original line number Diff line number Diff line Loading @@ -4849,11 +4849,20 @@ public class DcTracker extends Handler { return false; } // Skip recovery if it can cause a call to drop if (mInVoiceCall && getRecoveryAction() > RECOVERY_ACTION_CLEANUP) { if (VDBG_STALL) log("skip data stall recovery as there is an active call"); return false; } // Allow recovery if data is expected to work return mAttached.get() && isDataAllowed(null); } private void triggerRecovery() { // Updating the recovery start time early to avoid race when // the message is being processed in the Queue mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime(); sendMessage(obtainMessage(DctConstants.EVENT_DO_RECOVERY)); } Loading Loading @@ -4903,7 +4912,6 @@ public class DcTracker extends Handler { + recoveryAction); } mSentSinceLastRecv = 0; mTimeLastRecoveryStartMs = SystemClock.elapsedRealtime(); } } Loading
src/java/com/android/internal/telephony/uicc/UiccController.java +4 −3 Original line number Diff line number Diff line Loading @@ -530,7 +530,9 @@ public class UiccController extends Handler { break; case EVENT_MULTI_SIM_CONFIG_CHANGED: if (DBG) log("Received EVENT_MULTI_SIM_CONFIG_CHANGED"); onMultiSimConfigChanged(); int activeModemCount = (int) ((AsyncResult) msg.obj).result; onMultiSimConfigChanged(activeModemCount); break; default: Rlog.e(LOG_TAG, " Unknown Event " + msg.what); break; Loading @@ -538,10 +540,9 @@ public class UiccController extends Handler { } } private void onMultiSimConfigChanged() { private void onMultiSimConfigChanged(int newActiveModemCount) { int prevActiveModemCount = mCis.length; mCis = PhoneFactory.getCommandsInterfaces(); int newActiveModemCount = mCis.length; logWithLocalLog("onMultiSimConfigChanged: prevActiveModemCount " + prevActiveModemCount + ", newActiveModemCount " + newActiveModemCount); Loading