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

Commit 7c766b2a authored by Sahin Caliskan's avatar Sahin Caliskan
Browse files

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
parent 173fdc4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,