summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2015-06-10 17:04:17 -0700
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-18 01:15:20 +0200
commit3c6f6bef4084052463c8665cfdc340e5cdf46162 (patch)
tree38731495f8b5495c7f3669efb721a70828f1239b /src/java
parent949aeb6d16adcc45453bbb8a76a1eb105641ebde (diff)
downloadframeworks_opt_telephony-3c6f6bef4084052463c8665cfdc340e5cdf46162.zip
frameworks_opt_telephony-3c6f6bef4084052463c8665cfdc340e5cdf46162.tar.gz
frameworks_opt_telephony-3c6f6bef4084052463c8665cfdc340e5cdf46162.tar.bz2
DO NOT MERGE Change to add STK_PERMISSION for stk related commands.HEADmaster
And make stk commands protected. Bug: 21697171 Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b Conflicts: src/java/com/android/internal/telephony/cat/CatService.java
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/android/internal/telephony/cat/AppInterface.java3
-rw-r--r--src/java/com/android/internal/telephony/cat/CatService.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/java/com/android/internal/telephony/cat/AppInterface.java b/src/java/com/android/internal/telephony/cat/AppInterface.java
index 299e140..cbdc84c 100644
--- a/src/java/com/android/internal/telephony/cat/AppInterface.java
+++ b/src/java/com/android/internal/telephony/cat/AppInterface.java
@@ -32,6 +32,9 @@ public interface AppInterface {
public static final String CAT_SESSION_END_ACTION =
"android.intent.action.stk.session_end";
+ // Permission required by STK command receiver
+ public static final String STK_PERMISSION = "android.permission.RECEIVE_STK_COMMANDS";
+
/*
* Callback function from app to telephony to pass a result code and user's
* input back to the ICC.
diff --git a/src/java/com/android/internal/telephony/cat/CatService.java b/src/java/com/android/internal/telephony/cat/CatService.java
index 3dcf4da..f7bd859 100644
--- a/src/java/com/android/internal/telephony/cat/CatService.java
+++ b/src/java/com/android/internal/telephony/cat/CatService.java
@@ -370,7 +370,7 @@ public class CatService extends Handler implements AppInterface {
mCurrntCmd = cmdMsg;
Intent intent = new Intent(AppInterface.CAT_CMD_ACTION);
intent.putExtra("STK CMD", cmdMsg);
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}
/**
@@ -382,7 +382,7 @@ public class CatService extends Handler implements AppInterface {
mCurrntCmd = mMenuCmd;
Intent intent = new Intent(AppInterface.CAT_SESSION_END_ACTION);
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}
private void sendTerminalResponse(CommandDetails cmdDet,