Throw IAE for non-existent sub association query

For user handle association query, if the queried sub id has no records on the device, throw IAE.

Bug: 294125411
Test: Manually sending/receiving SMS/MMS,
    atest com.android.providers.telephony.SmsProviderTest,
    atest com.android.providers.telephony.MmsProviderTest,
    atest com.android.providers.telephony.ProviderUtilTest,
    atest CtsTelephonyProviderTestCases,
    atest CtsTelephonyTestCases
Change-Id: Ie49b8a564f1db2f812f9f0b1ecadee1e8b18c68e
diff --git a/flags/messaging.aconfig b/flags/messaging.aconfig
index 84e491e..777edb7 100644
--- a/flags/messaging.aconfig
+++ b/flags/messaging.aconfig
@@ -1 +1,8 @@
-package: "com.android.internal.telephony.flags"
\ No newline at end of file
+package: "com.android.internal.telephony.flags"
+
+flag {
+  name: "reject_bad_sub_id_interaction"
+  namespace: "telephony"
+  description: "Previously, the DB allows insertion of a random sub Id, but doesn't allow query it. This change rejects such interaction."
+  bug: "294125411"
+}
\ No newline at end of file