diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java index f54f1fd..da5d056 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java @@ -34,6 +34,7 @@ import android.os.IPowerManager; import android.os.PowerManager; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.PowerManager; import android.provider.Settings; import android.util.AttributeSet; import android.util.Log; @@ -46,7 +47,6 @@ import android.view.ViewRootImpl; import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.widget.FrameLayout; - import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.DragDownHelper; @@ -336,6 +336,20 @@ public class StatusBarWindowView extends FrameLayout { } } + public void addContent(View content) { + addView(content); + mStackScrollLayout = (NotificationStackScrollLayout) content.findViewById( + R.id.notification_stack_scroller); + mNotificationPanel = (NotificationPanelView) content.findViewById(R.id.notification_panel); + mDragDownHelper = new DragDownHelper(getContext(), this, mStackScrollLayout, mService); + mBrightnessMirror = content.findViewById(R.id.brightness_mirror); + + } + + public void removeContent(View content) { + removeView(content); + } + public class LayoutParams extends FrameLayout.LayoutParams { public boolean ignoreRightInset; @@ -361,8 +375,8 @@ public class StatusBarWindowView extends FrameLayout { void observe() { ContentResolver resolver = mContext.getContentResolver(); - resolver.registerContentObserver(Settings.System.getUriFor( - Settings.System.DOUBLE_TAP_SLEEP_GESTURE), false, this); + resolver.registerContentObserver(Settings.System.getUriFor(Settings.System.DOUBLE_TAP_SLEEP_GESTURE), false, + this); update(); } @@ -383,8 +397,8 @@ public class StatusBarWindowView extends FrameLayout { public void update() { ContentResolver resolver = mContext.getContentResolver(); - mDoubleTapToSleepEnabled = Settings.System.getInt( - resolver, Settings.System.DOUBLE_TAP_SLEEP_GESTURE, 1) == 1; + mDoubleTapToSleepEnabled = Settings.System + .getInt(resolver, Settings.System.DOUBLE_TAP_SLEEP_GESTURE, 1) == 1; } } } |