summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-04-17 20:39:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-17 20:39:58 +0000
commitb1e5137a807d19a9cbc241c0ba84c3c49b32fceb (patch)
tree6544a5609fc6bec109f9bb4f956134fbad2772f0 /policy
parenta0042742c8941519718cc8872a84cfec10294386 (diff)
parent187ec581c66fec49a5ee7db8edec6d9eb0e209fc (diff)
downloadframeworks_base-b1e5137a807d19a9cbc241c0ba84c3c49b32fceb.zip
frameworks_base-b1e5137a807d19a9cbc241c0ba84c3c49b32fceb.tar.gz
frameworks_base-b1e5137a807d19a9cbc241c0ba84c3c49b32fceb.tar.bz2
Merge "Move owner info from Settings.Secure to LockSettings" into jb-mr2-dev
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java26
1 files changed, 19 insertions, 7 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
index 77359ff..9b58803 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardMessageArea.java
@@ -23,12 +23,16 @@ import android.content.ContentResolver;
import android.content.Context;
import android.os.BatteryManager;
import android.os.Handler;
+import android.os.IBinder;
import android.os.Looper;
+import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.AttributeSet;
+import android.util.Slog;
import android.view.View;
import android.widget.TextView;
@@ -37,6 +41,8 @@ import libcore.util.MutableInt;
import java.lang.ref.WeakReference;
import com.android.internal.R;
+import com.android.internal.widget.ILockSettings;
+import com.android.internal.widget.LockPatternUtils;
/***
* Manages a number of views inside of the given layout. See below for a list of widgets.
@@ -57,6 +63,8 @@ class KeyguardMessageArea extends TextView {
static final int SECURITY_MESSAGE_DURATION = 5000;
protected static final int FADE_DURATION = 750;
+ private static final String TAG = "KeyguardMessageArea";
+
// are we showing battery information?
boolean mShowingBatteryInfo = false;
@@ -82,6 +90,9 @@ class KeyguardMessageArea extends TextView {
CharSequence mMessage;
boolean mShowingMessage;
+ private CharSequence mSeparator;
+ private LockPatternUtils mLockPatternUtils;
+
Runnable mClearMessageRunnable = new Runnable() {
@Override
public void run() {
@@ -156,8 +167,6 @@ class KeyguardMessageArea extends TextView {
}
};
- private CharSequence mSeparator;
-
public KeyguardMessageArea(Context context) {
this(context, null);
}
@@ -165,6 +174,8 @@ class KeyguardMessageArea extends TextView {
public KeyguardMessageArea(Context context, AttributeSet attrs) {
super(context, attrs);
+ mLockPatternUtils = new LockPatternUtils(context);
+
// This is required to ensure marquee works
setSelected(true);
@@ -228,11 +239,12 @@ class KeyguardMessageArea extends TextView {
String getOwnerInfo() {
ContentResolver res = getContext().getContentResolver();
- final boolean ownerInfoEnabled = Settings.Secure.getIntForUser(res,
- Settings.Secure.LOCK_SCREEN_OWNER_INFO_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
- return ownerInfoEnabled && !mShowingMessage ?
- Settings.Secure.getStringForUser(res, Settings.Secure.LOCK_SCREEN_OWNER_INFO,
- UserHandle.USER_CURRENT) : null;
+ String info = null;
+ final boolean ownerInfoEnabled = mLockPatternUtils.isOwnerInfoEnabled();
+ if (ownerInfoEnabled && !mShowingMessage) {
+ info = mLockPatternUtils.getOwnerInfo(mLockPatternUtils.getCurrentUser());
+ }
+ return info;
}
private CharSequence getChargeInfo(MutableInt icon) {