Loading src/java/com/android/internal/telephony/SMSDispatcher.java +7 −1 Original line number Diff line number Diff line Loading @@ -2466,7 +2466,13 @@ public abstract class SMSDispatcher extends Handler { /** Return if the SMS was originated from the default SMS application. */ public boolean isFromDefaultSmsApplication(Context context) { if (mIsFromDefaultSmsApplication == null) { UserHandle userHandle = TelephonyUtils.getSubscriptionUserHandle(context, mSubId); UserHandle userHandle; final long identity = Binder.clearCallingIdentity(); try { userHandle = TelephonyUtils.getSubscriptionUserHandle(context, mSubId); } finally { Binder.restoreCallingIdentity(identity); } // Perform a lazy initialization, due to the cost of the operation. mIsFromDefaultSmsApplication = SmsApplication.isDefaultSmsApplicationAsUser(context, getAppPackageName(), userHandle); Loading Loading
src/java/com/android/internal/telephony/SMSDispatcher.java +7 −1 Original line number Diff line number Diff line Loading @@ -2466,7 +2466,13 @@ public abstract class SMSDispatcher extends Handler { /** Return if the SMS was originated from the default SMS application. */ public boolean isFromDefaultSmsApplication(Context context) { if (mIsFromDefaultSmsApplication == null) { UserHandle userHandle = TelephonyUtils.getSubscriptionUserHandle(context, mSubId); UserHandle userHandle; final long identity = Binder.clearCallingIdentity(); try { userHandle = TelephonyUtils.getSubscriptionUserHandle(context, mSubId); } finally { Binder.restoreCallingIdentity(identity); } // Perform a lazy initialization, due to the cost of the operation. mIsFromDefaultSmsApplication = SmsApplication.isDefaultSmsApplicationAsUser(context, getAppPackageName(), userHandle); Loading