зеркало из https://github.com/mozilla/gecko-dev.git
Bug 925012 - Force execution of pending BrowserSearch fragment removals before re-adding. r=lucasr
This commit is contained in:
Родитель
12386e2162
Коммит
c4daf800a7
|
@ -53,6 +53,7 @@ import android.nfc.NfcAdapter;
|
|||
import android.nfc.NfcEvent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.InputDevice;
|
||||
|
@ -1646,8 +1647,16 @@ abstract public class BrowserApp extends GeckoApp
|
|||
|
||||
mBrowserSearchContainer.setVisibility(View.VISIBLE);
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.search_container, mBrowserSearch, BROWSER_SEARCH_TAG).commitAllowingStateLoss();
|
||||
final FragmentManager fm = getSupportFragmentManager();
|
||||
|
||||
// In certain situations, showBrowserSearch() can be called immediately after hideBrowserSearch()
|
||||
// (see bug 925012). Because of an Android bug (http://code.google.com/p/android/issues/detail?id=61179),
|
||||
// calling FragmentTransaction#add immediately after FragmentTransaction#remove won't add the fragment's
|
||||
// view to the layout. Calling FragmentManager#executePendingTransactions before re-adding the fragment
|
||||
// prevents this issue.
|
||||
fm.executePendingTransactions();
|
||||
|
||||
fm.beginTransaction().add(R.id.search_container, mBrowserSearch, BROWSER_SEARCH_TAG).commitAllowingStateLoss();
|
||||
mBrowserSearch.setUserVisibleHint(true);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче