From 3ced33d812d99faa881e5afe034f3a9a2e84c726 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 11 Aug 2020 16:46:58 +0200 Subject: [PATCH] java/com/tailscale/ipn: make App Android 5.1 compatible Fragment.commitNow doesn't exist on Android 5.1. Calling commit and then all flushing pending transactions is just as good, because we're not using any other fragments. Updates tailscale/tailscale#577 Signed-off-by: Elias Naur --- android/src/main/java/com/tailscale/ipn/App.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/tailscale/ipn/App.java b/android/src/main/java/com/tailscale/ipn/App.java index 8f7982b..8a69580 100644 --- a/android/src/main/java/com/tailscale/ipn/App.java +++ b/android/src/main/java/com/tailscale/ipn/App.java @@ -136,7 +136,8 @@ public class App extends Application { Activity act = (Activity)view.getContext(); FragmentTransaction ft = act.getFragmentManager().beginTransaction(); ft.add(new Peer(), "Peer"); - ft.commitNow(); + ft.commit(); + act.getFragmentManager().executePendingTransactions(); } boolean isChromeOS() {