Merge "Report normalized package name as default key" into oc-dev

am: 0560127e9d

Change-Id: Id09f3e8efd951de0a96a604cab336cef0bdcd265
This commit is contained in:
Svetoslav Ganov
2017-05-08 19:07:55 +00:00
committed by android-build-merger
2 changed files with 11 additions and 5 deletions

View File

@@ -181,7 +181,14 @@ public class DefaultAutofillPicker extends DefaultAppPickerFragment {
}
public static String getDefaultKey(Context context) {
return Settings.Secure.getString(context.getContentResolver(), SETTING);
String setting = Settings.Secure.getString(context.getContentResolver(), SETTING);
if (setting != null) {
ComponentName componentName = ComponentName.unflattenFromString(setting);
if (componentName != null) {
return componentName.flattenToString();
}
}
return null;
}
@Override