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

Commit e91c9174 authored by Kun Liang's avatar Kun Liang Committed by Linux Build Service Account
Browse files

AppOps: change MODE_ASK to ALLOWED for receiving sms

SMS is received via broadcast. The operation checking doesn't
popup dialog to users because of broadcast ANR issue. So if the
mode is MODE_ASK and there is no popup dialog, then sms will be
ignored forever.

Meanwhile, receiving sms operation check is not the requirement
of appops. So one solution is to modify default mode for this
operation from MODE_ASK to ALLOWED and doesn't give user the
chance to modify it.

Change-Id: I2b6f90f13d3b2576bcbc6587ab2c6efa47c8dd52
parent 471e8340
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -874,9 +874,9 @@ public class AppOpsManager {
            AppOpsManager.MODE_ASK,     // OP_CALL_PHONE
            AppOpsManager.MODE_ASK,     // OP_READ_SMS
            AppOpsManager.MODE_ASK,     // OP_WRITE_SMS
            AppOpsManager.MODE_ASK,     // OP_RECEIVE_SMS
            AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_SMS
            AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_EMERGECY_SMS
            AppOpsManager.MODE_ASK,     // OP_RECEIVE_MMS
            AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_MMS
            AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_WAP_PUSH
            AppOpsManager.MODE_ASK,     // OP_SEND_SMS
            AppOpsManager.MODE_ALLOWED, // OP_READ_ICC_SMS
@@ -937,7 +937,7 @@ public class AppOpsManager {
        true,     // OP_WRITE_SMS
        false,    // OP_RECEIVE_SMS
        false,    // OP_RECEIVE_EMERGECY_SMS
        true,     // OP_RECEIVE_MMS
        false,    // OP_RECEIVE_MMS
        false,    // OP_RECEIVE_WAP_PUSH
        true,     // OP_SEND_SMS
        false,    // OP_READ_ICC_SMS