Skip to content

Commit 7953c7c

Browse files
committed
Merge branch 'develop' into copilot/add-phone-orientation-constraint
2 parents f1a7566 + 6e3c171 commit 7953c7c

File tree

194 files changed

+11561
-15192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+11561
-15192
lines changed

.github/workflows/pull-request.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
java-version: 17
1818
cache: 'gradle'
1919

20-
- name: Setup Android SDK
21-
uses: android-actions/setup-android@v2
22-
2320
- name: Unit tests
2421
run: bash ./gradlew testDebugUnitTest
2522

@@ -46,12 +43,48 @@ jobs:
4643
java-version: 17
4744
cache: 'gradle'
4845

49-
- name: Setup Android SDK
50-
uses: android-actions/setup-android@v2
51-
5246
- name: Ktlint check
5347
run: ./gradlew ktlintCheck
5448

49+
rust:
50+
name: Rust code style and tests
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Setup Rust
57+
uses: dtolnay/rust-toolchain@stable
58+
with:
59+
components: rustfmt, clippy
60+
61+
- name: Install Android Rust targets
62+
run: |
63+
rustup target add armv7-linux-androideabi
64+
rustup target add aarch64-linux-android
65+
rustup target add i686-linux-android
66+
rustup target add x86_64-linux-android
67+
68+
- uses: actions/cache@v3
69+
with:
70+
path: |
71+
~/.cargo/bin/
72+
~/.cargo/registry/index/
73+
~/.cargo/registry/cache/
74+
~/.cargo/git/db/
75+
evdev/src/main/rust/evdev_manager/target/
76+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
77+
restore-keys: |
78+
${{ runner.os }}-rust-
79+
80+
- name: Check Rust formatting
81+
working-directory: evdev/src/main/rust/evdev_manager
82+
run: cargo fmt --check
83+
84+
- name: Run Rust tests
85+
working-directory: evdev/src/main/rust/evdev_manager
86+
run: cargo test --package evdev_manager_core
87+
5588
apk:
5689
name: Build APK
5790
runs-on: ubuntu-latest
@@ -77,6 +110,18 @@ jobs:
77110

78111
- name: Setup Android SDK
79112
uses: android-actions/setup-android@v2
113+
with:
114+
ndk-version: "27.2.12479018"
115+
116+
- name: Setup Rust
117+
uses: dtolnay/rust-toolchain@stable
118+
119+
- name: Install Android Rust targets
120+
run: |
121+
rustup target add armv7-linux-androideabi
122+
rustup target add aarch64-linux-android
123+
rustup target add i686-linux-android
124+
rustup target add x86_64-linux-android
80125
81126
- name: set up Ruby for fastlane
82127
uses: ruby/setup-ruby@v1

.github/workflows/testing.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ jobs:
2323
java-version: 17
2424
cache: 'gradle'
2525

26-
- name: Setup Android SDK
27-
uses: android-actions/setup-android@v2
28-
2926
- name: Unit tests
3027
run: bash ./gradlew testDebugUnitTest
3128

@@ -52,12 +49,48 @@ jobs:
5249
java-version: 17
5350
cache: 'gradle'
5451

55-
- name: Setup Android SDK
56-
uses: android-actions/setup-android@v2
57-
5852
- name: Ktlint check
5953
run: ./gradlew ktlintCheck
6054

55+
rust:
56+
name: Rust code style and tests
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
- name: Setup Rust
63+
uses: dtolnay/rust-toolchain@stable
64+
with:
65+
components: rustfmt, clippy
66+
67+
- name: Install Android Rust targets
68+
run: |
69+
rustup target add armv7-linux-androideabi
70+
rustup target add aarch64-linux-android
71+
rustup target add i686-linux-android
72+
rustup target add x86_64-linux-android
73+
74+
- uses: actions/cache@v3
75+
with:
76+
path: |
77+
~/.cargo/bin/
78+
~/.cargo/registry/index/
79+
~/.cargo/registry/cache/
80+
~/.cargo/git/db/
81+
evdev/src/main/rust/evdev_manager/target/
82+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}
83+
restore-keys: |
84+
${{ runner.os }}-rust-
85+
86+
- name: Check Rust formatting
87+
working-directory: evdev/src/main/rust/evdev_manager
88+
run: cargo fmt --check
89+
90+
- name: Run Rust tests
91+
working-directory: evdev/src/main/rust/evdev_manager
92+
run: cargo test --package evdev_manager_core
93+
6194
apk:
6295
name: Generate and upload APK to Discord
6396
runs-on: ubuntu-latest
@@ -89,6 +122,18 @@ jobs:
89122

