diff --git a/.gitignore b/.gitignore index 2a69752..0a89af9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ .cxx local.properties /app/release +/dist/ +.kotlin/ diff --git a/PRIVACY.md b/PRIVACY.md index 7d10cf1..140e39d 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -37,13 +37,9 @@ Ogesture does **not** request `QUERY_ALL_PACKAGES`. Its `` declaration | Permission | Why it is needed | |---|---| -| **Display over other apps** (`SYSTEM_ALERT_WINDOW`) | Draws the thin, invisible edge strips that detect your swipes. | -| **Accessibility service** | Performs Back, Home, and Recents. See above. | -| **Unrestricted battery usage** (`REQUEST_IGNORE_BATTERY_OPTIMIZATIONS`) | Stops the system from killing the gesture service in the background. | -| **Foreground service** (`FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_SPECIAL_USE`) | Keeps the edge strips running while you use other apps. | -| **Post notifications** (`POST_NOTIFICATIONS`) | Shows the ongoing notification Android requires for that foreground service. | +| **Accessibility service** | Owns the thin, invisible edge overlays that detect your swipes, and performs Back, Home, and Recents. See above. | +| **Unrestricted battery usage** (`REQUEST_IGNORE_BATTERY_OPTIMIZATIONS`) | Stops the system from killing the accessibility service in the background. | | **Vibrate** (`VIBRATE`) | Haptic feedback when a gesture triggers. | -| **Receive boot completed** (`RECEIVE_BOOT_COMPLETED`) | Restarts the gesture service after you reboot. | Ogesture also reads one system setting, `ENABLED_ACCESSIBILITY_SERVICES`, to check whether you have granted it accessibility access — so the app can show the correct setup state and turn gestures off if the permission goes away. diff --git a/README.md b/README.md index 2aa5ef7..c8ec7bb 100644 --- a/README.md +++ b/README.md @@ -20,20 +20,18 @@ You can now use gestures even with 3-button navigation enabled. ## How it works -Ogesture draws thin, invisible overlays along the edges of the screen and uses an accessibility service to perform the navigation actions when it detects a swipe. +Ogesture draws thin, invisible overlays along the edges of the screen and performs the navigation actions when it detects a swipe. The overlays are accessibility-overlay windows owned by Ogesture's accessibility service, so they work even on secure system screens (such as Android Settings) and do not require the "Display over other apps" permission. -It needs three permissions: +It needs two permissions: -1. **Display over other apps** — to place the edge overlays that detect swipes. -2. **Accessibility service** — to perform the Back, Home, and Recents actions. -3. **Unrestricted battery usage** — so the system doesn't kill the gesture service in the background. +1. **Accessibility service** — owns the edge overlays that detect swipes and performs the Back, Home, and Recents actions. +2. **Unrestricted battery usage** — so the system doesn't kill the accessibility service in the background. -The app guides you through granting all three on first launch. +The app guides you through granting both on first launch. ## Things to remember - This app is free, open source, and collects no data. Everything runs locally on your device. -- Android's security policy blocks gestures on certain screens, such as your phone's Settings pages. ## License diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 8bb353f..e4dc3a8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -54,7 +54,6 @@ dependencies { implementation(libs.androidx.compose.material3) implementation(libs.androidx.compose.material.icons.core) implementation(libs.androidx.datastore.preferences) - implementation(libs.androidx.lifecycle.service) implementation(libs.androidx.lifecycle.viewmodel.compose) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) diff --git a/app/src/androidTest/java/com/ogesture/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/ogesture/ExampleInstrumentedTest.kt index a6dd7d9..1ce8ab9 100644 --- a/app/src/androidTest/java/com/ogesture/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/ogesture/ExampleInstrumentedTest.kt @@ -17,8 +17,13 @@ import org.junit.Assert.* class ExampleInstrumentedTest { @Test fun useAppContext() { - // Context of the app under test. + // Context of the app under test. The debug build adds a `.debug` applicationId + // suffix so it installs alongside the release app, so accept either form. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.ogesture", appContext.packageName) + val pkg = appContext.packageName + assertTrue( + "package should be com.ogesture or its debug variant, was $pkg", + pkg == "com.ogesture" || pkg == "com.ogesture.debug", + ) } } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 343fddd..87ee516 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,12 +2,7 @@ - - - - -