时间使用12小时制下拉状态栏和锁屏时间格式没有“上午”或“下午”显示
程序员文章站
2022-05-06 14:18:54
diff --git a/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml b/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xmlold mode 100644new mode 100755index 2d08350..dafa277--- a/frameworks/base/packages/SystemUI/res-keyguard/v...
diff --git a/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml b/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml
old mode 100644
new mode 100755
index 2d08350..dafa277
--- a/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml
+++ b/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml
@@ -112,7 +112,9 @@
<string name="keyguard_carrier_name_with_sim_locked_template" translatable="false"><xliff:g id="carrier">%s</xliff:g> (<xliff:g id="message">%s</xliff:g>)</string>
<!-- Time format strings for fall-back clock widget -->
- <string name="keyguard_widget_12_hours_format" translatable="false">h:mm</string>
+ <!--jicong.wang modify for bug 17609 start {@-->
+ <string name="keyguard_widget_12_hours_format" translatable="false">aa</string>
+ <!--jicong.wang modify for bug 17609 end @}-->
<!-- Time format strings for fall-back clock widget -->
<string name="keyguard_widget_24_hours_format" translatable="false">kk:mm</string>
<!-- The character used in keyguard_widget_12_hours_format and keyguard_widget_24_hours_format
diff --git a/frameworks/base/packages/SystemUI/res/layout/status_bar.xml b/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
old mode 100644
new mode 100755
index f8db97d..00ae8fe
--- a/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
+++ b/frameworks/base/packages/SystemUI/res/layout/status_bar.xml
@@ -70,7 +70,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout="@layout/operator_name" />
-
+ <!--jicong.wang modify for bug 17609 start -->
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
android:layout_width="wrap_content"
@@ -80,7 +80,9 @@
android:paddingStart="@dimen/status_bar_left_clock_starting_padding"
android:paddingEnd="@dimen/status_bar_left_clock_end_padding"
android:gravity="center_vertical|start"
+ systemui:amPmStyle="normal"
/>
+ <!--jicong.wang modify for bug 17609 end @}-->
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout
android:id="@+id/notification_icon_area"
diff --git a/frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
old mode 100644
new mode 100755
index 5a1c997..eda3f07
--- a/frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -372,9 +372,11 @@ public class KeyguardStatusView extends GridLayout implements
clockView12 = DateFormat.getBestDateTimePattern(locale, clockView12Skel);
// CLDR insists on adding an AM/PM indicator even though it wasn't in the skeleton
// format. The following code removes the AM/PM indicator if we didn't want it.
- if (!clockView12Skel.contains("a")) {
+ /*jicong.wang modify for bug 17609 start {@*/
+ /*if (!clockView12Skel.contains("a")) {
clockView12 = clockView12.replaceAll("a", "").trim();
- }
+ }*/
+ /*jicong.wang modify for bug 17609 end @}*/
clockView24 = DateFormat.getBestDateTimePattern(locale, clockView24Skel);
本文地址:https://blog.csdn.net/wangjicong_215/article/details/112539275
上一篇: Flutter修改状态栏的颜色
下一篇: 关于士兵突击中的搞笑一箩筐