Fix UX problems in time zone pickers
- Remove emoji region flag in the region picker. It's more consistent with locale picker which shows no flag in region picker - Remove redundant information in the summary field e.g. same GMT offset in primary and secondary field in fixed offset picker - Better mode switching flow. Switch region/fixed offset mode only when the user confirms their selection in the picker. Bug: 73952488 Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datetime.timezone Change-Id: Id5da8a2516acd10c9a3d71181e94bc617d797d20
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Render a list of {@class TimeZoneInfo} into the list view in {@class BaseTimeZonePicker}
|
||||
@@ -135,8 +136,11 @@ public abstract class BaseTimeZoneInfoPicker extends BaseTimeZonePicker {
|
||||
name = mTimeZoneInfo.getStandardName();
|
||||
}
|
||||
}
|
||||
if (name == null) {
|
||||
return mTimeZoneInfo.getGmtOffset();
|
||||
|
||||
// Ignore name / GMT offset if the title shows the same information
|
||||
if (name == null || name.equals(mTitle)) {
|
||||
CharSequence gmtOffset = mTimeZoneInfo.getGmtOffset();
|
||||
return gmtOffset == null || gmtOffset.toString().equals(mTitle) ? "" : gmtOffset;
|
||||
} else {
|
||||
return SpannableUtil.getResourcesText(mResources,
|
||||
R.string.zone_info_offset_and_name, mTimeZoneInfo.getGmtOffset(), name);
|
||||
|
Reference in New Issue
Block a user