summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2014-07-14 16:48:27 -0400
committerDan Sandler <dsandler@android.com>2014-07-16 12:04:05 -0400
commit18bb4f99206a419c9bc61df08bc29d76efc6764a (patch)
tree5905c1c880319c30f68e2775c9f3c6564c14a37a /packages/SystemUI/src/com
parent09f1c724e3eae6d28883b7c16ef6531b556c5691 (diff)
downloadframeworks_base-18bb4f99206a419c9bc61df08bc29d76efc6764a.zip
frameworks_base-18bb4f99206a419c9bc61df08bc29d76efc6764a.tar.gz
frameworks_base-18bb4f99206a419c9bc61df08bc29d76efc6764a.tar.bz2
Clean up autoredaction text.
Also show the timestamp if the original notification does. Bug: 16289371 Change-Id: I6898990629c036dc7c1a129609449e556f8afa72
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java20
1 files changed, 17 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 9101c8d..c667980 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -62,8 +62,10 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
+import android.view.ViewStub;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
+import android.widget.DateTimeView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
@@ -1075,12 +1077,24 @@ public abstract class BaseStatusBar extends SystemUI implements
}
}
+ final View privateTime = contentViewLocal.findViewById(com.android.internal.R.id.time);
+ if (privateTime != null && privateTime.getVisibility() == View.VISIBLE) {
+ final View timeStub = publicViewLocal.findViewById(com.android.internal.R.id.time);
+ timeStub.setVisibility(View.VISIBLE);
+ final DateTimeView dateTimeView = (DateTimeView)
+ publicViewLocal.findViewById(com.android.internal.R.id.time);
+ dateTimeView.setTime(entry.notification.getNotification().when);
+ }
+
final TextView text = (TextView) publicViewLocal.findViewById(
- com.android.internal.R.id.text);
- text.setText("Unlock your device to see this notification.");
+ com.android.internal.R.id.text);
+ if (text != null) {
+ text.setText(R.string.notification_hidden_text);
+ text.setTextAppearance(mContext,
+ R.style.TextAppearance_StatusBar_Material_EventContent_Parenthetical);
+ }
entry.autoRedacted = true;
- // TODO: fill out "time" as well
}
row.setDrawingCacheEnabled(true);