summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/html/google/play-services/setup.jd13
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java27
2 files changed, 30 insertions, 10 deletions
diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd
index 4d38850c6750..a7de7092575c 100644
--- a/docs/html/google/play-services/setup.jd
+++ b/docs/html/google/play-services/setup.jd
@@ -81,6 +81,19 @@ both phones and tablets.</p>
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
+
+-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
+ public static final *** NULL;
+}
+
+-keepnames &#64;com.google.android.gms.common.annotation.KeepName class *
+-keepclassmembernames class * {
+ &#64;ccom.google.android.gms.common.annotation.KeepName *;
+}
+
+-keepnames class * implements android.os.Parcelable {
+ public static final ** CREATOR;
+}
</pre>
</ol>
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java
index de26efb7eee6..29ba60d102c9 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java
@@ -75,7 +75,7 @@ public class KeyguardTransportControlView extends FrameLayout {
private View mTransientSeek;
private SeekBar mTransientSeekBar;
private TextView mTransientSeekTimeElapsed;
- private TextView mTransientSeekTimeRemaining;
+ private TextView mTransientSeekTimeTotal;
private ImageView mBtnPrev;
private ImageView mBtnPlay;
@@ -92,6 +92,9 @@ public class KeyguardTransportControlView extends FrameLayout {
private boolean mUserSeeking;
private java.text.DateFormat mFormat;
+ private Date mTimeElapsed;
+ private Date mTrackDuration;
+
/**
* The metadata which should be populated into the view once we've been attached
*/
@@ -278,7 +281,7 @@ public class KeyguardTransportControlView extends FrameLayout {
mTransientSeekBar = (SeekBar) findViewById(R.id.transient_seek_bar);
mTransientSeekBar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);
mTransientSeekTimeElapsed = (TextView) findViewById(R.id.transient_seek_time_elapsed);
- mTransientSeekTimeRemaining = (TextView) findViewById(R.id.transient_seek_time_remaining);
+ mTransientSeekTimeTotal = (TextView) findViewById(R.id.transient_seek_time_remaining);
mBtnPrev = (ImageView) findViewById(R.id.btn_prev);
mBtnPlay = (ImageView) findViewById(R.id.btn_play);
mBtnNext = (ImageView) findViewById(R.id.btn_next);
@@ -452,15 +455,19 @@ public class KeyguardTransportControlView extends FrameLayout {
void updateSeekDisplay() {
if (mMetadata != null && mRemoteController != null && mFormat != null) {
- final long timeElapsed = mRemoteController.getEstimatedMediaPosition();
- final long duration = mMetadata.duration;
- final long remaining = duration - timeElapsed;
-
- mTransientSeekTimeElapsed.setText(mFormat.format(new Date(timeElapsed)));
- mTransientSeekTimeRemaining.setText(mFormat.format(new Date(remaining)));
+ if (mTimeElapsed == null) {
+ mTimeElapsed = new Date();
+ }
+ if (mTrackDuration == null) {
+ mTrackDuration = new Date();
+ }
+ mTimeElapsed.setTime(mRemoteController.getEstimatedMediaPosition());
+ mTrackDuration.setTime(mMetadata.duration);
+ mTransientSeekTimeElapsed.setText(mFormat.format(mTimeElapsed));
+ mTransientSeekTimeTotal.setText(mFormat.format(mTrackDuration));
- if (DEBUG) Log.d(TAG, "updateSeekDisplay timeElapsed=" + timeElapsed +
- " duration=" + duration + " remaining=" + remaining);
+ if (DEBUG) Log.d(TAG, "updateSeekDisplay timeElapsed=" + mTimeElapsed +
+ " duration=" + mMetadata.duration);
}
}