diff options
author | Mike J. Chen <mjchen@google.com> | 2011-08-15 13:22:39 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-10 12:03:53 -0800 |
commit | 3a2ce935b94383141d1c8a7878fa9308ce718fe5 (patch) | |
tree | 37bab0cf934a4a01c1f51e57925b6d885e6784d3 /cmds/am | |
parent | 3df2549cb7be6d85cb4579d8fa48f5344c025f62 (diff) | |
download | frameworks_base-3a2ce935b94383141d1c8a7878fa9308ce718fe5.zip frameworks_base-3a2ce935b94383141d1c8a7878fa9308ce718fe5.tar.gz frameworks_base-3a2ce935b94383141d1c8a7878fa9308ce718fe5.tar.bz2 |
Add the ability to pass float extras to AM.
commit 43a2825a283e29c0f70100146394957af0598b0e
Author: John Grossman <johngro@google.com>
Date: Wed Apr 27 09:03:53 2011 -0700
Add the ability to pass float extras to AM.
Change-Id: I970ad3f76a65bd781099204019095c73ed8c09db
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>
Conflicts:
cmds/am/src/com/android/commands/am/Am.java
Diffstat (limited to 'cmds/am')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 3d36ebf..901f7c7 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -215,6 +215,22 @@ public class Am { list[i] = Long.valueOf(strings[i]); } intent.putExtra(key, list); + hasIntentInfo = true; + } else if (opt.equals("--ef")) { + String key = nextArgRequired(); + String value = nextArgRequired(); + intent.putExtra(key, Float.valueOf(value)); + hasIntentInfo = true; + } else if (opt.equals("--efa")) { + String key = nextArgRequired(); + String value = nextArgRequired(); + String[] strings = value.split(","); + float[] list = new float[strings.length]; + for (int i = 0; i < strings.length; i++) { + list[i] = Float.valueOf(strings[i]); + } + intent.putExtra(key, list); + hasIntentInfo = true; } else if (opt.equals("--ez")) { String key = nextArgRequired(); String value = nextArgRequired(); @@ -1342,9 +1358,11 @@ public class Am { " [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]\n" + " [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]\n" + " [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]\n" + + " [--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]\n" + " [--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]\n" + " [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]\n" + " [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]\n" + + " [--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]\n" + " [-n <COMPONENT>] [-f <FLAGS>]\n" + " [--grant-read-uri-permission] [--grant-write-uri-permission]\n" + " [--debug-log-resolution] [--exclude-stopped-packages]\n" + |