Merge "Fix the date format alignment problem" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
f5cf5af4ba
@@ -80,7 +80,6 @@ public class MainlineModuleVersionPreferenceController extends BasePreferenceCon
|
||||
try {
|
||||
mModuleVersion =
|
||||
mPackageManager.getPackageInfo(moduleProvider, 0 /* flags */).versionName;
|
||||
return;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(TAG, "Failed to get mainline version.", e);
|
||||
mModuleVersion = null;
|
||||
@@ -124,7 +123,8 @@ public class MainlineModuleVersionPreferenceController extends BasePreferenceCon
|
||||
return mModuleVersion;
|
||||
}
|
||||
|
||||
return DateFormat.getLongDateFormat(mContext).format(parsedDate.get());
|
||||
String format = DateFormat.getBestDateTimePattern(Locale.getDefault(), "dMMMMyyyy");
|
||||
return DateFormat.format(format, parsedDate.get());
|
||||
}
|
||||
|
||||
private Optional<Date> parseDateFromVersionName(String text) {
|
||||
|
Reference in New Issue
Block a user