summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/utils
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-08-03 17:17:10 -0700
committerDianne Hackborn <hackbod@google.com>2015-08-03 17:17:10 -0700
commit2dbeb423a91e63e7ccdb67b11d35a841bd8b8bab (patch)
tree3518bb336a4538100f6b2e339ceaaa3730384c8e /src/com/android/settings/utils
parentb74c0b2a27f4d30628fe4482a9de6387c6dbdaca (diff)
downloadpackages_apps_Settings-2dbeb423a91e63e7ccdb67b11d35a841bd8b8bab.zip
packages_apps_Settings-2dbeb423a91e63e7ccdb67b11d35a841bd8b8bab.tar.gz
packages_apps_Settings-2dbeb423a91e63e7ccdb67b11d35a841bd8b8bab.tar.bz2
Fix issue #22860466: viapi security bug - rubber stamping in nested VIs
The settings activities that get launched directly by voice now protect themselves to only execute if they were actually directly launched by the voice interaction service, rather than allowing any activity currently under voice control to abuse them. Note the original code also allowed them to execute regardless of whether they were running under voice, since it allowed for a null saved state. I assume that was a mistake, so have removed it. Change-Id: Ib2269a7ee13016d300afba7fa257bfaca8990fab
Diffstat (limited to 'src/com/android/settings/utils')
-rw-r--r--src/com/android/settings/utils/VoiceSettingsActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/utils/VoiceSettingsActivity.java b/src/com/android/settings/utils/VoiceSettingsActivity.java
index 4477e92..d8a00c7 100644
--- a/src/com/android/settings/utils/VoiceSettingsActivity.java
+++ b/src/com/android/settings/utils/VoiceSettingsActivity.java
@@ -41,7 +41,7 @@ abstract public class VoiceSettingsActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (isVoiceInteraction() || savedInstanceState == null) {
+ if (isVoiceInteractionRoot()) {
// Only permit if this is a voice interaction.
if (onVoiceSettingInteraction(getIntent())) {
// If it's complete, finish.
@@ -60,7 +60,7 @@ abstract public class VoiceSettingsActivity extends Activity {
abstract protected boolean onVoiceSettingInteraction(Intent intent);
/**
- * Send a notification that the interaction was successful. If {@link prompt} is
+ * Send a notification that the interaction was successful. If {@param prompt} is
* not null, then it will be read to the user.
*/
protected void notifySuccess(CharSequence prompt) {