Loading src/java/com/android/internal/telephony/ServiceStateTracker.java 100644 → 100755 +13 −3 Original line number Diff line number Diff line Loading @@ -422,6 +422,7 @@ public class ServiceStateTracker extends Handler { public static final int CS_NORMAL_ENABLED = 1005; // Access Control blocks normal voice/sms service public static final int CS_EMERGENCY_ENABLED = 1006; // Access Control blocks emergency call service public static final int CS_REJECT_CAUSE_ENABLED = 2001; // Notify MM rejection cause public static final int CS_REJECT_CAUSE_DISABLED = 2002; // Cancel MM rejection cause /** Notification id. */ public static final int PS_NOTIFICATION = 888; // Id to update and cancel PS restricted public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted Loading Loading @@ -3873,6 +3874,8 @@ public class ServiceStateTracker extends Handler { Context context = mPhone.getContext(); boolean autoCancelCsRejectNotification = false; CarrierConfigManager configManager = (CarrierConfigManager) context.getSystemService(Context.CARRIER_CONFIG_SERVICE); if (configManager != null) { Loading @@ -3886,6 +3889,8 @@ public class ServiceStateTracker extends Handler { if (DBG) log("Voice/emergency call barred notification disabled"); return; } autoCancelCsRejectNotification = bundle.getBoolean( CarrierConfigManager.KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, false); } } Loading Loading @@ -3946,8 +3951,12 @@ public class ServiceStateTracker extends Handler { notificationId = CS_REJECT_CAUSE_NOTIFICATION; int resId = selectResourceForRejectCode(mRejectCode, multipleSubscriptions); if (0 == resId) { if (autoCancelCsRejectNotification) { notifyType = CS_REJECT_CAUSE_DISABLED; } else { loge("setNotification: mRejectCode=" + mRejectCode + " is not handled."); return; } } else { icon = com.android.internal.R.drawable.stat_notify_mmcc_indication_icn; // if using the single SIM resource, simNumber will be ignored Loading Loading @@ -3978,7 +3987,8 @@ public class ServiceStateTracker extends Handler { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (notifyType == PS_DISABLED || notifyType == CS_DISABLED) { if (notifyType == PS_DISABLED || notifyType == CS_DISABLED || notifyType == CS_REJECT_CAUSE_DISABLED) { // cancel previous post notification notificationManager.cancel(Integer.toString(mSubId), notificationId); } else { Loading Loading
src/java/com/android/internal/telephony/ServiceStateTracker.java 100644 → 100755 +13 −3 Original line number Diff line number Diff line Loading @@ -422,6 +422,7 @@ public class ServiceStateTracker extends Handler { public static final int CS_NORMAL_ENABLED = 1005; // Access Control blocks normal voice/sms service public static final int CS_EMERGENCY_ENABLED = 1006; // Access Control blocks emergency call service public static final int CS_REJECT_CAUSE_ENABLED = 2001; // Notify MM rejection cause public static final int CS_REJECT_CAUSE_DISABLED = 2002; // Cancel MM rejection cause /** Notification id. */ public static final int PS_NOTIFICATION = 888; // Id to update and cancel PS restricted public static final int CS_NOTIFICATION = 999; // Id to update and cancel CS restricted Loading Loading @@ -3873,6 +3874,8 @@ public class ServiceStateTracker extends Handler { Context context = mPhone.getContext(); boolean autoCancelCsRejectNotification = false; CarrierConfigManager configManager = (CarrierConfigManager) context.getSystemService(Context.CARRIER_CONFIG_SERVICE); if (configManager != null) { Loading @@ -3886,6 +3889,8 @@ public class ServiceStateTracker extends Handler { if (DBG) log("Voice/emergency call barred notification disabled"); return; } autoCancelCsRejectNotification = bundle.getBoolean( CarrierConfigManager.KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, false); } } Loading Loading @@ -3946,8 +3951,12 @@ public class ServiceStateTracker extends Handler { notificationId = CS_REJECT_CAUSE_NOTIFICATION; int resId = selectResourceForRejectCode(mRejectCode, multipleSubscriptions); if (0 == resId) { if (autoCancelCsRejectNotification) { notifyType = CS_REJECT_CAUSE_DISABLED; } else { loge("setNotification: mRejectCode=" + mRejectCode + " is not handled."); return; } } else { icon = com.android.internal.R.drawable.stat_notify_mmcc_indication_icn; // if using the single SIM resource, simNumber will be ignored Loading Loading @@ -3978,7 +3987,8 @@ public class ServiceStateTracker extends Handler { NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (notifyType == PS_DISABLED || notifyType == CS_DISABLED) { if (notifyType == PS_DISABLED || notifyType == CS_DISABLED || notifyType == CS_REJECT_CAUSE_DISABLED) { // cancel previous post notification notificationManager.cancel(Integer.toString(mSubId), notificationId); } else { Loading