summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2014-10-08 12:33:16 -0700
committerAdam Lesinski <adamlesinski@google.com>2014-10-08 12:33:16 -0700
commit54e064bcea11b54240ac766ea3c36bdc9c18273c (patch)
tree8664d616578bebed5e850a071f8d010df1edc1d0
parentae456fd894c5a41f859196016a7c49113b235eda (diff)
downloadframeworks_base-54e064bcea11b54240ac766ea3c36bdc9c18273c.zip
frameworks_base-54e064bcea11b54240ac766ea3c36bdc9c18273c.tar.gz
frameworks_base-54e064bcea11b54240ac766ea3c36bdc9c18273c.tar.bz2
Remove UsageEvents#resetToStart() as it doesn't work
After completely iterating over a UsageEvents object, the internal parcel is recycled. If resetToStart is called then, it does nothing. Bug:17909428 Change-Id: I7bc68d3429e4621a50dedbfc1789576d44dbb3be
-rw-r--r--api/current.txt1
-rw-r--r--core/java/android/app/usage/UsageEvents.java12
2 files changed, 3 insertions, 10 deletions
diff --git a/api/current.txt b/api/current.txt
index 17c9dcc..78edee8 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5587,7 +5587,6 @@ package android.app.usage {
method public int describeContents();
method public boolean getNextEvent(android.app.usage.UsageEvents.Event);
method public boolean hasNextEvent();
- method public void resetToStart();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator CREATOR;
}
diff --git a/core/java/android/app/usage/UsageEvents.java b/core/java/android/app/usage/UsageEvents.java
index 1a947ec..3cf3c95 100644
--- a/core/java/android/app/usage/UsageEvents.java
+++ b/core/java/android/app/usage/UsageEvents.java
@@ -15,7 +15,6 @@
*/
package android.app.usage;
-import android.content.ComponentName;
import android.content.res.Configuration;
import android.os.Parcel;
import android.os.Parcelable;
@@ -95,14 +94,6 @@ public final class UsageEvents implements Parcelable {
public Configuration mConfiguration;
/**
- * TODO(adamlesinski): Removed before release.
- * {@hide}
- */
- public ComponentName getComponent() {
- return new ComponentName(mPackage, mClass);
- }
-
- /**
* The package name of the source of this event.
*/
public String getPackageName() {
@@ -233,6 +224,9 @@ public final class UsageEvents implements Parcelable {
/**
* Resets the collection so that it can be iterated over from the beginning.
+ *
+ * @hide When this object is iterated to completion, the parcel is destroyed and
+ * so resetToStart doesn't work.
*/
public void resetToStart() {
mIndex = 0;