Loading packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +22 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.graphics.Rect; import android.util.AttributeSet; import android.util.Slog; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; Loading @@ -34,7 +35,6 @@ import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; import android.widget.RelativeLayout; import android.widget.ScrollView; import com.android.systemui.ExpandHelper; import com.android.systemui.R; Loading Loading @@ -197,6 +197,27 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, return true; } @Override public boolean dispatchKeyEvent(KeyEvent event) { final int keyCode = event.getKeyCode(); switch (keyCode) { // We exclusively handle the back key by hiding this panel. case KeyEvent.KEYCODE_BACK: { if (event.getAction() == KeyEvent.ACTION_UP) { mBar.animateCollapse(); } return true; } // We react to the home key but let the system handle it. case KeyEvent.KEYCODE_HOME: { if (event.getAction() == KeyEvent.ACTION_UP) { mBar.animateCollapse(); } } break; } return super.dispatchKeyEvent(event); } /* @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java +22 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.graphics.Rect; import android.util.AttributeSet; import android.util.Slog; import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; Loading @@ -34,7 +35,6 @@ import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; import android.widget.RelativeLayout; import android.widget.ScrollView; import com.android.systemui.ExpandHelper; import com.android.systemui.R; Loading Loading @@ -197,6 +197,27 @@ public class NotificationPanel extends RelativeLayout implements StatusBarPanel, return true; } @Override public boolean dispatchKeyEvent(KeyEvent event) { final int keyCode = event.getKeyCode(); switch (keyCode) { // We exclusively handle the back key by hiding this panel. case KeyEvent.KEYCODE_BACK: { if (event.getAction() == KeyEvent.ACTION_UP) { mBar.animateCollapse(); } return true; } // We react to the home key but let the system handle it. case KeyEvent.KEYCODE_HOME: { if (event.getAction() == KeyEvent.ACTION_UP) { mBar.animateCollapse(); } } break; } return super.dispatchKeyEvent(event); } /* @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { Loading