summaryrefslogtreecommitdiffstats
path: root/packages/Keyguard/src/com/android
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-11-24 11:52:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-11-24 11:52:40 +0000
commit962b06f9a02f08392b6f87225a314ebf39dd7a07 (patch)
tree4b94da89d3d0b479e598030cc6e2179780118b8b /packages/Keyguard/src/com/android
parent12c2136e556b54a717624d8479ec4650f363ce45 (diff)
parent9c4a707912da2c954b2d3d1311b8a691ded8aa16 (diff)
downloadframeworks_base-962b06f9a02f08392b6f87225a314ebf39dd7a07.zip
frameworks_base-962b06f9a02f08392b6f87225a314ebf39dd7a07.tar.gz
frameworks_base-962b06f9a02f08392b6f87225a314ebf39dd7a07.tar.bz2
Merge "Fixed several time related states for secondary users" into lmp-mr1-dev
Diffstat (limited to 'packages/Keyguard/src/com/android')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
index 8898f9e..c8d9fe2 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
@@ -16,6 +16,7 @@
package com.android.keyguard;
+import android.app.ActivityManager;
import android.app.AlarmManager;
import android.content.ContentResolver;
import android.content.Context;
@@ -105,6 +106,8 @@ public class KeyguardStatusView extends GridLayout {
mAlarmStatusView = (TextView) findViewById(R.id.alarm_status);
mDateView = (TextClock) findViewById(R.id.date_view);
mClockView = (TextClock) findViewById(R.id.clock_view);
+ mDateView.setShowCurrentUserTime(true);
+ mClockView.setShowCurrentUserTime(true);
mOwnerInfo = (TextView) findViewById(R.id.owner_info);
mLockPatternUtils = new LockPatternUtils(getContext());
final boolean screenOn = KeyguardUpdateMonitor.getInstance(mContext).isScreenOn();
@@ -160,7 +163,9 @@ public class KeyguardStatusView extends GridLayout {
if (info == null) {
return "";
}
- String skeleton = DateFormat.is24HourFormat(context) ? "EHm" : "Ehma";
+ String skeleton = DateFormat.is24HourFormat(context, ActivityManager.getCurrentUser())
+ ? "EHm"
+ : "Ehma";
String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
return DateFormat.format(pattern, info.getTriggerTime()).toString();
}