summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/mms/service/SendRequest.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/com/android/mms/service/SendRequest.java b/src/com/android/mms/service/SendRequest.java
index fefbbc0..8446646 100644
--- a/src/com/android/mms/service/SendRequest.java
+++ b/src/com/android/mms/service/SendRequest.java
@@ -127,7 +127,8 @@ public class SendRequest extends MmsRequest {
@Override
protected Void doInBackground(Void... voids) {
try {
- notifyEmergencyContact(mContext);
+ BlockedNumberContract.SystemContract
+ .notifyEmergencyContact(mContext);
} catch (Exception e) {
LogUtil.e(getRequestId(),
"Exception notifying emergency contact: " + e);
@@ -446,21 +447,4 @@ public class SendRequest extends MmsRequest {
LogUtil.e("Unexpected onDownloadMmsComplete call with result: " + result);
}
}
-
- /**
- * Notifies the provider that emergency services were contacted by the user.
- */
- private void notifyEmergencyContact(Context context) {
- try {
- LogUtil.i("notifyEmergencyContact; caller=%s", context.getOpPackageName());
- context.getContentResolver().call(
- BlockedNumberContract.AUTHORITY_URI,
- BlockedNumberContract.METHOD_NOTIFY_EMERGENCY_CONTACT,
- null, null);
- } catch (NullPointerException | IllegalArgumentException ex) {
- // The content resolver can throw an NPE or IAE; we don't want to crash Telecom if
- // either of these happen.
- LogUtil.w(null, "notifyEmergencyContact: provider not ready.");
- }
- }
}