Skip to content

Commit 5323be0

Browse files
committed
feat: new launcher icon, fix action log, improve running detection, rename label
1 parent 1092ebf commit 5323be0

File tree

5 files changed

+51
-16
lines changed

5 files changed

+51
-16
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ appops set <package> RUN_IN_BACKGROUND allow # Allow
115115
appops set <package> WAKE_LOCK ignore # Disable wake lock
116116
```
117117

118+
## Known Issues
119+
120+
| Issue | Status | Impact |
121+
|-------|--------|--------|
122+
| App running detection may fail | Won't Fix (Lazy) | Sorting by running status doesn't work reliably |
123+
118124
## Contributing
119125

120126
1. Fork the repository

app/src/main/java/com/appcontrolx/ui/BatchProgressBottomSheet.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,16 @@ class BatchProgressBottomSheet : BottomSheetDialogFragment() {
179179
delay(50) // Small delay for UI
180180
}
181181

182-
// Complete
182+
// Complete - invoke callback immediately to save log
183+
onComplete?.invoke(successCount, failCount)
184+
183185
b.tvProgress.text = if (failCount == 0) {
184186
getString(R.string.batch_all_success, successCount)
185187
} else {
186188
getString(R.string.batch_partial_success, successCount, failCount)
187189
}
188190
b.btnCancel.text = getString(R.string.btn_close)
189-
190-
val finalSuccess = successCount
191-
val finalFail = failCount
192-
b.btnCancel.setOnClickListener {
193-
onComplete?.invoke(finalSuccess, finalFail)
194-
dismiss()
195-
}
191+
b.btnCancel.setOnClickListener { dismiss() }
196192
}
197193

198194
override fun onDestroyView() {

app/src/main/java/com/appcontrolx/ui/adapter/AppListAdapter.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ class AppListAdapter(
113113
root.alpha = if (app.isEnabled) 1f else 0.6f
114114

115115
// Status badges
116-
val hasAnyBadge = app.isFrozen || app.isRunning || app.isStopped || app.isBackgroundRestricted
116+
// Running detection: if not frozen, not stopped, not restricted = running
117+
val isEffectivelyRunning = !app.isFrozen && !app.isStopped && !app.isBackgroundRestricted
118+
val hasAnyBadge = app.isFrozen || isEffectivelyRunning || app.isStopped || app.isBackgroundRestricted
117119
statusContainer.visibility = if (hasAnyBadge) View.VISIBLE else View.GONE
118120

119121
tvStatusFrozen.visibility = if (app.isFrozen) View.VISIBLE else View.GONE
120-
tvStatusRunning.visibility = if (app.isRunning && !app.isFrozen) View.VISIBLE else View.GONE
121-
tvStatusStopped.visibility = if (app.isStopped && !app.isFrozen && !app.isRunning) View.VISIBLE else View.GONE
122-
tvStatusRestricted.visibility = if (app.isBackgroundRestricted) View.VISIBLE else View.GONE
122+
tvStatusRunning.visibility = if (isEffectivelyRunning) View.VISIBLE else View.GONE
123+
tvStatusStopped.visibility = if (app.isStopped && !app.isFrozen) View.VISIBLE else View.GONE
124+
tvStatusRestricted.visibility = if (app.isBackgroundRestricted && !app.isFrozen) View.VISIBLE else View.GONE
123125

124126
// Tap: if in selection mode -> toggle, else -> show info
125127
cardApp.setOnClickListener {

app/src/main/res/drawable/ic_launcher_foreground.xml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,41 @@
44
android:height="108dp"
55
android:viewportWidth="108"
66
android:viewportHeight="108">
7+
8+
<!-- Gear outer ring with teeth -->
9+
<path
10+
android:fillColor="#1E88E5"
11+
android:pathData="M54,24
12+
L58,24 L60,20 L64,20 L66,24 L70,26
13+
L74,24 L77,27 L75,31 L78,34
14+
L82,34 L84,38 L84,42 L80,44
15+
L82,48 L82,52 L84,54
16+
L84,58 L82,60 L80,64
17+
L84,66 L84,70 L82,74 L78,74
18+
L75,77 L77,81 L74,84 L70,82
19+
L66,84 L64,88 L60,88 L58,84
20+
L54,84
21+
L50,84 L48,88 L44,88 L42,84 L38,82
22+
L34,84 L31,81 L33,77 L30,74
23+
L26,74 L24,70 L24,66 L28,64
24+
L26,60 L26,56 L24,54
25+
L24,50 L26,48 L28,44
26+
L24,42 L24,38 L26,34 L30,34
27+
L33,31 L31,27 L34,24 L38,26
28+
L42,24 L44,20 L48,20 L50,24
29+
Z"/>
30+
31+
<!-- Inner circle (cutout effect) -->
732
<path
833
android:fillColor="#FFFFFF"
9-
android:pathData="M54,30L54,30A24,24 0,0 1,78 54L78,54A24,24 0,0 1,54 78L54,78A24,24 0,0 1,30 54L30,54A24,24 0,0 1,54 30z"/>
34+
android:pathData="M54,34
35+
A20,20 0 1,1 54,74
36+
A20,20 0 1,1 54,34z"/>
37+
38+
<!-- Letter A -->
1039
<path
11-
android:fillColor="@color/primary"
12-
android:pathData="M46,50h4v-4h-4v4zM54,62h4v-4h-4v4zM46,62h4v-4h-4v4zM46,56h4v-4h-4v4zM54,56h4v-4h-4v4zM62,46v4h4v-4h-4zM54,50h4v-4h-4v4zM62,56h4v-4h-4v4zM62,62h4v-4h-4v4z"/>
40+
android:fillColor="#1E88E5"
41+
android:pathData="M54,38
42+
L66,70 L60,70 L57,62 L51,62 L48,70 L42,70 L54,38z
43+
M54,48 L52,58 L56,58 L54,48z"/>
1344
</vector>

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
<string name="badge_frozen">FROZEN</string>
295295
<string name="badge_running">RUNNING</string>
296296
<string name="badge_stopped">STOPPED</string>
297-
<string name="badge_restricted">BG RESTRICTED</string>
297+
<string name="badge_restricted">BACKGROUND RESTRICTED</string>
298298
<string name="badge_exported">EXPORTED</string>
299299

300300
<!-- Status Filter -->

0 commit comments

Comments
 (0)