forked from MoKee/android_packages_apps_Settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Settings: Fix inflate exception on search. Dynamically replace nested…
… fragment. When PrivacyGuard is opened, the parent fragment would inflate the layout which contained a nested fragment. This is bad behavior. Since we couldn't keep track of the fragments lifecycle, the fragment we instantiated during inflation would cause an inflate exception if and when we toggled the search view within the current context. Mitigate the crash by programmatically replacing the fragment after instantiating it once. AndroidRuntime E FATAL EXCEPTION: main E Process: com.android.settings, PID: 12372 E android.view.InflateException: Binary XML file line MoKee#21: Error inflating class fragment E at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) E at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) E at android.view.LayoutInflater.inflate(LayoutInflater.java:504) ... E Caused by: java.lang.IllegalArgumentException: Binary XML file line MoKee#21: Duplicate id 0x7f1001a2, tag nul l, or parent id 0xffffffff with another fragment for com.android.settings.privacyguard.PrivacyGuardPrefs E at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2120) E at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:177) E at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733) E ... 25 more Change-Id: I6820ad7d35814f150eedf91140e21c0b8e23322b
- Loading branch information
Adnan Begovic
authored and
scott
committed
Jan 31, 2015
1 parent
99d66e1
commit 423e578
Showing
3 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters