(1) 在 lcd 的 dts 中配置屏幕的物理宽高,单位为 mm
screen-width = <153>;//Lcd 物理宽度,如 153
screen-hight = <85>;//Lcd 物理高度,如 85
(2) 修改 Mouse 事件处理
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -223,7 +223,7 @@ public abstract class PanelView extends FrameLayout {
}
// On expanding, single mouse click expands the panel instead of dragging.
- if (isFullyCollapsed() && event.isFromSource(InputDevice.SOURCE_MOUSE)) {
+ if (false) {
if (event.getAction() == MotionEvent.ACTION_UP) {
expand(true);
}
@@ -401,6 +401,7 @@ public abstract class PanelView extends FrameLayout {
EventLogConstants.SYSUI_LOCKSCREEN_GESTURE_SWIPE_UP_UNLOCK,
heightDp, velocityDp);
}
+ if (mExpandedFraction > 0f)
fling(vel, expand, isFalseTouch(x, y));
onTrackingStopped(expand);
mUpdateFlingOnLayout = expand && mPanelClosedOnDown && !mHasLayoutedSinceDown;