diff options
-rw-r--r-- | services/java/com/android/server/status/StatusBarService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java index 0a731a8..2d0f254 100644 --- a/services/java/com/android/server/status/StatusBarService.java +++ b/services/java/com/android/server/status/StatusBarService.java @@ -1496,6 +1496,7 @@ public class StatusBarService extends IStatusBar.Stub // lp.token = mStatusBarView.getWindowToken(); lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL; lp.setTitle("TrackingView"); + lp.y = mTrackingPosition; mTrackingParams = lp; WindowManagerImpl.getDefault().addView(mTrackingView, lp); @@ -1575,8 +1576,11 @@ public class StatusBarService extends IStatusBar.Stub // Maybe the view was resized. if (!mExpandedVisible) { if (mTrackingView != null) { - mTrackingPosition = mTrackingParams.y = -disph; - WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams); + mTrackingPosition = -disph; + if (mTrackingParams != null) { + mTrackingParams.y = mTrackingPosition; + WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams); + } } if (mExpandedParams != null) { mExpandedParams.y = -disph; |