Skip to content

Commit d10be05

Browse files
committed
feat: add Restart SystemUI button & update gradle
1 parent 5597110 commit d10be05

24 files changed

Lines changed: 79 additions & 3 deletions

.idea/gradle.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
110 KB
Loading

app/src/main/java/com/leohearts/alternativeUnlockHook/SettingsActivity.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.material.icons.rounded.Close
1212
import androidx.compose.material.icons.rounded.Face
1313
import androidx.compose.material.icons.rounded.Lock
1414
import androidx.compose.material.icons.rounded.Refresh
15+
import androidx.compose.material.icons.rounded.Settings
1516
import androidx.compose.material3.AlertDialog
1617
import androidx.compose.material3.Divider
1718
import androidx.compose.material3.ExperimentalMaterial3Api
@@ -210,7 +211,7 @@ fun SettingsBase( modifier: Modifier = Modifier) {
210211
supportingContent = { Text("Load config every time your phone unlocks. Otherwise, you'll need to restart SystemUI to apply changes.") },
211212
leadingContent = {
212213
Icon(
213-
Icons.Rounded.Refresh,
214+
Icons.Rounded.Settings,
214215
contentDescription = "Localized description",
215216
)
216217
},
@@ -226,6 +227,20 @@ fun SettingsBase( modifier: Modifier = Modifier) {
226227
}
227228
)
228229
}
230+
Surface(onClick = {
231+
sudo("killall com.android.systemui")
232+
}) {
233+
ListItem(
234+
headlineContent = { Text("Restart SystemUI") },
235+
supportingContent = { Text("Run killall com.android.systemui") },
236+
leadingContent = {
237+
Icon(
238+
Icons.Rounded.Refresh,
239+
contentDescription = "Localized description",
240+
)
241+
}
242+
)
243+
}
229244
if (openDialog.value) {
230245
AlertDialog(
231246
onDismissRequest = {
1006 Bytes
Loading
5.6 KB
Loading
1.29 KB
Loading
496 Bytes
Loading

0 commit comments

Comments
 (0)