diff options
author | Samuel Holland <samuel@sholland.org> | 2017-08-24 01:22:49 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-08-24 01:22:49 -0500 |
commit | 14f33c5186517f2fbbcfd9d874a5e89a6d6ad26a (patch) | |
tree | 1b3d3ae11347e4fd4e1191708f10e75f990b7185 | |
parent | 618772cd515192d3d03e8733c7b5d353fd36bcf6 (diff) |
ConfigActivity: Avoid unnecessary executePendingTransactions
Nothing later tries to find the list using findFragmentById().
-rw-r--r-- | app/src/main/java/com/wireguard/android/ConfigActivity.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/ConfigActivity.java b/app/src/main/java/com/wireguard/android/ConfigActivity.java index 9743720b..b572f7f6 100644 --- a/app/src/main/java/com/wireguard/android/ConfigActivity.java +++ b/app/src/main/java/com/wireguard/android/ConfigActivity.java @@ -106,10 +106,8 @@ public class ConfigActivity extends BaseConfigActivity { return; // Ensure the list is present in the master pane. It will be restored on activity restarts! final BaseConfigFragment listFragment = fragments.get(TAG_LIST); - if (fm.findFragmentById(R.id.master_fragment) == null) { + if (fm.findFragmentById(R.id.master_fragment) == null) fm.beginTransaction().add(R.id.master_fragment, listFragment, TAG_LIST).commit(); - fm.executePendingTransactions(); - } // In the single-pane layout, the main container starts holding the list fragment. if (!isSplitLayout && visibleFragmentTag == null) visibleFragmentTag = TAG_LIST; |