summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-01-27 17:42:26 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-27 17:42:26 -0800
commitb90559a6066965debe173e2ea94bbffb87ad2d6a (patch)
tree70bb6f279b9dac9df1995f9eaf9632e00452e3d8
parentcb0af4f1b0709b236a030f41c75edd97cf0bf1fd (diff)
parentce4a0c6f160241ea06e1f2000815094263dea70d (diff)
downloadframeworks_base-b90559a6066965debe173e2ea94bbffb87ad2d6a.zip
frameworks_base-b90559a6066965debe173e2ea94bbffb87ad2d6a.tar.gz
frameworks_base-b90559a6066965debe173e2ea94bbffb87ad2d6a.tar.bz2
Merge "Fix 5906830: Update the clock earlier when lock screen comes back from suspend."
-rw-r--r--core/java/com/android/internal/widget/DigitalClock.java2
-rw-r--r--policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java7
2 files changed, 8 insertions, 1 deletions
diff --git a/core/java/com/android/internal/widget/DigitalClock.java b/core/java/com/android/internal/widget/DigitalClock.java
index daefc9a..af3fd42 100644
--- a/core/java/com/android/internal/widget/DigitalClock.java
+++ b/core/java/com/android/internal/widget/DigitalClock.java
@@ -228,7 +228,7 @@ public class DigitalClock extends RelativeLayout {
updateTime();
}
- private void updateTime() {
+ public void updateTime() {
mCalendar.setTimeInMillis(System.currentTimeMillis());
CharSequence newTime = DateFormat.format(mFormat, mCalendar);
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
index f45556f..e39c49f 100644
--- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
+++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
@@ -19,6 +19,7 @@ package com.android.internal.policy.impl;
import com.android.internal.R;
import com.android.internal.telephony.IccCard;
import com.android.internal.telephony.IccCard.State;
+import com.android.internal.widget.DigitalClock;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.TransportControlView;
import com.android.internal.policy.impl.KeyguardUpdateMonitor.SimStateCallback;
@@ -105,6 +106,7 @@ class KeyguardStatusViewManager implements OnClickListener {
private CharSequence mPlmn;
private CharSequence mSpn;
protected int mPhoneState;
+ private DigitalClock mDigitalClock;
private class TransientTextManager {
private TextView mTextView;
@@ -181,6 +183,7 @@ class KeyguardStatusViewManager implements OnClickListener {
mTransportView = (TransportControlView) findViewById(R.id.transport);
mEmergencyCallButton = (Button) findViewById(R.id.emergencyCallButton);
mEmergencyCallButtonEnabledInScreen = emergencyButtonEnabledInScreen;
+ mDigitalClock = (DigitalClock) findViewById(R.id.time);
// Hide transport control view until we know we need to show it.
if (mTransportView != null) {
@@ -290,6 +293,10 @@ class KeyguardStatusViewManager implements OnClickListener {
/** {@inheritDoc} */
public void onResume() {
if (DEBUG) Log.v(TAG, "onResume()");
+
+ // First update the clock
+ mDigitalClock.updateTime();
+
mUpdateMonitor.registerInfoCallback(mInfoCallback);
mUpdateMonitor.registerSimStateCallback(mSimStateCallback);
resetStatusInfo();