summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-04-15 18:27:54 -0700
committerJim Miller <jaggies@google.com>2013-04-16 18:33:43 -0700
commit187ec581c66fec49a5ee7db8edec6d9eb0e209fc (patch)
tree50a321921b625de2f75fdba1568ad5f250e90e95 /policy
parentbffe377bca3cb8240bfc614c12fd1091ae3f69b9 (diff)
downloadframeworks_base-187ec581c66fec49a5ee7db8edec6d9eb0e209fc.zip
frameworks_base-187ec581c66fec49a5ee7db8edec6d9eb0e209fc.tar.gz
frameworks_base-187ec581c66fec49a5ee7db8edec6d9eb0e209fc.tar.bz2
Move owner info from Settings.Secure to LockSettings
Fixes bug 8512972 Change-Id: Ic046aff0332b78489dda08b1e9e71f4c16154f10
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) {