Build a sitemap manager to keep track of breadcrumbs
- Have a new db to track parent-child page relation at index time. - Make a registry class to track (in IA) which page host what type of sub pages. - Make a manager class that queries the db as well as IA to compute breadcrumbs Fix: 32936784 Test: RunSettingsRoboTest Change-Id: I5f1583fae772c3d477d2ad186e111b79cc3e41aa
This commit is contained in:
@@ -24,9 +24,6 @@ import android.util.TypedValue;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import java.text.Normalizer;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Utility class to parse elements of XML preferences
|
||||
*/
|
||||
@@ -74,6 +71,14 @@ public class XmlParserUtils {
|
||||
return getData(context, attrs, R.styleable.Preference, R.styleable.Preference_keywords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fragment name if this preference launches a child fragment.
|
||||
*/
|
||||
public static String getDataChildFragment(Context context, AttributeSet attrs) {
|
||||
return getData(context, attrs, R.styleable.Preference,
|
||||
R.styleable.Preference_android_fragment);
|
||||
}
|
||||
|
||||
private static String getData(Context context, AttributeSet set, int[] attrs, int resId) {
|
||||
final TypedArray sa = context.obtainStyledAttributes(set, attrs);
|
||||
final TypedValue tv = sa.peekValue(resId);
|
||||
|
||||
Reference in New Issue
Block a user