summaryrefslogtreecommitdiffstats
path: root/cmds/am
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2014-11-20 17:17:39 -0800
committerDianne Hackborn <hackbod@google.com>2014-11-20 17:17:39 -0800
commit24b1c23c62b3d8ca1d762a76b2f1ef6360fc683e (patch)
tree7ff5b24df000003126c17c504313507f4693107a /cmds/am
parenta6d2789c954698f6dca5479b305689d22fc05d80 (diff)
downloadframeworks_base-24b1c23c62b3d8ca1d762a76b2f1ef6360fc683e.zip
frameworks_base-24b1c23c62b3d8ca1d762a76b2f1ef6360fc683e.tar.gz
frameworks_base-24b1c23c62b3d8ca1d762a76b2f1ef6360fc683e.tar.bz2
Fix issue #15828903: Intent.parseUri allows call to FLAG_GRANT_*_URI_PERMISSION
You now need to set a flag if you want this unsafe behavior. Change-Id: I185e9a04e005e42a887c3d58a2818616790b060a
Diffstat (limited to 'cmds/am')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 0cad17d..475d540 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -55,12 +55,9 @@ import android.text.TextUtils;
import android.util.AndroidException;
import android.util.ArrayMap;
import android.view.IWindowManager;
-import android.view.View;
import com.android.internal.os.BaseCommand;
-import dalvik.system.VMRuntime;
-
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@@ -619,7 +616,7 @@ public class Am extends BaseCommand {
// The argument is a URI. Fully parse it, and use that result
// to fill in any data not specified so far.
baseIntent = Intent.parseUri(arg, Intent.URI_INTENT_SCHEME
- | Intent.URI_ANDROID_APP_SCHEME);
+ | Intent.URI_ANDROID_APP_SCHEME | Intent.URI_ALLOW_UNSAFE);
} else if (arg.indexOf('/') >= 0) {
// The argument is a component name. Build an Intent to launch
// it.