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

Commit d30575d6 authored by Amit Mahajan's avatar Amit Mahajan Committed by Abhisek Devkota
Browse files

DO NOT MERGE Change to add STK_PERMISSION for stk related commands.

And make stk commands protected.

CYNGNOS-446
Bug: 21697171
Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b
(cherry picked from commit 2ae2c56c)
parent c28cc87c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@ public interface AppInterface {
    public static final String CAT_ICC_STATUS_CHANGE =
                                    "org.codeaurora.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
+4 −4
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ public class CatService extends Handler implements AppInterface {
        Intent intent = new Intent(AppInterface.CAT_CMD_ACTION);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        intent.putExtra("STK CMD", cmdMsg);
        mContext.sendBroadcast(intent);
        mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
    }

    /**
@@ -477,7 +477,7 @@ public class CatService extends Handler implements AppInterface {
        mCurrntCmd = mMenuCmd;
        Intent intent = new Intent(AppInterface.CAT_SESSION_END_ACTION);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mContext.sendBroadcast(intent);
        mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
    }

    private void sendTerminalResponse(CommandDetails cmdDet,
@@ -929,7 +929,7 @@ public class CatService extends Handler implements AppInterface {
        Intent intent = new Intent(AppInterface.CAT_ALPHA_NOTIFY_ACTION);
        intent.putExtra(AppInterface.ALPHA_STRING, alphaString);
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
        mContext.sendBroadcast(intent);
        mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
    }
    /**
     ** This function sends a CARD status (ABSENT, PRESENT, REFRESH) to STK_APP.
@@ -955,7 +955,7 @@ public class CatService extends Handler implements AppInterface {
        CatLog.d(this, "Sending Card Status: "
                + cardState + " " + "cardPresent: " + cardPresent);

        mContext.sendBroadcast(intent);
        mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
    }

    @Override