Skip to content

Commit 83a6671

Browse files
committed
fix: nextAppOpModeInCycle non-static for Java 8 source compatibility
The release.yml workflow failed on tag v0.4.1 because Java 8 source compatibility (sourceCompatibility/targetCompatibility VERSION_1_8 in app/build.gradle) doesn't allow static members inside inner classes. The helper added in 07e42d9 was declared static inside AppDetailsRecyclerAdapter and broke compileReleaseJavaWithJavac: AppDetailsPermissionsFragment.java:558: error: Illegal static declaration in inner class AppDetailsPermissionsFragment.AppDetailsRecyclerAdapter Demoted to a non-static private method on the inner class. Touches no instance state, so behavior is identical. Local-built APK (versionCode 5 / versionName 0.4.1) installs cleanly on Samsung S25 Ultra and is signed with the release cert SHA-256 21:5F:B4:70:63:2E:A6:CD:59:A4:BA:AB:35:0A:9E:0B:99:AD:11:0F:DD:FA:F5:A9:EA:64:61:E5:D0:C2:38:6C.
1 parent de4ae4a commit 83a6671

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/io/github/muntashirakon/AppManager/details/AppDetailsPermissionsFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,12 @@ public int getItemCount() {
553553
* Cycle ALLOWED → IGNORED → ERRORED → ALLOWED for the row-tap toggle. Any
554554
* other current mode (FOREGROUND, DEFAULT, etc.) re-enters the cycle at
555555
* ALLOWED so the user always lands on a known three-state ladder.
556+
*
557+
* <p>Non-static because Java 8 source compatibility forbids static
558+
* members inside inner classes. No instance state is touched.
556559
*/
557560
@AppOpsManagerCompat.Mode
558-
private static int nextAppOpModeInCycle(@AppOpsManagerCompat.Mode int currentMode) {
561+
private int nextAppOpModeInCycle(@AppOpsManagerCompat.Mode int currentMode) {
559562
switch (currentMode) {
560563
case android.app.AppOpsManager.MODE_ALLOWED:
561564
return android.app.AppOpsManager.MODE_IGNORED;

0 commit comments

Comments
 (0)