Merge branch 'heads/android-14.0.0_r18' into 14-dev

This commit is contained in:
MrSluffy
2023-12-14 15:26:43 +08:00
parent 32700b0100
commit cc8f9828ab
756 changed files with 23785 additions and 12235 deletions
@@ -92,32 +92,7 @@ public class StatusBarTouchController implements TouchController {
private void dispatchTouchEvent(MotionEvent ev) {
if (mSystemUiProxy.isActive()) {
mLastAction = ev.getActionMasked();
mSystemUiProxy.onStatusBarMotionEvent(ev);
} else if (!mExpanded) {
mExpanded = true;
expand();
}
if (!mVibrated) {
mVibrated = true;
vibrate();
}
}
@SuppressLint({ "WrongConstant", "PrivateApi" })
private void expand() {
try {
Class.forName("android.app.StatusBarManager")
.getMethod("expandNotificationsPanel")
.invoke(mLauncher.getSystemService("statusbar"));
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException
| ClassNotFoundException e) {
e.printStackTrace();
}
}
private void vibrate() {
if (!LawnchairAppKt.getLawnchairApp(mLauncher).isVibrateOnIconAnimation()) {
VibratorWrapper.INSTANCE.get(mLauncher).vibrate(VibratorWrapper.OVERVIEW_HAPTIC);
mSystemUiProxy.onStatusBarTouchEvent(ev);
}
}
@@ -131,8 +106,6 @@ public class StatusBarTouchController implements TouchController {
if (!mCanIntercept) {
return false;
}
mExpanded = false;
mVibrated = false;
mDownEvents.clear();
mDownEvents.put(pid, new PointF(ev.getX(), ev.getY()));
} else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) {