90123
- name: Setup Android SDK
91124
uses: android-actions/setup-android@v2
125+
with:
126+
ndk-version: "27.2.12479018"
127+
128+
- name: Setup Rust
129+
uses: dtolnay/rust-toolchain@stable
130+
131+
- name: Install Android Rust targets
132+
run: |
133+
rustup target add armv7-linux-androideabi
134+
rustup target add aarch64-linux-android
135+
rustup target add i686-linux-android
136+
rustup target add x86_64-linux-android
92137
93138
- name: set up Ruby for fastlane
94139
uses: ruby/setup-ruby@v1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,7 @@ app/.env
9494
/.idea/AndroidProjectSystem.xml
9595
/.idea/runConfigurations.xml
9696
/.idea/studiobot.xml
97+
98+
evdev/build
99+
evdev/.cxx
100+
evdev/src/main/rust/*/target

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## [4.0.0 Beta 4](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.04)
2+
3+
#### TO BE RELEASED
4+
5+
## Added
6+
7+
- #1915 ask user to remove "adb shell" from Shell command.
8+
- #1904 inform the user how to enable the accessibility service with PRO mode or ADB.
9+
10+
## Bug fixes
11+
12+
- #1913 actually save the option to detect with scan code
13+
114
## [4.0.0 Beta 3](https://github.com/sds100/KeyMapper/releases/tag/v4.0.0-beta.03)
215

316
#### 25 November 2025

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<a href='https://play.google.com/store/apps/details?id=io.github.sds100.keymapper&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' height='75px'/></a>
1313
<a href="https://f-droid.org/packages/io.github.sds100.keymapper/" rel="nofollow"><img alt="Get it on F-Droid" height="75" src="https://user-images.githubusercontent.com/53379023/142497343-0e635fc5-056b-46ff-8d8e-d607ed95527e.png" data-canonical-src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" style="max-width: 100%;"></a>
1414
</br>
15-
<a href='https://ko-fi.com/M4M41032E' target='_blank'><img height='30' style='border:0px;height:30x;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
15+
<a href='https://ko-fi.com/M4M41032E' target='_blank'><img height='30' style='border:0px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
1616
<noscript><a href="https://liberapay.com/sds100/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
1717
<noscript><a href="https://buy.stripe.com/00g16L9YEabldDWdQQ"><img alt="Donate using Stripe" src="https://img.shields.io/badge/Donate-Stripe-blueviolet?style=for-the-badge&logo=stripe"></a></noscript>
1818
</p>

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ dependencies {
152152
implementation(project(":data"))
153153
implementation(project(":sysbridge"))
154154
implementation(project(":system"))
155+
implementation(project(":evdev"))
155156
compileOnly(project(":systemstubs"))
156157

157158
coreLibraryDesugaring(libs.desugar.jdk.libs)

app/proguard-rules.pro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116

117117
# Keep all AIDL interface classes and their methods
118118
-keep class io.github.sds100.keymapper.sysbridge.ISystemBridge** { *; }
119-
-keep class io.github.sds100.keymapper.sysbridge.IEvdevCallback** { *; }
119+
-keep class io.github.sds100.keymapper.evdev.IEvdevCallback** { *; }
120120
-keep class io.github.sds100.keymapper.sysbridge.IShizukuStarterService** { *; }
121121

122122
-keepclassmembers class io.github.sds100.keymapper.sysbridge.shizuku.ShizukuStarterService {
@@ -138,7 +138,8 @@
138138
-keep class io.github.sds100.keymapper.sysbridge.** extends android.content.ContentProvider { *; }
139139

140140
# Keep parcelable classes used in AIDL
141-
-keep class io.github.sds100.keymapper.common.models.EvdevDeviceHandle { *; }
141+
-keep class io.github.sds100.keymapper.common.models.GrabbedDeviceHandle { *; }
142+
-keep class io.github.sds100.keymapper.common.models.EvdevDeviceInfo { *; }
142143

143144
# Keep all rikka.hidden classes and interfaces as they contain AIDL files
144145
-keep class rikka.hidden.** { *; }

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<!-- This is required because sysbridge has a min sdk of 29 since it depends
1414
on the binder-ndk library. Building will fail without this because the min sdk
1515
of the app is 26.-->
16-
<uses-sdk tools:overrideLibrary="io.github.sds100.keymapper.sysbridge" />
16+
<uses-sdk tools:overrideLibrary="io.github.sds100.keymapper.sysbridge, io.github.sds100.keymapper.evdev" />
1717

1818
<application
1919
android:name="io.github.sds100.keymapper.KeyMapperApp"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package io.github.sds100.keymapper.sysbridge.service
2+
3+
import android.os.Looper
4+
5+
class SystemBridge : BaseSystemBridge() {
6+
7+
companion object {
8+
@JvmStatic
9+
fun main(args: Array<String>) {
10+
@Suppress("DEPRECATION")
11+
Looper.prepareMainLooper()
12+
SystemBridge()
13+
Looper.loop()
14+
}
15+
}
16+
}

app/version.properties

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
VERSION_NAME=4.0.0-beta.4
2-
VERSION_CODE=196
3-
VERSION_NUM=01
1+
VERSION_NAME=4.0.0-beta.04
2+
VERSION_CODE=200

0 commit comments

Comments
 (0)