Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 322bf326 authored by Ayush Sharma's avatar Ayush Sharma Committed by Android (Google) Code Review
Browse files

Merge "[API] Don't show error for non sms app" into udc-dev

parents e6184835 281d7378
Loading
Loading
Loading
Loading
+12 −18
Original line number Diff line number Diff line
@@ -164,9 +164,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }
@@ -263,9 +262,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }
@@ -348,9 +346,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }
@@ -388,9 +385,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }
@@ -426,9 +422,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntents(sentIntents, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }
@@ -934,9 +929,8 @@ public class SmsController extends ISmsImplBase {
        // Check if user is associated with the subscription
        if (!TelephonyPermissions.checkSubscriptionAssociatedWithUser(mContext, subId,
                Binder.getCallingUserHandle())) {
            if (TelephonyUtils.isUidForeground(mContext, Binder.getCallingUid())) {
                TelephonyUtils.showErrorIfSubscriptionAssociatedWithManagedProfile(mContext, subId);
            }
            TelephonyUtils.showSwitchToManagedProfileDialogIfAppropriate(mContext, subId,
                    Binder.getCallingUid(), callingPackage);
            sendErrorInPendingIntent(sentIntent, SmsManager.RESULT_USER_NOT_ALLOWED);
            return;
        }