Skip to content

Commit

Permalink
Update blockevent library version
Browse files Browse the repository at this point in the history
  • Loading branch information
nmelihsensoy committed Mar 18, 2022
1 parent ee2f803 commit 2c68fd8
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,8 @@ obj/

!/gradle/wrapper/gradle-wrapper.jar

# End of https://www.toptal.com/developers/gitignore/api/java,linux,macos,android,windows,intellij,androidstudio,kotlin
# End of https://www.toptal.com/developers/gitignore/api/java,linux,macos,android,windows,intellij,androidstudio,kotlin

*.apk
app/release/*
app/debug/*
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ android {

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE" />

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SnowyTileService : TileService() {

SnowyUtils.blockTouchScreen(
this.applicationContext.applicationInfo.nativeLibraryDir,
prefs.getString("stop_trigger", "v_up")!!,
prefs.getString("stop_trigger", "2")!!,
modes,
getString(R.string.onstop_alert_msg))

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/nmelihsensoy/snowy/SnowyUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SnowyUtils {
fun blockTouchScreen(libPath: String, stopTrigger: String, flags: EnumSet<Mode>,
onStopMsg: String = ""){
var blockCmd = mutableListOf("su", "-c")
val blockeventCmd = mutableListOf("$libPath/blockevent.so", "-t", "-s", stopTrigger, "-v", "4")
val blockeventCmd = mutableListOf("$libPath/blockevent.so", "-d", "0", "-s", stopTrigger, "-v", "0")
blockCmd.addAll(collapseCmd)
blockCmd.add(";")

Expand Down
Binary file modified app/src/main/jniLibs/arm64-v8a/blockevent.so
Binary file not shown.
Binary file modified app/src/main/jniLibs/armeabi-v7a/blockevent.so
Binary file not shown.
Binary file modified app/src/main/jniLibs/x86/blockevent.so
Binary file not shown.
Binary file modified app/src/main/jniLibs/x86_64/blockevent.so
Binary file not shown.
6 changes: 4 additions & 2 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<string-array name="stop_trigger_entries">
<item>Volume Down</item>
<item>Volume Up</item>
<item>Power</item>
</string-array>

<string-array name="stop_trigger_values">
<item>v_dwn</item>
<item>v_up</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>

<string-array name="tile_icon_entries">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
app:title="@string/settings_header">
</PreferenceCategory>
<ListPreference
app:defaultValue="v_up"
app:defaultValue="2"
app:entries="@array/stop_trigger_entries"
app:entryValues="@array/stop_trigger_values"
app:key="stop_trigger"
Expand Down

0 comments on commit 2c68fd8

Please sign in to comment.