Loading src/java/com/android/internal/telephony/SmsController.java +19 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.TelephonyServiceManager.ServiceRegisterer; import android.os.UserHandle; import android.provider.Telephony.Sms.Intents; import android.telephony.CarrierConfigManager; import android.telephony.SmsManager; Loading @@ -46,6 +45,7 @@ import android.telephony.TelephonyManager; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.subscription.SubscriptionManagerService; import com.android.internal.telephony.util.TelephonyUtils; import com.android.internal.util.IndentingPrintWriter; import com.android.telephony.Rlog; Loading Loading @@ -164,7 +164,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -261,7 +263,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -344,7 +348,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -382,7 +388,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -418,7 +426,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -924,7 +934,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading
src/java/com/android/internal/telephony/SmsController.java +19 −7 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.TelephonyServiceManager.ServiceRegisterer; import android.os.UserHandle; import android.provider.Telephony.Sms.Intents; import android.telephony.CarrierConfigManager; import android.telephony.SmsManager; Loading @@ -46,6 +45,7 @@ import android.telephony.TelephonyManager; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.telephony.subscription.SubscriptionManagerService; import com.android.internal.telephony.util.TelephonyUtils; import com.android.internal.util.IndentingPrintWriter; import com.android.telephony.Rlog; Loading Loading @@ -164,7 +164,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -261,7 +263,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -344,7 +348,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -382,7 +388,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -418,7 +426,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading Loading @@ -924,7 +934,9 @@ public class SmsController extends ISmsImplBase { // Check if user is associated with the subscription if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId, Binder.getCallingUserHandle())) { // TODO(b/258629881): Display error dialog. if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) { TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId); } sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED); return; } Loading