Skip to content

Commit

Permalink
try target 34
Browse files Browse the repository at this point in the history
  • Loading branch information
duzhaokun123 committed Dec 24, 2023
1 parent 5ac764d commit df32faa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android-stub/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ plugins {
}

android {
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 31
targetSdk = 33
targetSdk = 34

consumerProguardFiles("consumer-rules.pro")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ class AppWindow(val context: Context, private val densityDpi: Int, private val f
}
override fun onActivityRequestedOrientationChanged(taskId: Int, requestedOrientation: Int) {}
override fun onTaskRemovalStarted(taskInfo: ActivityManager.RunningTaskInfo?) {}
// override fun onTaskProfileLocked(taskInfo: ActivityManager.RunningTaskInfo?, userId: Int) {}

override fun onTaskProfileLocked(taskInfo: ActivityManager.RunningTaskInfo?) {}
override fun onTaskSnapshotChanged(taskId: Int, snapshot: TaskSnapshot?) {}
override fun onBackPressedOnTaskRoot(taskInfo: ActivityManager.RunningTaskInfo?) {}
Expand Down Expand Up @@ -630,12 +632,14 @@ class AppWindow(val context: Context, private val densityDpi: Int, private val f
return true
}


override fun onScroll(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
distanceX: Float,
distanceY: Float
): Boolean {
e1 ?: return false
val params = binding.root.layoutParams as WindowManager.LayoutParams
params.x = (startX + (e2.rawX - e1.rawX)).toInt()
params.y = (startY + (e2.rawY - e1.rawY)).toInt()
Expand All @@ -648,11 +652,12 @@ class AppWindow(val context: Context, private val densityDpi: Int, private val f
}

override fun onFling(
e1: MotionEvent,
e1: MotionEvent?,
e2: MotionEvent,
velocityX: Float,
velocityY: Float
): Boolean {
e1 ?: return false
if (e1.source == InputDevice.SOURCE_MOUSE) return false
val params = binding.root.layoutParams as WindowManager.LayoutParams
runCatching {
Expand Down

0 comments on commit df32faa

Please sign in to comment.