// and the Play Store version of Taskbar (compiled with SDK 28).
// TODO Do not make changes to this file without making corresponding changes to the Android-x86 version.
+import android.annotation.TargetApi;
+import android.os.Build;
+import android.view.WindowManager;
+
+@TargetApi(Build.VERSION_CODES.P)
public class CompatUtils {
private CompatUtils() {}
-
+
+ public static void applyLayoutInDisplayCutoutModeTo(WindowManager.LayoutParams params) {
+ params.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
+ }
}
\ No newline at end of file
import com.farmerbb.taskbar.service.NotificationService;
import com.farmerbb.taskbar.service.StartMenuService;
import com.farmerbb.taskbar.service.TaskbarService;
+import com.farmerbb.taskbar.util.CompatUtils;
import com.farmerbb.taskbar.util.IconCache;
import com.farmerbb.taskbar.util.LauncherHelper;
import com.farmerbb.taskbar.util.U;
shouldDelayFreeformHack = true;
hits = 0;
+ WindowManager.LayoutParams params = getWindow().getAttributes();
+ CompatUtils.applyLayoutInDisplayCutoutModeTo(params);
+ getWindow().setAttributes(params);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
View view = new View(this) {