OSDN Git Service

Apply insets manually in StatusBarWindowView.
authorJohn Spurlock <jspurlock@google.com>
Tue, 22 Apr 2014 16:58:26 +0000 (12:58 -0400)
committerJohn Spurlock <jspurlock@google.com>
Tue, 22 Apr 2014 16:58:26 +0000 (12:58 -0400)
Bug:14131489
Change-Id: Ie4be2185cae98764ea44b2e042210f13412a02aa

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java

index 1d675bd..c5dae85 100644 (file)
@@ -20,6 +20,7 @@ import android.app.StatusBarManager;
 import android.content.Context;
 import android.graphics.Canvas;
 import android.graphics.Paint;
+import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -52,6 +53,16 @@ public class StatusBarWindowView extends FrameLayout
     }
 
     @Override
+    protected boolean fitSystemWindows(Rect insets) {
+        if (getFitsSystemWindows()) {
+            setPadding(insets.left, insets.top, insets.right, insets.bottom);
+        } else {
+            setPadding(0, 0, 0, 0);
+        }
+        return true;
+    }
+
+    @Override
     protected void onAttachedToWindow () {
         super.onAttachedToWindow();