diff options
author | Jack Veenstra <veenstra@google.com> | 2010-09-08 11:44:05 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-09-08 11:44:05 -0700 |
commit | f6aea42aff7947e3fc55e43f018b112484f4f2de (patch) | |
tree | 9ca41b019b1325935f29a19c853bcf930136f4df /cmds | |
parent | cf67abbc48d6d56538dd6f2412d6aa9863a31637 (diff) | |
parent | 2d1b7a22390a355aa079473810e2b9914af88274 (diff) | |
download | frameworks_base-f6aea42aff7947e3fc55e43f018b112484f4f2de.zip frameworks_base-f6aea42aff7947e3fc55e43f018b112484f4f2de.tar.gz frameworks_base-f6aea42aff7947e3fc55e43f018b112484f4f2de.tar.bz2 |
Merge "Add support for giving arrays of ints and longs to the "am" command."
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/am/src/com/android/commands/am/Am.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index bfc73b5..f901bfb 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -28,7 +28,6 @@ import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.ParcelFileDescriptor; -// import android.os.RemoteException; // apparently not used import android.os.ServiceManager; import android.util.AndroidException; import android.view.IWindowManager; @@ -142,11 +141,31 @@ public class Am { String value = nextArgRequired(); intent.putExtra(key, Integer.valueOf(value)); hasIntentInfo = true; + } else if (opt.equals("--eia")) { + String key = nextArgRequired(); + String value = nextArgRequired(); + String[] strings = value.split(","); + int[] list = new int[strings.length]; + for (int i = 0; i < strings.length; i++) { + list[i] = Integer.valueOf(strings[i]); + } + intent.putExtra(key, list); + hasIntentInfo = true; } else if (opt.equals("--el")) { String key = nextArgRequired(); String value = nextArgRequired(); intent.putExtra(key, Long.valueOf(value)); hasIntentInfo = true; + } else if (opt.equals("--ela")) { + String key = nextArgRequired(); + String value = nextArgRequired(); + String[] strings = value.split(","); + long[] list = new long[strings.length]; + for (int i = 0; i < strings.length; i++) { + list[i] = Long.valueOf(strings[i]); + } + intent.putExtra(key, list); + hasIntentInfo = true; } else if (opt.equals("--ez")) { String key = nextArgRequired(); String value = nextArgRequired(); @@ -638,6 +657,8 @@ public class Am { " [--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]\n" + " [--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]\n" + " [--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]\n" + + " [--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]\n" + + " [--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]\n" + " [-n <COMPONENT>] [-f <FLAGS>]\n" + " [--grant-read-uri-permission] [--grant-write-uri-permission]\n" + " [--debug-log-resolution]\n" + |