ConfigActivity: Avoid unnecessary executePendingTransactions
Nothing later tries to find the list using findFragmentById(). Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
290c98a9e3
commit
f83c84ce4e
@ -106,10 +106,8 @@ public class ConfigActivity extends BaseConfigActivity {
|
|||||||
return;
|
return;
|
||||||
// Ensure the list is present in the master pane. It will be restored on activity restarts!
|
// Ensure the list is present in the master pane. It will be restored on activity restarts!
|
||||||
final BaseConfigFragment listFragment = fragments.get(TAG_LIST);
|
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.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.
|
// In the single-pane layout, the main container starts holding the list fragment.
|
||||||
if (!isSplitLayout && visibleFragmentTag == null)
|
if (!isSplitLayout && visibleFragmentTag == null)
|
||||||
visibleFragmentTag = TAG_LIST;
|
visibleFragmentTag = TAG_LIST;
|
||||||
|
Loading…
Reference in New Issue
Block a user