summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2010-10-13 20:57:29 -0700
committerJim Miller <jaggies@google.com>2010-10-14 15:51:55 -0700
commit253a5ef88638037ec986bfd6c88bf36dc5e7d471 (patch)
treef4e35ec974cb48916813525a0ee4c488279569ff /policy
parent184498ce5a8d77e1d9c45693363829daaeef9611 (diff)
downloadframeworks_base-253a5ef88638037ec986bfd6c88bf36dc5e7d471.zip
frameworks_base-253a5ef88638037ec986bfd6c88bf36dc5e7d471.tar.gz
frameworks_base-253a5ef88638037ec986bfd6c88bf36dc5e7d471.tar.bz2
Fix 3024528: Add owner info to SecureSettings.
Change-Id: Ibed62aa8881c795f0d48007fc04beac0e9c1d4a0
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/StatusView.java16
1 files changed, 11 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/StatusView.java b/policy/src/com/android/internal/policy/impl/StatusView.java
index 3f08cfd..2b78851 100644
--- a/policy/src/com/android/internal/policy/impl/StatusView.java
+++ b/policy/src/com/android/internal/policy/impl/StatusView.java
@@ -4,11 +4,14 @@ package com.android.internal.policy.impl;
import com.android.internal.R;
import com.android.internal.widget.LockPatternUtils;
+import com.google.android.util.AbstractMessageParser.Resources;
import java.util.Date;
+import android.content.ContentResolver;
import android.content.Context;
import android.graphics.drawable.Drawable;
+import android.provider.Settings;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.util.Log;
@@ -138,11 +141,14 @@ class StatusView {
/** Originated from PatternUnlockScreen **/
void updateStatusLines() {
if (mHasProperty) {
- // TODO Get actual name & email
- String name = "John Smith";
- String email = "jsmith@gmail.com";
- mPropertyOf.setText("Property of:\n" + name + "\n" + email);
- mPropertyOf.setVisibility(View.VISIBLE);
+ ContentResolver res = getContext().getContentResolver();
+ String info = Settings.Secure.getString(res, Settings.Secure.LOCK_SCREEN_OWNER_INFO);
+ boolean enabled = Settings.Secure.getInt(res,
+ Settings.Secure.LOCK_SCREEN_OWNER_INFO_ENABLED, 1) != 0;
+
+ mPropertyOf.setText(info);
+ mPropertyOf.setVisibility(enabled && !TextUtils.isEmpty(info) ?
+ View.VISIBLE : View.INVISIBLE);
}
if (!mHasStatus2) return;