diff options
author | Joe Onorato <joeo@google.com> | 2011-01-23 17:53:23 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-01-23 19:22:52 -0800 |
commit | 664644d9e012aa2a28ac96f305b1ce6499ec8806 (patch) | |
tree | d8db43b09de516fefd82adf4fc4ec22417dda648 /packages/SystemUI | |
parent | fac86056b285bf59c1c3e774f1cb9f6de0be59ba (diff) | |
download | frameworks_base-664644d9e012aa2a28ac96f305b1ce6499ec8806.zip frameworks_base-664644d9e012aa2a28ac96f305b1ce6499ec8806.tar.gz frameworks_base-664644d9e012aa2a28ac96f305b1ce6499ec8806.tar.bz2 |
visibility ("lights out") API.
1. Views may setSystemUiVisibility() to recommend that
the system chrome (status bar or other UI) show or hide
itself. (This functionality was previously available only
via the FLAG_FULLSCREEN window flag for some SystemUI
implementations.)
2. Views may register a OnSystemUiVisibilityChangedListener
on a view, and find out when the system UI actually
appears or disappears, allowing apps to coordinate the
appearance of their own UI if desired.
Bug: 3241144
Change-Id: Ia1758d94099182d49a1e3688ea2738ae4995b829
Diffstat (limited to 'packages/SystemUI')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java | 11 |
1 files changed, 11 insertions, 0 deletions
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 a3a58ed..c2f74f0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -564,17 +564,28 @@ public class TabletStatusBar extends StatusBar implements if (DEBUG) Slog.d(TAG, "hiding shadows (lights on)"); mBarContents.setVisibility(View.VISIBLE); mShadow.setVisibility(View.GONE); + notifyLightsChanged(true); break; case MSG_HIDE_CHROME: if (DEBUG) Slog.d(TAG, "showing shadows (lights out)"); animateCollapse(); mBarContents.setVisibility(View.GONE); mShadow.setVisibility(View.VISIBLE); + notifyLightsChanged(false); break; } } } + private void notifyLightsChanged(boolean shown) { + try { + Slog.d(TAG, "lights " + (shown?"on":"out")); + mWindowManager.statusBarVisibilityChanged( + shown ? View.STATUS_BAR_VISIBLE : View.STATUS_BAR_HIDDEN); + } catch (RemoteException ex) { + } + } + public void addIcon(String slot, int index, int viewIndex, StatusBarIcon icon) { if (DEBUG) Slog.d(TAG, "addIcon(" + slot + ") -> " + icon); } |