summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Hobbie <jacobhobbie@google.com>2021-11-02 21:25:18 +0000
committerJacob Hobbie <jacobhobbie@google.com>2021-11-02 21:25:23 +0000
commitcd68c499608e62427bb13b7ad8c055c6dad748fe (patch)
tree6332e6e169f7a87f1c98cb53b2affb27182965e1
parentcf161277919b12eac775fa9fab88a4f0af416114 (diff)
downloadStk-cd68c499608e62427bb13b7ad8c055c6dad748fe.tar.gz
Adding receiver flags to STK
ACTION_CLOSE_SYSTEM_DIALOG always requires a receiver exported flag. It seems as if receiver in ToneDialog has one caller in the same class, so we are going to mark it as NOT_EXPORTED. Change-Id: I4f6a138fad39dda7b091b5cd71dd6d4906211f61 Test: no-op Bug: 161145287
-rw-r--r--src/com/android/stk/StkAppService.java2
-rw-r--r--src/com/android/stk/ToneDialog.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 7a9fe18..6aabba0 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -834,7 +834,7 @@ public class StkAppService extends Service implements Runnable {
};
CatLog.d(LOG_TAG, "Started to observe home key event");
registerReceiver(mHomeKeyEventReceiver,
- new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
+ new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), Context.RECEIVER_EXPORTED);
}
private synchronized void unregisterHomeKeyEventReceiver() {
diff --git a/src/com/android/stk/ToneDialog.java b/src/com/android/stk/ToneDialog.java
index 639a216..417c8eb 100644
--- a/src/com/android/stk/ToneDialog.java
+++ b/src/com/android/stk/ToneDialog.java
@@ -55,7 +55,7 @@ public class ToneDialog extends Activity {
// Register receiver
IntentFilter filter = new IntentFilter();
filter.addAction(StkAppService.FINISH_TONE_ACTIVITY_ACTION);
- registerReceiver(mFinishActivityReceiver, filter);
+ registerReceiver(mFinishActivityReceiver, filter, Context.RECEIVER_NOT_EXPORTED);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
LayoutInflater inflater = this.getLayoutInflater();