Skip to content

Commit

Permalink
No need for CompatUtils to determine whether to use invisible activit…
Browse files Browse the repository at this point in the history
…y hacks
  • Loading branch information
farmerbb committed Sep 12, 2024
1 parent 39d2493 commit b5ed17f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ public static boolean isImeVisible(View view) {
}

public static void grantNotificationPermissionIfNeeded(Activity activity) {}

public static boolean needsInvisibleActivityHacks() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ public static boolean isImeVisible(View view) {
}

public static void grantNotificationPermissionIfNeeded(Activity activity) {}

public static boolean needsInvisibleActivityHacks() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ public static boolean isImeVisible(View view) {
}

public static void grantNotificationPermissionIfNeeded(Activity activity) {}

public static boolean needsInvisibleActivityHacks() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ public static boolean isImeVisible(View view) {
}

public static void grantNotificationPermissionIfNeeded(Activity activity) {}

public static boolean needsInvisibleActivityHacks() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,4 @@ public static void grantNotificationPermissionIfNeeded(Activity activity) {
activity.requestPermissions(new String[]{Manifest.permission.POST_NOTIFICATIONS}, 42);
}
}

public static boolean needsInvisibleActivityHacks() {
return Build.VERSION.SDK_INT < Build.VERSION_CODES.S_V2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private void startTaskbarService() {
if(U.hasFreeformSupport(this)
&& U.isFreeformModeEnabled(this)
&& !FreeformHackHelper.getInstance().isFreeformHackActive()
&& CompatUtils.needsInvisibleActivityHacks()) {
&& U.getCurrentApiVersion() < 32.0f) {
U.startFreeformHack(this, true);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/farmerbb/taskbar/util/U.java
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ private static void prepareToStartActivity(Context context, boolean openInNewWin
&& shouldLaunchTouchAbsorber(context)) {
startTouchAbsorberActivity(context);
newHandler().postDelayed(runnable, 100);
} else if(openInNewWindow && CompatUtils.needsInvisibleActivityHacks()) {
} else if(openInNewWindow && getCurrentApiVersion() < 32.0f) {
Intent intent = new Intent(context, DummyActivity.class);
intent.putExtra("finish_on_pause", true);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
Expand Down

0 comments on commit b5ed17f

Please sign in to comment.