summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-12-03 14:52:10 -0500
committerDaniel Sandler <dsandler@google.com>2010-12-03 15:55:04 -0500
commit3e8f5a2c1beb4b918856063880e05125946e4347 (patch)
tree2875e2394cf6e6043323ee9c721f7baa2e364307 /packages
parentbcdf40b42fb8a4313461233d2db1eb959e2c6a70 (diff)
downloadframeworks_base-3e8f5a2c1beb4b918856063880e05125946e4347.zip
frameworks_base-3e8f5a2c1beb4b918856063880e05125946e4347.tar.gz
frameworks_base-3e8f5a2c1beb4b918856063880e05125946e4347.tar.bz2
Hide navigation buttons and clock on lockscreen.
(This introduces a StatusBarManager disable flag to ask the status bar to hide just the clock, which might be useful in other situations, such as clock/dock apps.) Bug: 3130393 Change-Id: Ia08627508518e2ed3713ffbf856e4ec42952b3a8
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar.xml17
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java18
2 files changed, 34 insertions, 1 deletions
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml
index 666bfdc..cd67d1a 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml
@@ -76,8 +76,23 @@
android:textColor="#2e2e2e" />
</com.android.systemui.statusbar.tablet.HoloClock>
+ <TextView
+ android:id="@+id/network_text"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginTop="12dp"
+ android:layout_marginRight="6dip"
+ android:layout_marginLeft="6dip"
+ android:gravity="center"
+ android:singleLine="true"
+ android:visibility="gone"
+ android:textSize="14dip"
+ android:textColor="#606060"
+ />
+
<LinearLayout
- android:layout_width="48dip"
+ android:id="@+id/signal_battery_cluster"
+ android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 563b8ef..b0f6a18 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -165,6 +165,8 @@ public class TabletStatusBar extends StatusBar {
(ImageView)mNotificationPanel.findViewById(R.id.network_type));
mNetworkController.addLabelView(
(TextView)mNotificationPanel.findViewById(R.id.network_text));
+ mNetworkController.addLabelView(
+ (TextView)mBarContents.findViewById(R.id.network_text));
mStatusBarView.setIgnoreChildren(0, mNotificationTrigger, mNotificationPanel);
@@ -579,12 +581,28 @@ public class TabletStatusBar extends StatusBar {
setAreThereNotifications();
}
+ public void showClock(boolean show) {
+ View clock = mBarContents.findViewById(R.id.clock);
+ View network_text = mBarContents.findViewById(R.id.network_text);
+ if (clock != null) {
+ clock.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
+ if (network_text != null) {
+ network_text.setVisibility((!show) ? View.VISIBLE : View.GONE);
+ }
+ }
+
public void disable(int state) {
int old = mDisabled;
int diff = state ^ old;
mDisabled = state;
// act accordingly
+ if ((diff & StatusBarManager.DISABLE_CLOCK) != 0) {
+ boolean show = (state & StatusBarManager.DISABLE_CLOCK) == 0;
+ Slog.d(TAG, "DISABLE_CLOCK: " + (show ? "no" : "yes"));
+ showClock(show);
+ }
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
if ((state & StatusBarManager.DISABLE_EXPAND) != 0) {
Slog.d(TAG, "DISABLE_EXPAND: yes");