diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-03-13 18:02:54 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-03-16 11:29:12 -0700 |
commit | 3d07c94c393831091958fe6a98811843db8973bd (patch) | |
tree | 0cd5c4ea3dc580772b28ef76e9b5b76fe23de081 /core/java/android/os | |
parent | 872d191e6134b429f833013b8706c7b54ebd0d2a (diff) | |
download | frameworks_base-3d07c94c393831091958fe6a98811843db8973bd.zip frameworks_base-3d07c94c393831091958fe6a98811843db8973bd.tar.gz frameworks_base-3d07c94c393831091958fe6a98811843db8973bd.tar.bz2 |
Add new voice request for picking from a list.
Also add API for voice interaction service to control
whether the system should hold a wake lock while it is
working with an activity (and actually *do* hold a wake
lock while doing so, duh!).
And while in there, clean up the launching wake lock to
correctly give blame to the app that is launching.
Change-Id: I7cc4d566b80f59fe0a9ac51ae9bbb7188a01f433
Diffstat (limited to 'core/java/android/os')
-rw-r--r-- | core/java/android/os/Parcel.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java index 3d5215b..9d8a1ba 100644 --- a/core/java/android/os/Parcel.java +++ b/core/java/android/os/Parcel.java @@ -1059,6 +1059,21 @@ public final class Parcel { } } + /** + * @hide + */ + public final void writeCharSequenceList(ArrayList<CharSequence> val) { + if (val != null) { + int N = val.size(); + writeInt(N); + for (int i=0; i<N; i++) { + writeCharSequence(val.get(i)); + } + } else { + writeInt(-1); + } + } + public final IBinder[] createBinderArray() { int N = readInt(); if (N >= 0) { @@ -1828,6 +1843,25 @@ public final class Parcel { } /** + * Read and return an ArrayList<CharSequence> object from the parcel. + * {@hide} + */ + public final ArrayList<CharSequence> readCharSequenceList() { + ArrayList<CharSequence> array = null; + + int length = readInt(); + if (length >= 0) { + array = new ArrayList<CharSequence>(length); + + for (int i = 0 ; i < length ; i++) { + array.add(readCharSequence()); + } + } + + return array; + } + + /** * Read and return a new ArrayList object from the parcel at the current * dataPosition(). Returns null if the previously written list object was * null. The given class loader will be used to load any enclosed |