From 7c766b2a5f11eec8a664a39dc587a897ecb6578f Mon Sep 17 00:00:00 2001 From: Sahin Caliskan Date: Tue, 30 Oct 2018 10:20:08 -0700 Subject: [PATCH] 117960238 Add logging for MMS silently failing We have came across some bug reports where MmsServiceBroker gets called but the actual MmsService does not. This change adds logging to figure if AppOpsManager is causing this issue. Test: Builds fine Change-Id: I4c28a115bf0623f0a54e9c5384813d0f23ad930e --- services/core/java/com/android/server/MmsServiceBroker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/MmsServiceBroker.java b/services/core/java/com/android/server/MmsServiceBroker.java index f15cd2adbf070..b6fa1570cdb05 100644 --- a/services/core/java/com/android/server/MmsServiceBroker.java +++ b/services/core/java/com/android/server/MmsServiceBroker.java @@ -17,7 +17,6 @@ package com.android.server; import android.Manifest; -import android.app.ActivityManagerInternal; import android.app.AppOpsManager; import android.app.PendingIntent; import android.content.ComponentName; @@ -337,6 +336,7 @@ public class MmsServiceBroker extends SystemService { mContext.enforceCallingPermission(Manifest.permission.SEND_SMS, "Send MMS message"); if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), callingPkg) != AppOpsManager.MODE_ALLOWED) { + Slog.e(TAG, callingPkg + " is not allowed to call sendMessage()"); return; } contentUri = adjustUriForUserAndGrantPermission(contentUri, @@ -355,6 +355,7 @@ public class MmsServiceBroker extends SystemService { "Download MMS message"); if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(), callingPkg) != AppOpsManager.MODE_ALLOWED) { + Slog.e(TAG, callingPkg + " is not allowed to call downloadMessage()"); return; } contentUri = adjustUriForUserAndGrantPermission(contentUri,