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 <mail@eliasnaur.com>
pull/3/head
Elias Naur 4 years ago
parent f25b5bbcba
commit 3ced33d812

@ -136,7 +136,8 @@ public class App extends Application {
Activity act = (Activity)view.getContext(); Activity act = (Activity)view.getContext();
FragmentTransaction ft = act.getFragmentManager().beginTransaction(); FragmentTransaction ft = act.getFragmentManager().beginTransaction();
ft.add(new Peer(), "Peer"); ft.add(new Peer(), "Peer");
ft.commitNow(); ft.commit();
act.getFragmentManager().executePendingTransactions();
} }
boolean isChromeOS() { boolean isChromeOS() {

Loading…
Cancel
Save