Skip to content

Commit

Permalink
Revert "Introduce a build configuration without accessibility services (
Browse files Browse the repository at this point in the history
#4625)"

This reverts commit c776a2c.
  • Loading branch information
yasanglass committed Aug 13, 2024
1 parent c776a2c commit 20f7a1f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 38 deletions.
8 changes: 0 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ android {
}
}

github {
manifest.srcFile "channel/github/AndroidManifest.xml"
}

market {
manifest.srcFile "channel/market/AndroidManifest.xml"
}

lawnWithQuickstepGithub {
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
}
Expand Down
22 changes: 0 additions & 22 deletions channel/github/AndroidManifest.xml

This file was deleted.

13 changes: 13 additions & 0 deletions lawnchair/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@
</intent-filter>
</receiver>

<service
android:name="app.lawnchair.LawnchairAccessibilityService"
android:exported="false"
android:label="@string/derived_app_name"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data
android:name="android.accessibilityservice"
android:resource="@xml/accessibility_service_config" />
</service>

<provider
android:name="app.lawnchair.bugreport.FileProvider"
android:authorities="${applicationId}.fileprovider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import app.lawnchair.lawnchairApp
import app.lawnchair.ui.ModalBottomSheetContent
import app.lawnchair.util.requireSystemService
import app.lawnchair.views.ComposeBottomSheet
import com.android.launcher3.BuildConfig
import com.android.launcher3.R
import com.android.launcher3.Utilities
import com.topjohnwu.superuser.Shell
Expand All @@ -52,13 +51,11 @@ class SleepGestureHandler(context: Context) : GestureHandler(context) {
methods.first { it.isSupported() }.sleep(launcher)
}

private val methods = buildList {
add(SleepMethodRoot(context))
if (BuildConfig.FLAVOR_channel == "github") {
add(SleepMethodPieAccessibility(context))
}
add(SleepMethodDeviceAdmin(context))
}
private val methods = listOf(
SleepMethodRoot(context),
SleepMethodPieAccessibility(context),
SleepMethodDeviceAdmin(context),
)

sealed class SleepMethod(protected val context: Context) {
abstract suspend fun isSupported(): Boolean
Expand Down

0 comments on commit 20f7a1f

Please sign in to comment.