Skip to content

Commit

Permalink
DO NOT MERGE Change to add STK_PERMISSION for stk related commands.
Browse files Browse the repository at this point in the history
And make stk commands protected.

Bug: 21697171
Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b
  • Loading branch information
Amit Mahajan authored and ciwrl committed Aug 18, 2015
1 parent 01a79c4 commit 1d1ff6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/java/com/android/internal/telephony/cat/AppInterface.java
Expand Up @@ -45,6 +45,9 @@ public interface AppInterface {
public static final String CAT_ICC_STATUS_CHANGE =
"android.intent.action.stk.icc_status_change";

// Permission required by STK command receiver
public static final String STK_PERMISSION = "android.permission.RECEIVE_STK_COMMANDS";

/*
* This is broadcast from the ActivityManagerService when the screen
* switches to idle or busy state
Expand Down
8 changes: 4 additions & 4 deletions src/java/com/android/internal/telephony/cat/CatService.java
Expand Up @@ -458,7 +458,7 @@ private void broadcastCatCmdIntent(CatCmdMessage cmdMsg) {
intent.putExtra("STK CMD", cmdMsg);
intent.putExtra("SLOT_ID", mSlotId);
CatLog.d(this, "Sending CmdMsg: " + cmdMsg+ " on slotid:" + mSlotId);
mContext.sendBroadcast(intent);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}

/**
Expand All @@ -472,7 +472,7 @@ private void handleSessionEnd() {
Intent intent = new Intent(AppInterface.CAT_SESSION_END_ACTION);
intent.putExtra("SLOT_ID", mSlotId);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
mContext.sendBroadcast(intent);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}


Expand Down Expand Up @@ -877,7 +877,7 @@ private void broadcastCardStateAndIccRefreshResp(CardState cardState,
intent.putExtra("SLOT_ID", mSlotId);
CatLog.d(this, "Sending Card Status: "
+ cardState + " " + "cardPresent: " + cardPresent);
mContext.sendBroadcast(intent);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}

private void broadcastAlphaMessage(String alphaString) {
Expand All @@ -886,7 +886,7 @@ private void broadcastAlphaMessage(String alphaString) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
intent.putExtra(AppInterface.ALPHA_STRING, alphaString);
intent.putExtra("SLOT_ID", mSlotId);
mContext.sendBroadcast(intent);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}

@Override
Expand Down

0 comments on commit 1d1ff6a

Please sign in to comment.